All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <brgerst@gmail.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH 0/5] Enable pt_regs based syscalls for x86-32 native
Date: Fri, 21 Feb 2020 08:15:19 -0500	[thread overview]
Message-ID: <CAMzpN2iQuaNdTdL6G1rGbUFo+r16iRFo1zbiD_VMrrjtGf0acw@mail.gmail.com> (raw)
In-Reply-To: <20200221060756.GA3368@light.dominikbrodowski.net>

On Fri, Feb 21, 2020 at 2:07 AM Dominik Brodowski
<linux@dominikbrodowski.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.

--
Brian Gerst

  reply	other threads:[~2020-02-21 13:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  5:09 [PATCH 0/5] Enable pt_regs based syscalls for x86-32 native Brian Gerst
2020-02-21  5:09 ` [PATCH 1/5] x86: Refactor syscall_wrapper.h Brian Gerst
2020-02-21  6:47   ` Dominik Brodowski
2020-02-21 14:05     ` Brian Gerst
2020-02-21  5:09 ` [PATCH 2/5] x86: Move 32-bit compat syscalls to common location Brian Gerst
2020-02-21  7:07   ` Dominik Brodowski
2020-02-21 13:41     ` Brian Gerst
2020-02-21 15:29       ` Dominik Brodowski
2020-02-21  5:09 ` [PATCH 3/5] x86-32: Enable syscall wrappers Brian Gerst
2020-02-21  7:05   ` Dominik Brodowski
2020-02-21  5:09 ` [PATCH 4/5] x86-64: Use syscall wrappers for x32_rt_sigreturn Brian Gerst
2020-02-21  6:56   ` Dominik Brodowski
2020-02-21  5:09 ` [PATCH 5/5] x86: Drop asmlinkage from syscalls Brian Gerst
2020-02-21  6:56   ` Dominik Brodowski
2020-02-21  6:07 ` [PATCH 0/5] Enable pt_regs based syscalls for x86-32 native Dominik Brodowski
2020-02-21 13:15   ` Brian Gerst [this message]
2020-02-21 15:28     ` Dominik Brodowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMzpN2iQuaNdTdL6G1rGbUFo+r16iRFo1zbiD_VMrrjtGf0acw@mail.gmail.com \
    --to=brgerst@gmail.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.