]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/x86/sigreturn/32: Invalidate DS and ES when abusing the kernel
authorAndy Lutomirski <luto@kernel.org>
Wed, 20 Nov 2019 19:58:32 +0000 (11:58 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 21 Nov 2019 20:55:59 +0000 (21:55 +0100)
commitb6259ab2e892d78a95f8059f679a71dfd1555705
tree22cbeb0e35d67cd39a7b3d9bdb8550e3d535f322
parent2f044ddcac66e9783a6eab92968583d08db8b380
selftests/x86/sigreturn/32: Invalidate DS and ES when abusing the kernel

If the kernel accidentally uses DS or ES while the user values are
loaded, it will work fine for sane userspace.  In the interest of
simulating maximally insane userspace, make sigreturn_32 zero out DS
and ES for the nasty parts so that inadvertent use of these segments
will crash.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@kernel.org
tools/testing/selftests/x86/sigreturn.c