[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170328145413.GA3164@redhat.com>
Date: Tue, 28 Mar 2017 16:54:13 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Denys Vlasenko <dvlasenk@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Jan Kratochvil <jan.kratochvil@...hat.com>,
Pedro Alves <palves@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
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.
Powered by blists - more mailing lists