[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150608053537.GA18307@gmail.com>
Date: Mon, 8 Jun 2015 07:35:37 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Denys Vlasenko <dvlasenk@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Kees Cook <keescook@...omium.org>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org,
Alexei Starovoitov <ast@...mgrid.com>,
Oleg Nesterov <oleg@...hat.com>,
Will Drewry <wad@...omium.org>,
Andy Lutomirski <luto@...capital.net>,
Steven Rostedt <rostedt@...dmis.org>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86/asm/entry/32: Rename labels in INT 0x80 code path
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> On Jun 7, 2015 11:42 AM, "Denys Vlasenko" <dvlasenk@...hat.com> wrote:
> >
> > Rename it to ia32_int80_target.
>
> Btw, could we arrive to get rid of the idiotic "ia32" naming too? It's wrong,
> and it harkens back to the days when intel thought itanium makes sense and
> wanted to talk about "intel architecture".
Absolutely, I've been slowly eliminating uses of it - that naming is very
annoying.
Another thing I'm doing is to slowly remove references to 'emulation' - we don't
emulate 32-bit in any way, we implement various 32-bit syscall ABIs (old a new)
natively.
I'd like to remove CONFIG_IA32_EMULATION from the .config as well - it offers
nothing real over CONFIG_COMPAT.
> The platform is called x86, not ia32. And in this particular case, u suspect the
> important part isn't the x86 part, but the "compat" part - we damn well know
> we're x86, the important part is that this is the 32-bit compat entry point of a
> 64-bit kernel. No?
Totally. All strings of 'ia32' and 'IA32' will be gone in the long run except from
Intel specific MSR names or so.
> So "ia32" is just crazy, and the architecture is not in question anyway, why not
> name these things for the things that really matter?
Yeah. I wanted to rename all the entry points to be logical, and beyond removing
the nonsensical 'ia32' names I also wanted to make it clear what kind of
instruction's entry point they are.
For example whoever thought that 'ia32_cstar_target' is a proper name for the
primary 32-bit syscall entry point needs their head examined.
My (re-)naming plan is:
ia32_sysenter_target -> entry_SYSENTER_32
system_call (32) -> entry_INT80_32
system_call (64) -> entry_SYSCALL_64
ia32_cstar_target -> entry_SYSCALL_compat
ia32_syscall -> entry_INT80_compat
ia32_sysenter_target -> entry_SYSENTER_compat
The ideas behind this naming scheme is to:
- Make it really obvious, through a capitalized asm mnemonic, which particular
x86 CPU instruction a particular entry point corresponds to. People changing
that code should be absolutely aware of the various special properties these
instructions have.
- Harmonize the naming across the native 32-bit, 64-bit and compat space.
- Unconfuse the 32-bit and 64-bit logic where the 'system_call' entry point is
actually for two (starkly) different instructions.
- Remove the various ia32 prefixes that are sometimes denoting compat, sometimes
native 32-bit.
Another possibility would be:
ia32_sysenter_target -> entry_32_SYSENTER
system_call (32) -> entry_32_INT80
system_call (64) -> entry_64_SYSCALL
ia32_cstar_target -> entry_64_SYSCALL_compat
ia32_syscall -> entry_64_INT80_compat
ia32_sysenter_target -> entry_64_SYSENTER_compat
These names are typically only used in two places, so name length is not as
critical as for other function names.
And naming matters: a good name is both descriptive and short, as we know it from
the excellent examples of 'Linux' and 'Git'. Oh wait ...
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists