Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 26 Jan 2018 18:07:22 +0000
From: Al Viro <>
To: Linus Torvalds <>
Cc: Andy Lutomirski <>, Alan Cox <>,
	David Laight <>,
	the arch/x86 maintainers <>,
	LKML <>,
	Greg Kroah-Hartman <>,
	Jann Horn <>,
	Samuel Neves <>,
	Dan Williams <>,
	Kernel Hardening <>,
	Borislav Petkov <>
Subject: Re: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast
 path with retpolines on

On Fri, Jan 26, 2018 at 09:40:23AM -0800, Linus Torvalds wrote:
> On Fri, Jan 26, 2018 at 7:57 AM, Andy Lutomirski <> wrote:
> >
> > I gave the rearrangement like this a try yesterday and it's a bit of a
> > mess.  Part of the problem is that there are a bunch of pieces of code
> > that expect sys_xyz() to be actual callable functions.
> That's not supposed to be a mess.
> That's part of why we do that whole indirection through SYSC##xyz to
> sys##_xyz: the asm-callable ones will do the full casting of
> troublesome arguments (some architectures have C calling sequence
> rules that have security issues, so we need to make sure that the
> arguments actually follow the right rules and 'int' arguments are
> properly sign-extended etc).
> So that whole indirection could be made to *also* create another
> version of the syscall that instead took the arguments from ptregs.
> We already do exactly that for the tracing events: look how
> FTRACE_SYSCALLS ends up creating that extra metadata.
> The ptreg version should be done the same way: don't make 'sys_xyz()'
> take a struct ptregs, instead make those SYSCALL_DEFINE*() macros
> create a _new_ function called 'ptregs_xyz()' and then that function
> does the argument unpacking.
> Then the x86 system call table can just be switched over to call those
> ptreg versions instead.

Umm...  What about other architectures?  Or do you want SYSCALL_DEFINE...
to be per-arch?  I wonder how much would that "go through pt_regs" hurt
on something like sparc...

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.