Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753567AbbFHVTF (ORCPT ); Mon, 8 Jun 2015 17:19:05 -0400 Received: from mail-oi0-f51.google.com ([209.85.218.51]:33650 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753430AbbFHVS5 (ORCPT ); Mon, 8 Jun 2015 17:18:57 -0400 MIME-Version: 1.0 In-Reply-To: <20150608192547.GA11957@gmail.com> References: <20150608192547.GA11957@gmail.com> Date: Mon, 8 Jun 2015 17:18:56 -0400 Message-ID: Subject: Re: [PATCH] x86/asm/entry: (Re-)rename __NR_entry_INT80_compat_max to __NR_syscall_compat_max From: Brian Gerst To: Ingo Molnar Cc: "H. Peter Anvin" , Linux Kernel Mailing List , Denys Vlasenko , Peter Zijlstra , Borislav Petkov , Andy Lutomirski , Linus Torvalds , Thomas Gleixner , linux-tip-commits@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2120 Lines: 58 On Mon, Jun 8, 2015 at 3:25 PM, Ingo Molnar wrote: > > * Brian Gerst 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 > 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. -- Brian Gerst -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/