From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Denys Vlasenko <dvlasenk@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Kees Cook <keescook@chromium.org>, Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org,
Alexei Starovoitov <ast@plumgrid.com>,
Oleg Nesterov <oleg@redhat.com>, Will Drewry <wad@chromium.org>,
Andy Lutomirski <luto@amacapital.net>,
Steven Rostedt <rostedt@goodmis.org>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86/asm/entry/32: Rename labels in INT 0x80 code path
Date: Mon, 8 Jun 2015 07:35:37 +0200 [thread overview]
Message-ID: <20150608053537.GA18307@gmail.com> (raw)
In-Reply-To: <CA+55aFyuRgUL4k2Q6aXiqK-nbrwT=vbX2dfu8r9Xb8D1CNKK2w@mail.gmail.com>
* Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Jun 7, 2015 11:42 AM, "Denys Vlasenko" <dvlasenk@redhat.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
next prev parent reply other threads:[~2015-06-08 5:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-07 18:41 [PATCH] x86/asm/entry/32: Rename labels in INT 0x80 code path Denys Vlasenko
[not found] ` <CA+55aFyuRgUL4k2Q6aXiqK-nbrwT=vbX2dfu8r9Xb8D1CNKK2w@mail.gmail.com>
2015-06-08 5:35 ` Ingo Molnar [this message]
2015-06-08 14:47 ` Brian Gerst
2015-06-08 19:14 ` Ingo Molnar
2015-06-08 19:17 ` Andy Lutomirski
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=20150608053537.GA18307@gmail.com \
--to=mingo@kernel.org \
--cc=ast@plumgrid.com \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=wad@chromium.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox