Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp318982imm; Thu, 21 Jun 2018 19:27:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIHHY8UPKIjRAs8N22TUmJIFj2I2VbzxYaN1dCTBtpV1bdCHskoy1SncZ5aHGmUyJ2YEevL X-Received: by 2002:a17:902:7688:: with SMTP id m8-v6mr30708820pll.54.1529634452159; Thu, 21 Jun 2018 19:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529634452; cv=none; d=google.com; s=arc-20160816; b=wfZdlyHFntOmKs1pOVEIuvk52Gvu8zw2zlmi8lxcvsHyEysc3MbC/0VIrF7AD0zCxU xs289QDw54Jo0Edg81X4LKcrRveIVcq4prKDmmN7WIKbRq6ejmW+zLZiCi7S/qu6nS7u pExqUY1UMsFZvXrbamys1ohAYlvtP7zytrcRiRdIE0fv18lA5SYX4Mp4807eQv1APuJ+ xo9Z74QAdz0CrC97E5f9nADlps9rixI7dQucsPEL/+PAFPezfzu5jwIMwzwI8Bph9V66 4CtnDdMYP6vLqClEAU/UCWVWsQJll0BAUP+Y0oPbZWn/v4XV90VlgN8BD6AIkASVc5r1 Qmhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:arc-authentication-results; bh=YQWv8nrTYQTHNle6824ttIKElJPyOsRjl/ShgUVIkp8=; b=uSYnE8CIPhUrKYuikgTBCMeRISnT9ElxUqeIX6trekhpS+MOLg/aqyxDgpnGY0Mrtt 8oAOFezyQvCEygcjuuqvgQEKEnS0c5rlg/VcCHs3YYsBXBEm4GO0RO1CzDrNBTyn5DFp KXJWJ9oqt5dJ/Aavd9uCGzPm7rIxXbyc6otlHBblJLni9m+jcMUvnesKCDtj+T7FkILl Vsn4Dugo6Mz2uugjT4ILewuaNuzJ91uX6nI5W5Q03ha7wmNlPAPC8J61WNHJ394TYaIE i0cOjNbEdyULjYEAkNhgN76zHB7+oNCAJ42SRv6k85nQDQb+9CYq4w+SARueLbcBgze0 GWTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5-v6si6909485pls.360.2018.06.21.19.27.16; Thu, 21 Jun 2018 19:27:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934242AbeFVCZ5 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 21 Jun 2018 22:25:57 -0400 Received: from terminus.zytor.com ([198.137.202.136]:47825 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933864AbeFVCZ4 (ORCPT ); Thu, 21 Jun 2018 22:25:56 -0400 Received: from wld62.hos.anvin.org (c-24-5-245-234.hsd1.ca.comcast.net [24.5.245.234] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w5M2PkbK4103957 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 21 Jun 2018 19:25:47 -0700 Date: Thu, 21 Jun 2018 19:25:39 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20180622015851.GA10254@gmail.com> References: <20180621211754.12757-1-h.peter.anvin@intel.com> <20180622015851.GA10254@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v3 0/7] x86/ptrace: regset access to the GDT and LDT To: Ingo Molnar , "H. Peter Anvin, Intel" CC: Linux Kernel Mailing List , "H. Peter Anvin" , Thomas Gleixner , Andy Lutomirski , "Chang S . Bae" , "Markus T . Metzger" , Linus Torvalds , Peter Zijlstra , Josh Poimboeuf From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On June 21, 2018 6:58:51 PM PDT, Ingo Molnar wrote: > >* H. Peter Anvin, Intel wrote: > >> From: "H. Peter Anvin" >> >> Give a debugger access to the visible part of the GDT and LDT. This >> allows a debugger to find out what a particular segment descriptor >> corresponds to; e.g. if %cs is 16, 32, or 64 bits. >> >> v3: >> Requalify LDT segments for selectors that have actually changed. >> >> v2: >> Add missing change to elf.h for the very last patch. >> >> Cc: Ingo Molnar >> Cc: Thomas Gleixner >> Cc: Andy Lutomirski >> Cc: Chang S. Bae >> Cc: Markus T. Metzger >> Cc: H. Peter Anvin >> >> arch/x86/Kconfig | 4 + >> arch/x86/include/asm/desc.h | 24 +++- >> arch/x86/include/asm/ldt.h | 16 +++ >> arch/x86/include/asm/segment.h | 10 ++ >> arch/x86/kernel/Makefile | 3 +- >> arch/x86/kernel/ldt.c | 283 >++++++++++++++++++++++++++++++++--------- >> arch/x86/kernel/ptrace.c | 103 ++++++++++++++- >> arch/x86/kernel/tls.c | 102 +++++---------- >> arch/x86/kernel/tls.h | 8 +- >> include/uapi/linux/elf.h | 2 + >> 10 files changed, 413 insertions(+), 142 deletions(-) > >Ok, this looks mostly good to me at a quick glance, but could you >please do one >more iteration and more explicitly describe where you change/extend >existing ABIs? > >I.e. instead of a terse and somewhat vague summary: > >> x86/tls,ptrace: provide regset access to the GDT >> >> Give a debugger access to the visible part of the GDT and LDT. This >> allows a debugger to find out what a particular segment descriptor >> corresponds to; e.g. if %cs is 16, 32, or 64 bits. > >Please make it really explicit how the ABI is affected, both in the >title and in >the description, and also _explain_ how this helps us over what we had >before, >plus also list limitations of the new ABI. > >I.e. something like: > > x86/tls, ptrace: Extend the ptrace ABI with the new REGSET_GDT method > > Add the new REGSET_GDT ptrace variant to PTRACE_{GET|SET}REGSET, > to give read and write access to the GDT: > >- Previously only certain parts of the GDT were visible, and only via >random >ABIs and instructions - there was no architectured access to all of it. > >- The SETREGSET variant is only allowed to change the TLS area of the >GDT. > >(or so.) > >This is important not just for documentation and library support >purposes, but >also to be able to review it properly, to match 'intent' to >'implementation'. > >(It might also help later on in finding bugs/quirks, if any.) > >Please do this for all patches in the series that change the ABI. > >Thanks, > > Ingo ACK. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.