Home
last modified time | relevance | path

Searched hist:"63 aecfb2" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/powerpc/platforms/powernv/
H A Dopal-sysparam.c63aecfb2 Thu Apr 24 02:25:37 CDT 2014 Joel Stanley <joel@jms.id.au> powerpc/powernv: Check sysparam size before creation

The size of the sysparam sysfs files is determined from the device tree
at boot. However the buffer is hard coded to 64 bytes. If we encounter a
parameter that is larger than 64, or miss-parse the device tree, the
buffer will overflow when reading or writing to the parameter.

Check it at discovery time, and if the parameter is too large, do not
create a sysfs entry for it.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
63aecfb2 Thu Apr 24 02:25:37 CDT 2014 Joel Stanley <joel@jms.id.au> powerpc/powernv: Check sysparam size before creation

The size of the sysparam sysfs files is determined from the device tree
at boot. However the buffer is hard coded to 64 bytes. If we encounter a
parameter that is larger than 64, or miss-parse the device tree, the
buffer will overflow when reading or writing to the parameter.

Check it at discovery time, and if the parameter is too large, do not
create a sysfs entry for it.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>