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: <CAGngYiXqscqVtSUkwwKGGweOgMm=E=W8nbxOXAbpeyYsk=5B0g@mail.gmail.com>
Date:   Wed, 28 Nov 2018 13:19:05 -0500
From:   Sven Van Asbroeck <thesven73@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     Sven Van Asbroeck <svendev@...x.com>, robh+dt@...nel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Lee Jones <lee.jones@...aro.org>, mark.rutland@....com,
        Andreas Färber <afaerber@...e.de>,
        treding@...dia.com, David Lechner <david@...hnology.com>,
        noralf@...nnes.org, johan@...nel.org,
        Michal Simek <monstr@...str.eu>, michal.vokac@...ft.com,
        Arnd Bergmann <arnd@...db.de>, john.garry@...wei.com,
        geert+renesas@...der.be, robin.murphy@....com,
        paul.gortmaker@...driver.com,
        sebastien.bourdelin@...oirfairelinux.com, icenowy@...c.io,
        Stuart Yoder <stuyoder@...il.com>, maxime.ripard@...tlin.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>
Subject: Re: [PATCH anybus v4 1/7] fieldbus_dev: add Fieldbus Device subsystem.

On Wed, Nov 28, 2018 at 12:42 PM Greg KH <gregkh@...uxfoundation.org> wrote:

> It depends on what you want to do with this device node.  You can use a
> static one in your structure if you use it to "cast back" to your real
> structure in the open() call, do you do that?

I do...

static int fieldbus_open(struct inode *inode, struct file *filp)
{
        struct fieldbus_dev *fbdev = container_of(inode->i_cdev,
                                                struct fieldbus_dev,
                                                cdev);

> Or use a misc device?  How many of these do you need?

Just one per fieldbus device.
But my main concern is naming in sysfs. A misc device will always show up as
/sys/class/misc/..., right? Given that this is a userspace fieldbus API,
we'd prefer /sys/class/fieldbus_dev/..., and cdev is the only way?

> For an online/offline attribute, no need to poll on it, just do a
> 'kobject change' event for online/offline and all should be fine.  This
> is not a high-frequency event, right?

Grepping... you mean kobject_uevent(KOBJ_CHANGE) ?
THAT mechanism seems to fit much better, thanks !!

> Hey, if no one wants to use it, either no need to write any code at all,
> or you get to decide everything.  Either way, you're in charge!  :)

I did get the impression that people are reluctant to take my patch partly
because of an unproven userspace API. Maybe they are (rightly) worried that,
once in, we will have to support this userspace API for evermore.

I'd love to get others involved in Fieldbus on Linux, but I'm not sure
how.

> But you do need to document the thing, in Documentation/ABI/ to get it
> correct and able to be reviewed.

The documentation is already included in this patch? Should I indicate this
in some standardized fashion?

 create mode 100644 Documentation/ABI/testing/fieldbus-dev-cdev
 create mode 100644 Documentation/ABI/testing/sysfs-class-fieldbus-dev

Thanks :)
Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ