Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp961001imm; Fri, 22 Jun 2018 08:07:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIQzHOBi39wjvGkTFwT+Ramj4CJhwU+IPZu8B97iSw9BdBwXu7IQfsqbjZcS0moCAzK8rHN X-Received: by 2002:a63:7f51:: with SMTP id p17-v6mr1781311pgn.36.1529680040954; Fri, 22 Jun 2018 08:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529680040; cv=none; d=google.com; s=arc-20160816; b=TIGehQ1dAg23HdhLq+h6MWUbRk0P5qawAWZ6iC6fErpI2Qqu7Qi1ISKGRQMTzCizQW zYPfLJW1DHh8AX5GAt4s0whAET6pyyXNzbbMKn9ijg38f2+Guak+TRftXVmN1M+VcQ2N 1nPzjsZ/u2d6cokVIBy66DLIlG3qFXydc80t4+NPc8cHyPLM1ePCh12m9ZT+fIekJNrI SvdxVS0/yD2vy9H5OQIavyzFtqTV6MoEG0M6vkbnf46IK2JhadTyqtJv9opOM87vhgeJ vtjORLuEYn2zekuU1yUTwC8tPQZPVEl6qHXAV8eawgUo/4UJPz3wmRvtMvwjE3mCFOme /WDw== 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=13u7ndG1dxsoP1aHVmnQEgkefBp3NGz0wXy1g7KgVrQ=; b=kCmDqnrKwQYwgPUSSZxKCtOsgW5mc43iq233MV6aqRos/Xr03wud+UAVhdn4iYCGPx t33Hbu/o+tPmw+tAUt3O3aZBqNlMBodbIIJZdVO56jcA4MheLr2feYuH0npKZO3Rz1wQ 4HsI1Pm8Opm0N+Xhpu0ZxtGFVE7f99alaJRUdHg9V8ichS2BsH3wYWNzlsGgyxVI/zE6 gGRxnzhPPfu5i5eroOyiuCN5a/Ag0n8DF34BePZG5IS6+np+EYshtA9RyZqmYC+Bohnh P280yY+7cocnYHwTC+IXDi7vfFNgR6KCQPye6mtRZb3J9NpJRTmu1xkMKev9vRdCqz1T qfjg== 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 i6-v6si6585037pgt.470.2018.06.22.08.06.58; Fri, 22 Jun 2018 08:07:20 -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 S1754333AbeFVPGG convert rfc822-to-8bit (ORCPT + 99 others); Fri, 22 Jun 2018 11:06:06 -0400 Received: from terminus.zytor.com ([198.137.202.136]:32967 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbeFVPGF (ORCPT ); Fri, 22 Jun 2018 11:06:05 -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 w5MF5wmo112570 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 22 Jun 2018 08:05:59 -0700 Date: Fri, 22 Jun 2018 08:05:52 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <20180621211754.12757-1-h.peter.anvin@intel.com> <20180621211754.12757-8-h.peter.anvin@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v3 7/7] x86/ldt,ptrace: provide regset access to the LDT To: Andy Lutomirski , "H. Peter Anvin" CC: LKML , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Andrew Lutomirski , "Bae, Chang Seok" , "Metzger, Markus T" From: hpa@zytor.com Message-ID: <8991CF11-DDE0-4E93-B913-82968DCFB661@zytor.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On June 22, 2018 7:49:13 AM PDT, Andy Lutomirski wrote: >On Thu, Jun 21, 2018 at 2:18 PM H. Peter Anvin, Intel > wrote: >> >> From: "H. Peter Anvin" >> >> Provide ptrace/regset access to the LDT, if one exists. This >> interface provides both read and write access. The write code is >> unified with modify_ldt(); the read code doesn't have enough >> similarity so it has been kept made separate. > >For this and for the GDT, you've chosen to use struct user_desc as >your format instead of using a native hardware descriptor format. Any >particular reason why? If nothing else, it will bloat core files a >bit more than needed. I did because REGSET_TLS was implemented that way, and that is simply a subset of the GDT (which made the same code trivially applicable to both.) modify_ldt() does it *both* ways for extra fun (one for reading, and one for writing.) ->active is defined as "beyond this point the regset contains only the default value", which seemed appropriate in this case. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.