diff options
author | Anton Blanchard <anton@samba.org> | 2009-07-16 15:15:52 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-18 11:21:29 +0200 |
commit | 413ee3b48ab582ffea33e7e140c7a2c5ea657e9a (patch) | |
tree | 3ecf161d9db15c95ba0a4d02aa18e243b796a04b /tools | |
parent | 23cdb5d5171d591ec911aada682e09d53c14a810 (diff) | |
download | op-kernel-dev-413ee3b48ab582ffea33e7e140c7a2c5ea657e9a.zip op-kernel-dev-413ee3b48ab582ffea33e7e140c7a2c5ea657e9a.tar.gz |
perf_counter: Make sure we dont leak kernel memory to userspace
There are a few places we are leaking tiny amounts of kernel
memory to userspace. This happens when writing out strings
because we always align the end to 64 bits.
To avoid this we should always use an appropriately sized
temporary buffer and ensure it is zeroed.
Since d_path assembles the string from the end of the buffer
backwards, we need to add 64 bits after the buffer to allow for
alignment.
We also need to copy arch_vma_name to the temporary buffer,
because if we use it directly we may end up copying to
userspace a number of bytes after the end of the string
constant.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090716104817.273972048@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions