mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Brian Gerst <brgerst@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Borislav Petkov <bp@alien8.de>,
	Andy Lutomirski <luto@amacapital.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-tip-commits@vger.kernel.org
Subject: Re: [PATCH] x86/asm/entry: (Re-)rename __NR_entry_INT80_compat_max to __NR_syscall_compat_max
Date: Mon, 8 Jun 2015 23:45:05 +0200	[thread overview]
Message-ID: <20150608214505.GA30566@gmail.com> (raw)
In-Reply-To: <CAMzpN2hek3S7A1akUHGzge2HBzReQQnK7TcmvZrd5p1kjF=coQ@mail.gmail.com>


* Brian Gerst <brgerst@gmail.com> wrote:

> On Mon, Jun 8, 2015 at 3:25 PM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Brian Gerst <brgerst@gmail.com> wrote:
> >
> >> > diff --git a/arch/x86/entry/syscall_32.c b/arch/x86/entry/syscall_32.c
> >> > index 3777189..e398d03 100644
> >> > --- a/arch/x86/entry/syscall_32.c
> >> > +++ b/arch/x86/entry/syscall_32.c
> >> > @@ -10,7 +10,7 @@
> >> >  #else
> >> >  #define SYM(sym, compat) sym
> >> >  #define ia32_sys_call_table sys_call_table
> >> > -#define __NR_ia32_syscall_max __NR_syscall_max
> >> > +#define __NR_entry_INT80_compat_max __NR_syscall_max
> >> >  #endif
> >>
> >> This change doesn't look intended.  __NR_ia32_syscall_max is used by
> >> all compat entry points, not just INT80,
> >
> > Indeed!
> >
> > How about the patch below?
> >
> > Thanks,
> >
> >         Ingo
> >
> > ================>
> > From 42b9d9a463bfb7252ede4eac24e50a4f013c6717 Mon Sep 17 00:00:00 2001
> > From: Ingo Molnar <mingo@kernel.org>
> > Date: Mon, 8 Jun 2015 21:20:26 +0200
> > Subject: [PATCH] x86/asm/entry: (Re-)rename __NR_entry_INT80_compat_max to __NR_syscall_compat_max
> >
> > Brian Gerst noticed that I did a weird rename in the following commit:
> >
> >    b2502b418e63 ("x86/asm/entry: Untangle 'system_call' into two entry points: entry_SYSCALL_64 and entry_INT80_32")
> >
> > which renamed __NR_ia32_syscall_max to __NR_entry_INT80_compat_max.
> >
> > Now the original name was a misnomer, but the new one is a misnomer as well,
> > as all compat syscall ABIs (such as x32) share the system call table, not just
> > INT80 based ones.
> 
> Not quite true.  X32 is really an extension of the 64-bit ABI to support the 
> ILP32 data model.  It uses the 64-bit SYSCALL entry point and table, but with 
> different syscall numbers for the syscalls that need 32-bit pointer handling in 
> data structures.
> 
> So, __NR_syscall_compat_max is only for the 32-bit ABI compat syscall entries 
> (int80, sysenter, and syscall from 32-bit mode), and not X32.

Indeed, and I knew this...

Fixed the brainfart in the changelog.

Thanks,

	Ingo

      reply	other threads:[~2015-06-08 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-2cd23553b488589f287457b7396470f5e3c40698@git.kernel.org>
2015-06-08 13:46 ` [tip:x86/asm] x86/asm/entry: Rename compat syscall entry points Brian Gerst
2015-06-08 19:25   ` [PATCH] x86/asm/entry: (Re-)rename __NR_entry_INT80_compat_max to __NR_syscall_compat_max Ingo Molnar
2015-06-08 21:18     ` Brian Gerst
2015-06-08 21:45       ` Ingo Molnar [this message]

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=20150608214505.GA30566@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome