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: <b43c5dd5-6ffd-5e5a-f4d0-86792feac304@ysoft.com>
Date:   Mon, 1 Oct 2018 18:29:25 +0200
From:   Michal Vokáč <michal.vokac@...ft.com>
To:     Fabrice Gasnier <fabrice.gasnier@...com>, thierry.reding@...il.com,
        gottfried.haider@...il.com
Cc:     stefan.wahren@...e.com, hsweeten@...ionengravers.com,
        loic.pallardy@...com, broonie@...nel.org, gohai@...zessiv.net,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org,
        linux-rpi-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-pwm@...r.kernel.org
Subject: Re: [PATCH v2 2/2] pwm: send a uevent on the pwmchip device upon
 channel sysfs (un)export

On 1.10.2018 15:23, Fabrice Gasnier wrote:
> This patch sends a uevent (KOBJ_CHANGE) on the pwmchipN device, everytime
> a pwmX channel has been exported/unexported via sysfs.
> This allows udev to implement rules on such events, like:
> 
> SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\
>          chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\
>          chown -R root:gpio
> /sys/devices/platform/soc/*.pwm/pwm/pwmchip* && chmod -R 770
> /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\
> '"
> 
> This is a replacement patch for commit 7e5d1fd75c3d ("pwm: Set class for
> exported channels in sysfs"), see [1].
> 
> basic testing:
> $ udevadm monitor --environment &
> $ echo 0 > /sys/class/pwm/pwmchip0/export
> KERNEL[197.321736] change   /devices/.../pwm/pwmchip0 (pwm)
> ACTION=change
> DEVPATH=/devices/.../pwm/pwmchip0
> EXPORT=pwm0
> SEQNUM=2045
> SUBSYSTEM=pwm
> 
> [1] https://lkml.org/lkml/2018/9/25/713
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@...com>
> Tested-by: Gottfried Haider <gottfried.haider@...il.com>

Tested-by: Michal Vokáč <michal.vokac@...ft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ