x86/signal/64: A better attempt at SS cleanup
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | x86/kvm: Rename VMX's segment access rights definesarch/ arch/ | +30 | 1 reply | |
| 2/3 | x86/signal/64: Try to preserve hardware SS across 64-bit signal deliveryarch/ arch/ | +50 | 5 replies | |
| 3/3 | x86/signal/64: Add explicit controls for sigcontext SS handlingarch/ arch/ arch/ +1 more | +80 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC/PATCH 0/3] x86/signal/64: A better attempt at SS cleanup
This is almost certainly not 4.2 material.
This applies to -linux before the sigcontext revert. If people like these, I'll rebase them on top of the revert and I'll do something about the UAPI build issue (if necessary -- renaming __pad0 may actually be fine).
This should allow new programs to opt in to sane SS handling. It makes signal delivery reliable in the face of weird SS values (it was unreliable before Linux 4.1, and it's unreliable again after the revert). Unlike the previous try, it should *not* break DOSEMU's hack to figure out what SS was at the time of signal delivery, at least in cases where DOSEMU wouldn't crash outright due to completely bogus SS values. Also unlike the previous try, it won't crash DOSEMU when DOSEMU invalidates the old SS from a signal handler but doesn't know to update the sigcontext.
The sigreturn_64 selftest is updated to use the new flag. It passes. For a real version of these patches, I'll add more tests to make sure that we get the weird corner cases right. (There are probably cases where this isn't quite right on Xen, too, but we might not care.)
Andy Lutomirski (3):
x86/kvm: Rename VMX's segment access rights defines x86/signal/64: Try to preserve hardware SS across 64-bit signal
delivery
x86/signal/64: Add explicit controls for sigcontext SS handling
arch/x86/include/asm/desc_defs.h | 23 +++++++++++ arch/x86/include/asm/sighandling.h | 1 - arch/x86/include/asm/vmx.h | 46 +++++++++++----------- arch/x86/include/uapi/asm/ucontext.h | 26 +++++++++--- arch/x86/kernel/signal.c | 70 ++++++++++++++++++++++++++++----- arch/x86/kvm/vmx.c | 14 +++---- tools/testing/selftests/x86/sigreturn.c | 26 ++++++++++++ 7 files changed, 160 insertions(+), 46 deletions(-)
Signature · 1 line
2.4.3