Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-03 Thread Hon Ching (Vicky) Lo
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 s

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-02 Thread Anton Blanchard
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 c

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-02 Thread Peter Hüwe
Hi Anton, 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. Thanks, Peter Am Freitag, 19. Septe

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-02 Thread Ashley Lai
I recommend not applying this patch until we hear back from IBM. Thanks, --Ashley On Tue, 2 Dec 2014, Peter Hüwe wrote: Hi, so shall I apply this patch? or not? Thanks, Peter Am Dienstag, 2. Dezember 2014, 20:22:35 schrieb Ashley Lai: @@ -63,9 +63,9 @@ static int ibmvtpm_send_crq(struct vi

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-02 Thread Peter Hüwe
Hi, so shall I apply this patch? or not? Thanks, Peter Am Dienstag, 2. Dezember 2014, 20:22:35 schrieb Ashley Lai: > > @@ -63,9 +63,9 @@ static int ibmvtpm_send_crq(struct vio_dev *vdev, u64 > > w1, u64 w2) static struct ibmvtpm_dev *ibmvtpm_get_data(const struct > > device *dev) { > > > >

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-12-02 Thread Ashley Lai
@@ -63,9 +63,9 @@ static int ibmvtpm_send_crq(struct vio_dev *vdev, u64 w1, u64 w2) static struct ibmvtpm_dev *ibmvtpm_get_data(const struct device *dev) { struct tpm_chip *chip = dev_get_drvdata(dev); - if (chip) - return (struct ibmvtpm_dev *)TPM_VPRIV(chip); -

Re: [tpmdd-devel] [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-09-22 Thread Jason Gunthorpe
On Mon, Sep 22, 2014 at 12:43:27PM -0500, Ashley Lai wrote: > Hi Anton, > > Thanks for the patch. Is this oops easy to recreate? If so could > you give us the steps to reproduce? This looks like it is probably related to the uninitialization mess in the TPM core (resource held during module un

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-09-22 Thread Ashley Lai
On Sat, 20 Sep 2014, Anton Blanchard wrote: I'm looking at an oops in tpm_ibmvtpm_get_desired_dma: 28:00 00 20 39 li r9,0 2c:10 00 01 e8 ld r0,16(r1) 30:28 00 69 80 lwz r3,40(r9) We set r9 to 0 then load r9+40. The problem is actually in ibmvtpm_get_d

Re: [PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-09-22 Thread Ashley Lai
Hi Anton, Thanks for the patch. Is this oops easy to recreate? If so could you give us the steps to reproduce? Thanks, --Ashley Lai On Sat, 20 Sep 2014, Anton Blanchard wrote: I'm looking at an oops in tpm_ibmvtpm_get_desired_dma: 28:00 00 20 39 li r9,0 2c:10 00 01 e8

[PATCH 1/2] tpm/tpm_ibmvtpm: Fail in ibmvtpm_get_data if driver_data is bad

2014-09-19 Thread Anton Blanchard
I'm looking at an oops in tpm_ibmvtpm_get_desired_dma: 28: 00 00 20 39 li r9,0 2c: 10 00 01 e8 ld r0,16(r1) 30: 28 00 69 80 lwz r3,40(r9) We set r9 to 0 then load r9+40. The problem is actually in ibmvtpm_get_data, it can return NULL but the rest of the drive