Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757318AbcCUTka (ORCPT ); Mon, 21 Mar 2016 15:40:30 -0400 Received: from one.firstfloor.org ([193.170.194.197]:37967 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754669AbcCUTk3 (ORCPT ); Mon, 21 Mar 2016 15:40:29 -0400 Date: Mon, 21 Mar 2016 20:40:27 +0100 From: Andi Kleen To: Andy Lutomirski Cc: Andi Kleen , X86 ML , "linux-kernel@vger.kernel.org" Subject: Re: Updated version of RD/WR FS/GS BASE patchkit Message-ID: <20160321194027.GB5083@two.firstfloor.org> References: <1458576969-13309-1-git-send-email-andi@firstfloor.org> <20160321190322.GZ5083@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 33 > You're adding an hwcap bit because you expect user code to use this > thing, which means you're adding an ABI, which means that the > semantics should be given due consideration. Right I did that and concluded the existing semantics are fine. They also worked fine for many years with the system call. We have two different modi: - Code uses old FS/GS selector, gs selector is not zero In this case the selector base in GDT/LDT takes preference. This is legacy, but still works fine. - Code uses 64bit base, either through arch_prctl or the new instructions. In this case FS/GS selector has to be zero. This is the new expected mode for 64bit code. With the new instructions the modi can be temporarily out of sync (GS/FS != 0, but a different base loaded), but will always be reset on the next context switch. Your previous objection was that this allows to detect context switches, but that's already possible in other ways so I think it's a red hering. Also if you really want to change it you can do so in a followon patch under your own name. -Andi -- ak@linux.intel.com -- Speaking for myself only.