Thread (4 messages) flat view 4 messages, 4 authors, 2018-02-18

Re: pseries/drmem: Check for zero filled ibm, dynamic-memory property.

From: Michael Ellerman <hidden>
Date: 2018-02-18 08:55:39

On Fri, 2018-02-16 at 03:27:41 UTC, Nathan Fontenot wrote:
Some versions of QEMU will produce an ibm,dynamic-reconfiguration-memory
node with a ibm,dynamic-memory property that is zero-filled. This causes
the drmem code to oops trying to parse this property.

The fix for this is to validate that the property does contain LMB
entries before trying to parse it and bail if the count is zero.

Oops: Kernel access of bad area, sig: 11 [#1]
...
The ibm,dynamic-reconfiguration-memory device tree property
generated that causes this:

ibm,dynamic-reconfiguration-memory {
        ibm,lmb-size = <0x0 0x10000000>;
        ibm,memory-flags-mask = <0xff>;
        ibm,dynamic-memory = <0x0 0x0 0x0 0x0 0x0 0x0>;
        linux,phandle = <0x7e57eed8>;
        ibm,associativity-lookup-arrays = <0x1 0x4 0x0 0x0 0x0 0x0>;
        ibm,memory-preservation-time = <0x0>;
};

Signed-off-by: Nathan Fontenot <redacted>
Reviewed-by: Cyril Bur <redacted>
Tested-by: Daniel Black <redacted>
Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/2c10636a0b9c689450e85f99455839

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help