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] [day] [month] [year] [list]
Date:	Thu, 23 Apr 2015 07:55:21 +0300
From:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc:	peterhuewe@....de, tpmdd-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, Marcel Selhorst <tpmdd@...horst.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Tejun Heo <tj@...nel.org>, Al Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jianyu Zhan <nasa4836@...il.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Andrzej Hajda <a.hajda@...sung.com>, NeilBrown <neilb@...e.de>,
	Guenter Roeck <linux@...ck-us.net>,
	Simon Wunderlich <sw@...onwunderlich.de>
Subject: Re: [PATCH v2] tpm: enable PPI for TPM 2.0

On Tue, Apr 21, 2015 at 01:33:38PM -0600, Jason Gunthorpe wrote:
> On Tue, Apr 21, 2015 at 09:30:55PM +0300, Jarkko Sakkinen wrote:
> > Enabled PPI interface to the character device sysfs directory accessible
> > both for 1.x and 2.0 devices.
> > 
> > The ppi group is moved from the platform device directory to the
> > character device directory. In order to retain backwards compatibility
> > with the 1.x devices, a symlink is created to the platform device
> > directory.
> > 
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> 
> > Reviewed-by: Jason Gunthorpe <jason.gunthorpe@...idianresearch.com>
> 
> Jumping the gun a bit, there :)
> But yes, the TPM bits still look OK to me.
> 
> Ah, don't forget to update Documentation/ABI/testing/sysfs-driver-ppi
> 
> > diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
> > index 6acc964..749cea3 100644
> > +++ b/fs/kernfs/dir.c
> > @@ -1225,6 +1225,7 @@ int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,
> >  	else
> >  		return -ENOENT;
> >  }
> > +EXPORT_SYMBOL_GPL(kernfs_remove_by_name_ns);
> 
> ??
> I don't see this being called
> 
> > +/**
> > + * sysfs_link_group_to_kobj - add a symlink to a kobject pointing to a group
> > + * @kobj:		The kobject containing the group.
> > + * @target_kobj:	The target kobject.
> > + * @target_name:	Name of the target group.
> > + */
> > +int sysfs_link_group_to_kobj(struct kobject *kobj, struct kobject *target_kobj,
> > +			     const char *target_name)
> 
> Agree with Guenter, separate patch.
> 
> I liked the signature I suggested earlier:
> 
> sysfs_link_group_to_kobj(struct kobject *from_kobj,
> 			 const char *from_name,
>                          struct kobject *target_kobj,
>                          const char *target_name)
> 
> 'link_group' may be too specific a name, I think this would work to
> establish a link to any file in a sysfs directory? Which is good,
> we'll need that for future TPM patches that relocate the other sysfs
> files..

BTW, which sysfs attributes would need to be relocated? Other than PPI
at least we are not interested to port for TPM 2.0 because you can just
as well get the data using TPM2 protocol and /dev/tpm0.

> Jason

/Jarkko
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ