lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200226125903.GA2800@duo.ucw.cz>
Date:   Wed, 26 Feb 2020 13:59:03 +0100
From:   Pavel Machek <pavel@....cz>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc:     Dan Murphy <dmurphy@...com>, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH v17 00/17] Multi Color LED Framework

Hi!

> > The fact that it changes API makes it important to get it right, and
> > hard/impossible to fix it once it is merged... and I don't think this
> > is the right interface (sorry).
> > 
> > In particular, I don't think having directory per channel is a good
> > idea. It makes atomic updates impossible (minor), 
> 
> It is possible via brightness file, although it will need first writing
> intensity files, which only will cache colors, and actual write to hw
> occurs on write to brightness file. This has been discussed dozen of
> times throughout last year, and you even proposed the formula for
> calculating per-color-subled brightness basing on global brightness and
> intensity set for each color.

You are right, it is possible to make updates atomic with right kind
of latching (which is quite confusing).

> > but will also
> > increase memory consuption (to a point where led-per-channel might
> > be cheaper), and will make userspace do 3x ammount of syscalls in the
> > common case.
> > 
> > And we can do better; sysfs files with arrays are okay. So I'd like to
> > see
> 
> Let's first achieve broader consensus on this statement before we
> move forward with such design. Sysfs maintainer seems to be the best
> person to consult at first.

This is actually documented:

Documentation/filesystems/sysfs.txt

<quote>
Attributes should be ASCII text files, preferably with only one value
per file. It is noted that it may not be efficient to contain only one
value per file, so it is socially acceptable to express an array of
values of the same type.

Mixing types, expressing multiple lines of data, and doing fancy
formatting of data is heavily frowned upon. Doing these things may get
you publicly humiliated and your code rewritten without notice.
</quote>

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ