[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200221152843.rxz4ptfi5lh3udud@isilmar-4.linta.de>
Date: Fri, 21 Feb 2020 16:28:44 +0100
From: Dominik Brodowski <linux@...inikbrodowski.net>
To: Brian Gerst <brgerst@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
the arch/x86 maintainers <x86@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH 0/5] Enable pt_regs based syscalls for x86-32 native
On Fri, Feb 21, 2020 at 08:15:19AM -0500, Brian Gerst wrote:
> On Fri, Feb 21, 2020 at 2:07 AM Dominik Brodowski
> <linux@...inikbrodowski.net> wrote:
> >
> > Brian,
> >
> > On Fri, Feb 21, 2020 at 12:09:29AM -0500, Brian Gerst wrote:
> > > This patch series cleans up the x86 syscall wrapper code and converts
> > > the 32-bit native kernel over to pt_regs based syscalls.
> >
> > thanks for your patchset. Could you explain a bit more what the rationale
> > is. Due to asmlinkage, it doesn't leak "random user-provided register
> > content down the call chain" (as was the case for x86-64). But it may be
> > cleaner, and you mention in patch 5/5 that the new way is "a bit more
> > efficient" -- do you have numbers?
>
> The main rationale for this patch set is to make the 32-bit native
> kernel consistent with the 64-bit kernel. It's also slightly more
> efficient because the old code pushed all 6 arguments onto the stack
> whereas the new code only reads the args the syscall needs, with the
> pt_regs pointer passed in through a register. By efficient I mean
> that it uses fewer instructions and stack accesses, not that it will
> actually have a significant difference on a benchmark.
OK, could you add such an explanation to the patchset then, please? Thanks,
Dominik
Powered by blists - more mailing lists