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-next>] [day] [month] [year] [list]
Message-ID: <20191204110219.GV25745@shell.armlinux.org.uk>
Date:   Wed, 4 Dec 2019 11:02:19 +0000
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Pavel Machek <pavel@....cz>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: "leds: gpio: Use generic support for composing LED names" breaks
 gpio debugfs

Hi,

Patch d7235f5feaa0 ("leds: gpio: Use generic support for composing LED
names") changed the way labels are used.

devm_fwnode_get_gpiod_from_child() is passed led.name, which used to be
set to the label or node name, resulting in /sys/kernel/debug/gpio
containing useful information.  For example:

 gpio-487 (                    |udpu:green:power    ) out lo
 gpio-488 (                    |udpu:red:power      ) out hi
 gpio-489 (                    |udpu:green:network  ) out hi
 gpio-490 (                    |udpu:red:network    ) out hi
 gpio-491 (                    |udpu:green:alarm    ) out hi
 gpio-492 (                    |udpu:red:alarm      ) out hi

After this commit, it now contains a rather less useful:

 gpio-487 (                    |?                   ) out hi ACTIVE LOW
 gpio-488 (                    |?                   ) out hi ACTIVE LOW
 gpio-489 (                    |?                   ) out hi ACTIVE LOW
 gpio-490 (                    |?                   ) out hi ACTIVE LOW
 gpio-491 (                    |?                   ) out hi ACTIVE LOW
 gpio-492 (                    |?                   ) out hi ACTIVE LOW

This is because led.name is now NULL prior to the call to
devm_fwnode_get_gpiod_from_child().

While this is not an API, it is useful for debugging, and given the
dynamic allocation of GPIOs to physical GPIOs, having the labels
present is an advantage.

Can this be fixed / old behaviour restored?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ