Re: [PATCH] powerpc/powernv: Validate memcons descriptor and output buffer
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-01-24 10:21:24
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-01-24 10:21:24
Gavin Shan [off-list ref] writes:
Currently, it's assumed that memcons and its output buffer are included
in the linear mapping. It's not true when "mem=384M" is included in
bootargs. The system runs into kernel crash eventually.
# od -x /proc/device-tree/ibm,opal/ibm,opal-memcons
0000000 0000 0000 0b30 0010
0000010
This validates memcons descriptor and its output buffer to ensure they
are valid in linear mapping. Otherwise, the interface won't be populated
to avoid kernel crash during system boot.
Cc: stable@vger.kernel.org #3.15+
Fixes: bfc36894a48 ("powerpc/powernv: Add OPAL message log interface")
Signed-off-by: Gavin Shan <redacted>Hmm. Arguably the memcons shouldn't be in the linear map at all. AFAICS the kernel only ever reads from it, so really it should be explicitly mapped, and mapped read only. That would also fix this problem :D cheers