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: <YuE8vEaA19iPGcfy@kroah.com>
Date:   Wed, 27 Jul 2022 15:25:16 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Jiho Chu <jiho.chu@...sung.com>
Cc:     arnd@...db.de, linux-kernel@...r.kernel.org,
        yelini.jeong@...sung.com, myungjoo.ham@...sung.com
Subject: Re: [PATCH 5/9] trinity: Add sysfs debugfs module

On Mon, Jul 25, 2022 at 03:53:04PM +0900, Jiho Chu wrote:
> This patch includes debugfs and sysfs interfaces.

debugfs and sysfs are two totally different things, with different rules
and requirements.  Split this up into at least 2 different patches and
don't mush them all together.

Would you want to try to review 2000+ lines of this type of thing that
does two totally different things at the same time?

Also, you forgot the sysfs Documentation/ABI/ entries, which are
required as you know.

And finally, you should never do this:

> +int trinity_sysfs_init(struct trinity_driver *drv)
> +{
> +	struct device *dev = drv_to_dev_ptr(drv);
> +	int err;
> +
> +	err = sysfs_create_groups(&dev->kobj, trinity_attrs_groups);


You just raced with userspace and lost.  Use the default groups pointer
for your driver and all will be fine.  Makes for much smaller code that
works properly.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ