From: Joel Stanley Date: Thu, 24 Apr 2014 07:25:37 +0000 (+0930) Subject: powerpc/powernv: Check sysparam size before creation X-Git-Tag: omap-for-v3.16/pm-signed~36^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63aecfb20a6629f1ca91d7a052f87988ceb6dd53;p=pandora-kernel.git 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 Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed