[PATCH] powerpc/papr_scm: don't requests stats with '0' sized stats buffer

Michael Ellerman patch-notifications at ellerman.id.au
Fri Jun 10 00:44:33 AEST 2022


On Tue, 24 May 2022 16:53:53 +0530, Vaibhav Jain wrote:
> Sachin reported [1] that on a POWER-10 lpar he is seeing a kernel panic being
> reported with vPMEM when papr_scm probe is being called. The panic is of the
> form below and is observed only with following option disabled(profile) for the
> said LPAR 'Enable Performance Information Collection' in the HMC:
> 
>  Kernel attempted to write user page (1c) - exploit attempt? (uid: 0)
>  BUG: Kernel NULL pointer dereference on write at 0x0000001c
>  Faulting instruction address: 0xc008000001b90844
>  Oops: Kernel access of bad area, sig: 11 [#1]
> <snip>
>  NIP [c008000001b90844] drc_pmem_query_stats+0x5c/0x270 [papr_scm]
>  LR [c008000001b92794] papr_scm_probe+0x2ac/0x6ec [papr_scm]
>  Call Trace:
>        0xc00000000941bca0 (unreliable)
>        papr_scm_probe+0x2ac/0x6ec [papr_scm]
>        platform_probe+0x98/0x150
>        really_probe+0xfc/0x510
>        __driver_probe_device+0x17c/0x230
> <snip>
>  ---[ end trace 0000000000000000 ]---
>  Kernel panic - not syncing: Fatal exception
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc/papr_scm: don't requests stats with '0' sized stats buffer
      https://git.kernel.org/powerpc/c/07bf9431b1590d1cd7a8d62075d0b50b073f0495

cheers


More information about the Linuxppc-dev mailing list