summaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-01 10:34:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-01 10:46:52 -0700
commit0083fc2c50e6c5127c2802ad323adf8143ab7856 (patch)
tree0ec735c46d8be4ae4c637243b126feba0be2ebe8 /lib/Makefile
parented680c4ad478d0fee9740f7d029087f181346564 (diff)
downloadop-kernel-dev-0083fc2c50e6c5127c2802ad323adf8143ab7856.zip
op-kernel-dev-0083fc2c50e6c5127c2802ad323adf8143ab7856.tar.gz
do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in the structure on 64-bit hosts, and that copying the structure from kernel to user space can leak information from the kernel stack in those padding bytes. Avoid the whole issue by just copying the three members one by one instead, which also means that the function also can avoid the need for a stack frame. This also happens to match how we copy the new structure from user space, so it all even makes sense. [ The obvious solution of adding a memset() generates horrid code, gcc does really stupid things. ] Reported-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Makefile')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud