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:	Sun, 8 Nov 2015 00:31:09 +0200
From:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:	Jeremiah Mahler <jmmahler@...il.com>,
	tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	peterhuewe@....de, gregkh@...uxfoundation.org,
	jgunthorpe@...idianresearch.com, dhowells@...hat.com,
	artem.bityutskiy@...ux.intel.com, Tejun Heo <tj@...nel.org>,
	NeilBrown <neilb@...e.de>, Guenter Roeck <linux@...ck-us.net>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [BUG, PATCH 03/10] sysfs: added
 __compat_only_sysfs_link_entry_to_kobj()

On Sat, Nov 07, 2015 at 10:08:56AM -0800, Jeremiah Mahler wrote:
> Jarkko,
> 
> On Sat, Nov 07, 2015 at 01:41:37PM +0200, Jarkko Sakkinen wrote:
> > On Sat, Nov 07, 2015 at 12:55:43PM +0200, Jarkko Sakkinen wrote:
> > > On Fri, Nov 06, 2015 at 06:55:18PM -0800, Jeremiah Mahler wrote:
> > > > Jarkko,
> > > > 
> [...]
> > > > > +	entry = kernfs_find_and_get(target_kobj->sd, target_name);
> > > > > +	if (!entry) {
> > > > > +		kernfs_put(target);
> > > > > +		return -ENOENT;
> > > > > +	}
> > > > > +
> > > > 
> > > > On an Acer C720 this call to kernfs_find_and_get fails resulting in
> > > > a failed resume after suspend.
> > > > 
> > > > Apparently it can't find an object for the name "ppi".
> > > > 
> > > > This bug does not appear until the next patch is applied which
> > > > calls __compat_only_sysfs_link_entry_to_kobj.
> > > 
> > > I think I might have found something thanks to your help
> > > 
> > > First I found this old bug:
> > > 
> > > https://bugzilla.redhat.com/show_bug.cgi?id=1096511
> > > 
> > > What is happening is that DSM is not found and therefore tpm_add_ppi()
> > > does not add ppi to sysfs groups array.
> > > 
> > > __compat_only_sysfs_link_entry_to_kobj() is called after tpm_add_ppi
> > > unconditionally for TPM1.
> > > 
> > > I'll implement a fix for this ASAP.
> > > 
> > > Thank you for great effort on finding tis!
> > 
> > I pushed a fix over here:
> > 
> > https://github.com/jsakkine/linux-tpmdd/tree/fixes
> > 
> This fix does work since it effectively avoids the call to
> __compat_only_sysfs_link_entry_to_kobj().
> 
> Have you tested cases where __compat_only_sysfs_link_entry_to_kobj()
> is actually used?

Yes, of course I have. And I checked your DSDT and my assumption was
correct. There was no DSM in the ACPI object.

However, there is probably another regression but it is caused by some
patch that was added earlier. I strongly believe it is not caused by any
of my 4.4 patches.

I think what was happening with you was that
__compat_only_sysfs_link_entry_to_kobj() was returning -ENOENT, which it
should do when target is not found. This was propagated to tpm_tis and
it probably messes up clean up somehow.

I have to test my hypothesis as soon as possible. The fix that I pushed
is still valid no matter which way the things are.

> [...]
> 
> -- 
> - Jeremiah Mahler

/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