vsyscall tweaks
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 5 repliesIn review
Changes from RFC v2 from the cover letter
- Fix some more int 0xcc references.
- Add patches 2-4.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | x86-64: Allow emulated vsyscalls from user addressesarch/ arch/ arch/ +3 more | +95 | 2 replies | |
| 2/4 | x86: Remove unnecessary compile flag tweaks for vsyscall codearch/ arch/ | +0 | 0 replies | |
| 3/4 | x86-64: Wire up getcpu syscallarch/ | +2 | 0 replies | |
| 4/4 | Add vsyscalls to feature-removal-schedule.txtDocumentation/ | +14 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] vsyscall tweaks
With the new vsyscall emulation code, int 0xcc's behavior depends on where it is called from. A few dynamic instrumentation tools cleverly copy the instruction out of the vsyscall page and execute it, resulting in a segfault. This is nothing new: sysenter would die in a similar way (unless the code got lucky). The only examples I know of are pin and DynamoRIO -- valgrind is already smart enough not to recompile vsyscalls 0 and 1 and "smart" enough to crash unconditionally on vsyscall 2. I can't test pin because it refuses to run on newfangled things like Linux 3.0+ (and I don't want to muck with my kernel version to run a program that's broken anyway). Patch 1 in this series fixes DynamoRIO in limited testing.
Bug reports against valgrind and DynamoRIO exist, and I haven't managed to get permission to post to pin's message board yet.
The other three patches are minor. Patch 2 removes compile flags that are now unnecessary because vsyscall_64.c does not get called in user mode. Patch 3 wires up the getcpu syscall on x86-64 as further encouragement to stop using the vsyscall. Patch 4 adds a feature-removal-schedule.txt entry suggesting that vsyscalls might be disabled in some configurations some day.
x86 maintainers / Linus: feel free to drop any of patches 2-4. I think the getcpu syscall should be added, though, since it's rather odd to have a "syscall" in the vdso and the vsyscall page that can't be called the old-fashioned way.
Changes from RFC v2:
- Fix some more int 0xcc references.
- Add patches 2-4.
Andy Lutomirski (4):
x86-64: Allow emulated vsyscalls from user addresses
x86: Remove unnecessary compile flag tweaks for vsyscall code
x86-64: Wire up getcpu syscall
Add vsyscalls to feature-removal-schedule.txt
Documentation/feature-removal-schedule.txt | 14 +++ arch/x86/include/asm/irq_vectors.h | 11 ++- arch/x86/include/asm/traps.h | 8 ++- arch/x86/include/asm/unistd_64.h | 2 + arch/x86/kernel/Makefile | 13 --- arch/x86/kernel/entry_64.S | 4 +- arch/x86/kernel/traps.c | 14 +++- arch/x86/kernel/vsyscall_64.c | 131 ++++++++++++++-------------- arch/x86/kernel/vsyscall_emu_64.S | 6 +- 9 files changed, 111 insertions(+), 92 deletions(-)
Signature · 1 line
1.7.6