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>] [day] [month] [year] [list]
Message-ID: <20160213011130.GA2547@obsidianresearch.com>
Date:	Fri, 12 Feb 2016 18:11:30 -0700
From:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To:	Stefan Berger <stefanb@...ibm.com>
Cc:	Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
	linux-kernel@...r.kernel.org, Peter Huewe <peterhuewe@....de>,
	tpmdd-devel@...ts.sourceforge.net
Subject: Re: [PATCH 2/3] tpm: Get rid of chip->pdev

On Fri, Feb 12, 2016 at 07:37:10PM -0500, Stefan Berger wrote:
>    Jason Gunthorpe <jgunthorpe@...idianresearch.com> wrote on 02/12/2016
>    07:04:30 PM:
>    >
>    > This is a hold over from before the struct device conversion.
>    >
>    > - All prints should be using &chip->dev, which is the Linux
>    >   standard. This changes prints to use tpm0 as the device name,
>    >   not the PnP/etc ID.
>    > - The few places involving sysfs/modules that really do need the
>    >   parent just use chip->dev.parent instead
>    > - We no longer need to get_device(pdev) in any places since it is no
>    >   longer used by any of the code. The kref on the parent is held
>    >   by the device core during device_add and dropped in device_del
>    That is exactly what was needed for the vtpm driver and now you're
>    removing it. Is that still going to work after this change? Or do we
>    need to re-add it as get/put_device(chip->dev.parent) ?

That code was not correct, the get_device side has racy
lack-of-locking problems and it serves no purpose for the tpm core or
any existing driver.

I already fixed this once in commit ba0ef85479c46a 'tpm: Fix
initialization of the cdev' - that solves the racing of get_device,
and grabs the correct device kref, but I forgot to delete the broken
residual get_device. Sigh.

It is unfortunate that bogus code sent you down this rabbit hole. My
bad :(

I'll send you something else that might work for vtpm...

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ