get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 25 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CSarch/ | +2 | 7 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS
Hello,
get_nr_restart_syscall() is still buggy, TS_I386_REGS_POKED can't really help and should probably die.
The fix just adds the __USER32_CS check, but perhaps we can avoid these "fundamentally broken" checks altogether?
Is __NR_ia32_restart_syscall/__NR_restart_syscall the part of ABI? OK, we probaly can't remove them, at least right now. But what if we simply add the new syscall number,
#define __NR_new_restart_syscall 383 #define __NR_ia32_new_restart_syscall 383
so that it doesn't depends on bitness and we can just do
static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs)
{
BUILD_BUG_ON(__NR_ia32_new_restart_syscall != __NR_new_restart_syscall);
#ifdef CONFIG_X86_X32_ABI
return __NR_new_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT);
#else
return __NR_new_restart_syscall;
#endif
}?
Oleg.