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: <729bdb48-8253-282a-2e0b-860ec5ff345c@prevas.dk>
Date:   Mon, 11 Mar 2019 10:59:45 +0000
From:   Rasmus Villemoes <rasmus.villemoes@...vas.dk>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, Pavel Machek <pavel@....cz>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>
CC:     LKML <linux-kernel@...r.kernel.org>,
        "Per N. Christensen" <pnc@...f.com>, Thomas Winding <twi@...f.com>
Subject: replacement for CAN_LEDS

Hi

I'm in the process of upgrading an old BSP to a 4.19 kernel, and noticed
that CAN_LEDS has been marked broken. The comments say that the netdev
trigger can do everything, but doesn't provide much guidance on how to
actually do the transition.

In my case, I used to have a device tree node

                canb {
                        label = "canb:green:activity";
                        gpios = <&gpio0 5 0>;
                        default-state = "off";
                        linux,default-trigger = "can1-rxtx";
                };

and if I change the default-trigger to netdev, I get sysfs files in
/sys/class/leds/canb:green:activity ; if I then echo can1 to device_name
and 1 to rx,tx, and link, I get the behaviour I used to have.

Questions: must this setup be done in userspace like this? Is there some
udev rule template I could copy? I can also just hardcode the above
dance in some init script.

I'd actually prefer keeping the entire setup in device tree. So would it
be possible to have netdev_trig_activate() look for some properties in
the DT node for the led_classdev and populate ->device_name and ->mode
based on them?

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ