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]
Date:   Tue, 29 May 2018 18:30:48 +0200
From:   Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:     Rob Herring <robh@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
        Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Wolfram Sang <w.sang@...gutronix.de>
Subject: Re: [PATCH 07/19] serdev: Allows dynamic creation of devices via sysfs

Hi Rob

On Tue, May 29, 2018 at 5:38 PM Rob Herring <robh@...nel.org> wrote:

> On Tue, May 29, 2018 at 8:10 AM, Ricardo Ribalda Delgado
> <ricardo.ribalda@...il.com> wrote:
> > Allow creating and deleting devices via sysfs. Devices created will be
> > matched to serdev drivers via modalias (the string provided by the user)
> > and deleted via their name. Eg:
> >
> >  # Create device
> > root@...022:~# echo ttydev > /sys/bus/serial/devices/serial0/new_device
> >
> >  # Delete device
> > root@...022:~#
> >         echo serial0-0 > /sys/bus/serial/devices/serial0/delete_device

> I think the model here should be the kernel provides dummy slave
> device for each serial port and then you can use bind and unbind to
> bind to a particular driver.


I have been researching a bit that approach, but I found a couple of issues:

- With the bind/unbind you need to modprobe manually the module. Something
like

modprobe myserdev
echo myserdev > bind

- You need one module per part_number, with modalias you can have a
different alias per module

- I guess that the final user will appreciate that the serdev has the same
API as other serial slow bus (i2c).

ccing Wolfram becase maybe he has some feedback to same from his experience
with the i2c bus.

Thanks!


> Rob



-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ