From: "Hon Ching (Vicky) Lo" <honclo@linux.vnet.ibm.com>
To: Anton Blanchard <anton@samba.org>
Cc: "Peter Hüwe" <PeterHuewe@gmx.de>,
"Ashley Lai" <ashley@ashleylai.com>,
"Marcel Selhorst" <tpmdd@selhorst.net>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad
Date: Wed, 03 Dec 2014 18:11:32 -0500 [thread overview]
Message-ID: <1417648292.5634.6.camel@vserver> (raw)
In-Reply-To: <20141203082008.6c7ed94b@kryten>
Hi Anton,
vio_bus_probe now calls vio_cmo_bus_probe before calling probe.
This results in calling get_desired_dma to get rtce buf size
before we have called probe which initializes vtpm driver and
sets up the tpm data, i.e. rtce buf size.
ibmvtpm_get_data returns NULL in get_desired_dma is a special
case where the device is not initialized.
Regards,
Vicky
On Wed, 2014-12-03 at 08:20 +1100, Anton Blanchard wrote:
> Hi,
>
> > is this patchset still needed after Vicky's patch
> > "[tpmdd-devel] Fix NULL return in tpm_ibmvtpm_get_desired_dma"
> > https://patchwork.ozlabs.org/patch/402315/
> >
> > Ashley raised some concerns.
> >
> > Since merge window is coming up, a fast reply is appreciated.
>
> We definitely need a way to catch an invalid driver data pointer, but it
> looks like that needs to be reworked after Vicky's patch.
>
> Vicky could you look at all uses of ibmvtpm_get_data and make
> sure we don't blindly dereference it? eg:
>
> static int tpm_ibmvtpm_resume(struct device *dev)
> {
> struct ibmvtpm_dev *ibmvtpm = ibmvtpm_get_data(dev);
> ...
>
> rc = plpar_hcall_norets(H_ENABLE_CRQ,
> ibmvtpm->vdev->unit_address);
>
> Anton
>
prev parent reply other threads:[~2014-12-03 23:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 21:29 [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad Anton Blanchard
2014-09-19 21:30 ` [PATCH 2/2] tpm/tpm_ibmvtpm: Remove unnecessary casts Anton Blanchard
2014-09-22 17:49 ` Ashley Lai
2014-09-24 16:18 ` [tpmdd-devel] " Jason Gunthorpe
2014-09-22 17:43 ` [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad Ashley Lai
2014-09-22 18:03 ` [tpmdd-devel] " Jason Gunthorpe
2014-09-22 17:45 ` Ashley Lai
2014-12-02 19:22 ` Ashley Lai
2014-12-02 19:46 ` Peter Hüwe
2014-12-02 20:09 ` Ashley Lai
2014-12-02 20:39 ` Peter Hüwe
2014-12-02 21:20 ` Anton Blanchard
2014-12-03 23:11 ` Hon Ching (Vicky) Lo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417648292.5634.6.camel@vserver \
--to=honclo@linux.vnet.ibm.com \
--cc=PeterHuewe@gmx.de \
--cc=anton@samba.org \
--cc=ashley@ashleylai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox