Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932483AbcDHITB (ORCPT ); Fri, 8 Apr 2016 04:19:01 -0400 Received: from ppsw-32.csi.cam.ac.uk ([131.111.8.132]:55356 "EHLO ppsw-32.csi.cam.ac.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755381AbcDHIS6 (ORCPT ); Fri, 8 Apr 2016 04:18:58 -0400 X-Greylist: delayed 1054 seconds by postgrey-1.27 at vger.kernel.org; Fri, 08 Apr 2016 04:18:58 EDT X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Subject: Re: [Xen-devel] Does __KERNEL_DS serve a purpose? To: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" References: Cc: Borislav Petkov , kvm list , xen-devel From: Andrew Cooper Message-ID: <5707654F.1060407@citrix.com> Date: Fri, 8 Apr 2016 09:01:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 560 Lines: 16 On 08/04/2016 01:24, Andy Lutomirski wrote: > I can't see any reason that we need the __KERNEL_DS segment at all -- > I think that everything that uses __KERNEL_DS could use __USER_DS > instead. Am I missing anything? This has been bugging me for a > while. > > I mulled over this a bit when trying to understand the sysret_ss_attrs > bug and then forgot about it. Linux doesn't have a separate __KERNEL_SS. For the plain data segments, the dpl is not interesting. However, %ss is also loaded with __KERNEL_DS, and %ss.dpl is somewhat important. ~Andrew