Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-20 Thread Jarkko Sakkinen
On Fri, Feb 19, 2016 at 10:44:34AM -0700, Jason Gunthorpe wrote: > On Fri, Feb 19, 2016 at 05:06:06PM +0200, Jarkko Sakkinen wrote: > > > Can you quickly check the two top-most patches: > > > > https://github.com/jsakkine/linux-tpmdd/commits/master > > Drop the change to crb_map_res, the memset

Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-19 Thread Jason Gunthorpe
On Fri, Feb 19, 2016 at 05:06:06PM +0200, Jarkko Sakkinen wrote: > Can you quickly check the two top-most patches: > > https://github.com/jsakkine/linux-tpmdd/commits/master Drop the change to crb_map_res, the memset is not needed. The shutdown change is probably OK for a rc fix, but it is stil

Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-19 Thread Jarkko Sakkinen
On Thu, Feb 18, 2016 at 10:31:40AM -0700, Jason Gunthorpe wrote: > On Wed, Feb 17, 2016 at 04:20:16PM +0200, Jarkko Sakkinen wrote: > > Maybe for the release the safest bet would be anyway explicitly not > > use the name field? That's the safest bet given the release time > > frame. > > nulling it

Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-18 Thread Jason Gunthorpe
On Wed, Feb 17, 2016 at 04:20:16PM +0200, Jarkko Sakkinen wrote: > Maybe for the release the safest bet would be anyway explicitly not > use the name field? That's the safest bet given the release time > frame. nulling it in the acpi paths of tis and crb, if you know those are broken seems good fo

Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-17 Thread Jarkko Sakkinen
On Wed, Feb 17, 2016 at 11:36:23AM +0200, Jarkko Sakkinen wrote: > On Tue, Feb 16, 2016 at 09:52:19PM -0700, Jason Gunthorpe wrote: > > On Wed, Feb 17, 2016 at 02:27:54AM +0200, Jarkko Sakkinen wrote: > > > - if (acpi_dev_resource_memory(ares, &res)) > > > + if (acpi_dev_resource_memory(ares, &res)

Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-17 Thread Jarkko Sakkinen
On Tue, Feb 16, 2016 at 09:52:19PM -0700, Jason Gunthorpe wrote: > On Wed, Feb 17, 2016 at 02:27:54AM +0200, Jarkko Sakkinen wrote: > > - if (acpi_dev_resource_memory(ares, &res)) > > + if (acpi_dev_resource_memory(ares, &res)) { > > + res.name = NULL; > > What? How is this not a bug

Re: [tpmdd-devel] [PATCH] tpm_crb: fix bad name pointer usage with struct resource

2016-02-16 Thread Jason Gunthorpe
On Wed, Feb 17, 2016 at 02:27:54AM +0200, Jarkko Sakkinen wrote: > - if (acpi_dev_resource_memory(ares, &res)) > + if (acpi_dev_resource_memory(ares, &res)) { > + res.name = NULL; What? How is this not a bug in acpi_dev_resource_memory? Maybe it needs to memcpy into devm alloca