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: <CAFSsGVvBfvkotAd+p++bzca4Km8pHVzNJEGV6CAjYULVOWuD2Q@mail.gmail.com>
Date: Wed, 29 Nov 2023 22:50:05 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>, 
	Christian Marangi <ansuelsmth@...il.com>, Jakub Kicinski <kuba@...nel.org>, 
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>, 
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] leds: trigger: netdev: skip setting baseline state in
 activate if hw-controlled

On Wed, Nov 29, 2023 at 5:36 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Wed, Nov 29, 2023 at 11:41:51AM +0100, Heiner Kallweit wrote:
> > The current codes uses the sw_control path in set_baseline_state() when
> > called from netdev_trig_activate() even if we're hw-controlled. This
> > may result in errors when led_set_brightness() is called because we may
> > not have set_brightness led ops (if hw doesn't support setting a LED
> > to ON).
>
> Not having software on/off control of the LED is a problem. It breaks
> the whole concept of offloading/accelerating. If we cannot control the
> LED, there is nothing to accelerate. What do we do when the user
> selects a configuration which is not supported by the hardware? The
> API is not atomic, you cannot set multiple things at once. So the user
> might be trying to get from one offloadable configuration to another
> offloadable configuration, but needs to go via an configuration which
> is not offloadable. Do we return -EOPNOTSUPP?
>
The point you raise with the non-atomic API is completely valid,
however I think it's
not directly related to this patch. Here it's about a validated hw-control path.
So I think the patch is still valid.

> Before we accept patches like this, we need to discuss the concept of
> how we support LEDs which cannot be controlled in software.
>
RTL8168 LED control allows to switch between different hw triggers. I
was under the
assumption that this is not uncommon.
In order to deal with the non-atomic issue we have to set
trigger_data->mode to the
resulting new mode, based on what the user set. Question is what we show to the
user. If we show nothing, then he will expect the new mode to be active.
If we show an error, then he may assume that his input had no effect.
So we may have to show technically an OK, plus a message that his input has been
stored, but is not supported by hw.








>     Andrew

Heiner

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ