Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751453AbbFHFfu (ORCPT ); Mon, 8 Jun 2015 01:35:50 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:32890 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbbFHFfm (ORCPT ); Mon, 8 Jun 2015 01:35:42 -0400 Date: Mon, 8 Jun 2015 07:35:37 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Denys Vlasenko , Frederic Weisbecker , Kees Cook , Borislav Petkov , linux-kernel@vger.kernel.org, Alexei Starovoitov , Oleg Nesterov , Will Drewry , Andy Lutomirski , Steven Rostedt , x86@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH] x86/asm/entry/32: Rename labels in INT 0x80 code path Message-ID: <20150608053537.GA18307@gmail.com> References: <1433702514-31086-1-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3317 Lines: 86 * Linus Torvalds wrote: > On Jun 7, 2015 11:42 AM, "Denys Vlasenko" 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/