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, 23 Jun 2015 10:19:32 -0600
From:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
	tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	peterhuewe@....de, gregkh@...uxfoundation.org,
	Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
	Guenter Roeck <linux@...ck-us.net>, NeilBrown <neilb@...e.de>
Subject: Re: [PATCH v7 1/3] sysfs: added sysfs_link_entry_to_kobj()

On Mon, Jun 22, 2015 at 02:01:54PM -0400, Tejun Heo wrote:
> > TPM is undergoing a migration of core attributes from the
> > platform_device to the core's struct device.
> > 
> > The only purpose of the symlink was to provide userspace
> > compatability with the old location.
> 
> Ah, yeah, that's painful.  Can you please briefly explain why it
> wasn't necessary before?  Are you merging multiple devices into one?

Prior to the clean up work starting each and every driver was adding
sysfs files on its own to the platform_device and we had no core
struct tpm.struct device all.

The first cleanup moved all the sysfs creation into core code, but
kept the use of the platform device. A second cleanup added the struct
device and removed the misc_device abuse.

The next round was hoped to bring the core code into alignment with
everything else in the kernel:
 - Create sysfs files at the right time so userspace isn't racey
 - Don't stomp the drvdata of the platform_device in core code
 - Have the understandable lifetime model that most of the rest
   of the kernel has

The concept was to move the sysfs files to the natural location on the
core's struct tpm.struct device and leave a symlink behind on the
platform_device for compat.

We could also just move the sysfs file and ignore the compat symlink,
but it is not clear to me if that is an OK UAPI break for sysfs?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists