summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorNathan Lynch <nathanl@linux.ibm.com>2023-12-12 20:01:57 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2023-12-13 13:38:21 +0300
commit35aae182bd7b422be3cefc08c12207bf2b973364 (patch)
tree42b9db994df30b90293141e0a7d637eb3e443250 /scripts/gdb/linux/tasks.py
parent514f6ff4369a30bf0da71a1a09fd47b2fca5d76f (diff)
downloadlinux-35aae182bd7b422be3cefc08c12207bf2b973364.tar.xz
powerpc/pseries/papr-sysparm: Validate buffer object lengths
The ability to get and set system parameters will be exposed to user space, so let's get a little more strict about malformed papr_sysparm_buf objects. * Create accessors for the length field of struct papr_sysparm_buf. The length is always stored in MSB order and this is better than spreading the necessary conversions all over. * Reject attempts to submit invalid buffers to RTAS. * Warn if RTAS returns a buffer with an invalid length, clamping the returned length to a safe value that won't overrun the buffer. These are meant as precautionary measures to mitigate both firmware and kernel bugs in this area, should they arise, but I am not aware of any. Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-10-e9eafd0c8c6c@linux.ibm.com
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions