lkml.org 
[lkml]   [2017]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[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.

\
 
 \ /
  Last update: 2017-03-28 17:07    [W:0.134 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site