Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753940AbbFSHIe (ORCPT ); Fri, 19 Jun 2015 03:08:34 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35333 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443AbbFSHI1 (ORCPT ); Fri, 19 Jun 2015 03:08:27 -0400 Date: Fri, 19 Jun 2015 09:08:21 +0200 From: Ingo Molnar To: Brian Gerst Cc: "H. Peter Anvin" , Linux Kernel Mailing List , Peter Zijlstra , Borislav Petkov , Thomas Gleixner , Andrew Morton , Linus Torvalds , Denys Vlasenko , Andy Lutomirski , linux-tip-commits@vger.kernel.org Subject: Re: [RFC] Rename various 'IA32' uses in arch/x86/ code Message-ID: <20150619070821.GA14768@gmail.com> References: <55808579.4050004@zytor.com> <20150618164912.GA8557@gmail.com> <20150618211318.GA3934@gmail.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: 2598 Lines: 61 * Brian Gerst wrote: > > Ok, so your goal is to allow the x32 ABI, but not 32-bit user-space? > > It just seems odd that x32 (which is really a 64-bit ABI with 32-bit pointers) > depended on enabling 32-bit support. Other than both using the core compat > code, they are not really related. Yeah. > > I suppose that makes some sense, it might be a valid 'attack surface > > reduction' technique, while still allowing the x32 ABI. > > > > But I'm not sure we should bother and complicate things: 32-bit compat isn't > > going away anytime soon, and most of CONFIG_COMPAT is needed for x32. > > Many of the compat syscalls are unused by x32. It only needs to handle syscalls > with pointers embedded in data structures differently than native 64-bit. Yeah, but in fact those are the 'most interesting' (read: most complex) aspects of the generic compat machinery. So most of the 'core compat' functionality is used - even though we don't use many of the (trivial) argument-converted syscall variants. > 64-bit integer arguments (ie., loff_t) do not need special handling, since they > can be passed in a single register instead of a pair of 32-bit registers. This > won't solve that particular issue yet, but it's something to be aware of for > future cleanups. Yes, and I think 'X32' is a misnomer in that sense: in reality it's a 90% 64-bit ABI that just happens to have a handful of additional system calls that can deal with data pointers truncated to 32 bits. So 'C64' would have been a better name: a compacted 64-bit ABI - but that particular name has its own problems ;-) Maybe S64 (small 64-bit memory model)? 'S64' would also have been an easier sell to distros: they generally resist adding anything that smells old, 32-bit ... but kernel hackers and marketing were always somewhat disjunct sets ;-) I'm wondering whether we'll ever see a 48-bit user-space pointer model ;-) They are misaligned by 32 bits, but x86 CPUs generally handle 32-bit misalignment just fine. The killer would be to zero-extend from 48 bits to 64 bits I suspect - there's no natural instruction for that. > > So maybe we could introduce CONFIG_X86_32_ABI=y or so, which would cover just > > the 32-bit entry code and the signal frame compatibility layer? > > Yes. Ok, then it sounds good to me! 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/