Re: Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Nayna

Hi Sachin and Michal,


On 07/03/2019 05:15 PM, Michal Suchánek wrote:

On Wed, 3 Jul 2019 13:17:16 +0200
Michal Suchánek  wrote:


On Wed, 3 Jul 2019 15:54:59 +0530
Sachin Sant  wrote:


Booting mainline kernel on PowerVM LPAR with vTPM enabled results
into a kernel crash.

[0.365989] BUG: Kernel NULL pointer dereference at 0x0012

...

[0.366085] NIP [c073dd80] tpm1_pcr_extend+0x130/0x230
[0.366090] LR [c073dcd0] tpm1_pcr_extend+0x80/0x230

...

You need to revert (or fix up) commit 0b6cf6b97b7e ("tpm: pass an array
of tpm_extend_digest structures to tpm_pcr_extend()". At least
reverting it fixes the issue for me.

FTR this is the revert on lkml https://lkml.org/lkml/2019/7/1/423





I have just now posted the fix for this to the mailing list and copied 
both of you. I would appreciate your testing and confirming that the 
patch "tpm: fixes uninitialized allocated banks for IBM vtpm driver" 
addresses this bug.


Thanks & Regards,
  - Nayna




Re: Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Michal Suchánek
On Wed, 3 Jul 2019 13:17:16 +0200
Michal Suchánek  wrote:

> On Wed, 3 Jul 2019 15:54:59 +0530
> Sachin Sant  wrote:
> 
> > Booting mainline kernel on PowerVM LPAR with vTPM enabled results
> > into a kernel crash.
> > 
> > [0.365989] BUG: Kernel NULL pointer dereference at 0x0012
...
> > [0.366085] NIP [c073dd80] tpm1_pcr_extend+0x130/0x230
> > [0.366090] LR [c073dcd0] tpm1_pcr_extend+0x80/0x230
...
> 
> You need to revert (or fix up) commit 0b6cf6b97b7e ("tpm: pass an array
> of tpm_extend_digest structures to tpm_pcr_extend()". At least
> reverting it fixes the issue for me.

FTR this is the revert on lkml https://lkml.org/lkml/2019/7/1/423

> 
> Thanks
> 
> Michal
> 



Re: Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Michal Suchánek
On Wed, 3 Jul 2019 15:54:59 +0530
Sachin Sant  wrote:

> Booting mainline kernel on PowerVM LPAR with vTPM enabled results
> into a kernel crash.
> 
> [0.365989] BUG: Kernel NULL pointer dereference at 0x0012
> [0.365995] Faulting instruction address: 0xc073dd80
> [0.366000] Oops: Kernel access of bad area, sig: 11 [#1]
> [0.366005] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
> [0.366010] Modules linked in:
> [0.366015] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 
> 5.2.0-rc7-autotest-autotest #1
> [0.366020] NIP:  c073dd80 LR: c073dcd0 CTR: 
> 
> [0.366026] REGS: c018ed8e7550 TRAP: 0380   Not tainted  
> (5.2.0-rc7-autotest-autotest)
> [0.366031] MSR:  80009033   CR: 28002448  
> XER: 20040001
> [0.366038] CFAR: c0b6d1c4 IRQMASK: 0
> [0.366038] GPR00: c073dcd0 c018ed8e77e0 c1524a00 
> 
> [0.366038] GPR04: 0003  0001 
> 000e
> [0.366038] GPR08: 0022 0001 c018e551 
> 883bfecd
> [0.366038] GPR12: 48002448 c0001ec6ee00 c00107a8 
> 
> [0.366038] GPR16:    
> 
> [0.366038] GPR20:    
> 
> [0.366038] GPR24: c018eb9eaaa0  c0bce810 
> c0e2ed28
> [0.366038] GPR28: c018e70a4000 000a 0012 
> c018e551
> [0.366085] NIP [c073dd80] tpm1_pcr_extend+0x130/0x230
> [0.366090] LR [c073dcd0] tpm1_pcr_extend+0x80/0x230
> [0.366094] Call Trace:
> [0.366098] [c018ed8e77e0] [c073dcd0] 
> tpm1_pcr_extend+0x80/0x230 (unreliable)
> [0.366105] [c018ed8e7890] [c073c8c4] tpm_pcr_extend+0xd4/0x180
> [0.366111] [c018ed8e78d0] [c05745f8] 
> ima_add_template_entry+0x198/0x320
> [0.366117] [c018ed8e79b0] [c0577058] 
> ima_store_template+0xc8/0x160
> [0.366124] [c018ed8e7a30] [c0f6081c] 
> ima_add_boot_aggregate+0xf8/0x184
> [0.366130] [c018ed8e7b30] [c0f6093c] ima_init+0x94/0xbc
> [0.366135] [c018ed8e7b90] [c0f60aac] init_ima+0x44/0xe8
> [0.366140] [c018ed8e7c10] [c0010448] 
> do_one_initcall+0x68/0x2c0
> [0.366146] [c018ed8e7ce0] [c0f14738] 
> kernel_init_freeable+0x318/0x47c
> [0.366152] [c018ed8e7db0] [c00107c4] kernel_init+0x24/0x150
> [0.366158] [c018ed8e7e20] [c000ba54] 
> ret_from_kernel_thread+0x5c/0x68
> [0.366163] Instruction dump:
> [0.366167] 7d404d2c 81210068 792a07e1 e9410070 392a0002 7d004c2c 79070020 
> 40c20048
> [0.366174] 39080014 3d21 7f884840 419d00a4 <807e> 809e0004 
> 80be0008 80de000c
> [0.366182] ---[ end trace ec40127c4fe87b2c ]—
> 
> Thanks
> -Sachin

You need to revert (or fix up) commit 0b6cf6b97b7e ("tpm: pass an array
of tpm_extend_digest structures to tpm_pcr_extend()". At least
reverting it fixes the issue for me.

Thanks

Michal



Kernel Bug/oops during boot (PowerVM LPAR w/vTPM)

2019-07-03 Thread Sachin Sant
Booting mainline kernel on PowerVM LPAR with vTPM enabled results
into a kernel crash.

[0.365989] BUG: Kernel NULL pointer dereference at 0x0012
[0.365995] Faulting instruction address: 0xc073dd80
[0.366000] Oops: Kernel access of bad area, sig: 11 [#1]
[0.366005] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
[0.366010] Modules linked in:
[0.366015] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 
5.2.0-rc7-autotest-autotest #1
[0.366020] NIP:  c073dd80 LR: c073dcd0 CTR: 
[0.366026] REGS: c018ed8e7550 TRAP: 0380   Not tainted  
(5.2.0-rc7-autotest-autotest)
[0.366031] MSR:  80009033   CR: 28002448  
XER: 20040001
[0.366038] CFAR: c0b6d1c4 IRQMASK: 0
[0.366038] GPR00: c073dcd0 c018ed8e77e0 c1524a00 

[0.366038] GPR04: 0003  0001 
000e
[0.366038] GPR08: 0022 0001 c018e551 
883bfecd
[0.366038] GPR12: 48002448 c0001ec6ee00 c00107a8 

[0.366038] GPR16:    

[0.366038] GPR20:    

[0.366038] GPR24: c018eb9eaaa0  c0bce810 
c0e2ed28
[0.366038] GPR28: c018e70a4000 000a 0012 
c018e551
[0.366085] NIP [c073dd80] tpm1_pcr_extend+0x130/0x230
[0.366090] LR [c073dcd0] tpm1_pcr_extend+0x80/0x230
[0.366094] Call Trace:
[0.366098] [c018ed8e77e0] [c073dcd0] tpm1_pcr_extend+0x80/0x230 
(unreliable)
[0.366105] [c018ed8e7890] [c073c8c4] tpm_pcr_extend+0xd4/0x180
[0.366111] [c018ed8e78d0] [c05745f8] 
ima_add_template_entry+0x198/0x320
[0.366117] [c018ed8e79b0] [c0577058] 
ima_store_template+0xc8/0x160
[0.366124] [c018ed8e7a30] [c0f6081c] 
ima_add_boot_aggregate+0xf8/0x184
[0.366130] [c018ed8e7b30] [c0f6093c] ima_init+0x94/0xbc
[0.366135] [c018ed8e7b90] [c0f60aac] init_ima+0x44/0xe8
[0.366140] [c018ed8e7c10] [c0010448] do_one_initcall+0x68/0x2c0
[0.366146] [c018ed8e7ce0] [c0f14738] 
kernel_init_freeable+0x318/0x47c
[0.366152] [c018ed8e7db0] [c00107c4] kernel_init+0x24/0x150
[0.366158] [c018ed8e7e20] [c000ba54] 
ret_from_kernel_thread+0x5c/0x68
[0.366163] Instruction dump:
[0.366167] 7d404d2c 81210068 792a07e1 e9410070 392a0002 7d004c2c 79070020 
40c20048
[0.366174] 39080014 3d21 7f884840 419d00a4 <807e> 809e0004 80be0008 
80de000c
[0.366182] ---[ end trace ec40127c4fe87b2c ]—

Thanks
-Sachin