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:	Fri, 4 Dec 2015 10:10:15 +0100
From:	"Wilck, Martin" <martin.wilck@...fujitsu.com>
To:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
CC:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
	"tpmdd-devel@...ts.sourceforge.net" 
	<tpmdd-devel@...ts.sourceforge.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Uwe Kleine-K??nig <u.kleine-koenig@...gutronix.de>
Subject: Re: [tpmdd-devel] [PATCH v2 0/3] tpm_tis: Clean up force module
 parameter

> > ACPI defines a mem resource corresponding to the standard TIS memory
> > area on my system, and it used to be detected fine with Jarkko's patch.
> > Somehow your latest changes broke it, not sure why.
> 
> Are you certain? Based on what you sent me, that output is only
> possible if there is no mem resource.
> 
> With the prior arrangement no mem resource means the x86 default
> address is used, which is the only way I can see how your system
> works.

The following simple change fixes the ACPI probing after applying your
latest series. The must have been another ACPI resource that you were
erroneously using as mem resource. 

The IS_ERR change() didn't fix it. I think it's not needed, although it
probably can't hurt.

diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index a1898c8..4c65a7d 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -954,7 +954,8 @@ static int tpm_check_resource(struct acpi_resource *ares, void *data)
 
 	if (acpi_dev_resource_interrupt(ares, 0, &res))
 		tpm_info->irq = res.start;
-	acpi_dev_resource_memory(ares, &tpm_info->res);
+	else if (acpi_dev_resource_memory(ares, &res))
+		memcpy(&tpm_info->res, &res, sizeof(res));
 
 	return 1;
 }

Powered by blists - more mailing lists