Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp928727imm; Fri, 22 Jun 2018 07:38:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI8opsHFVOQR/UE4j2R9WYXzIJh2EIwkQt7PnLkDcQConJeubeP+ZRLjU/y/l+sjSlOjCEl X-Received: by 2002:a63:902:: with SMTP id 2-v6mr1647335pgj.3.1529678324354; Fri, 22 Jun 2018 07:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529678324; cv=none; d=google.com; s=arc-20160816; b=nQZRUwJLIbrJCAyMNIqt26j3G8Ys/bfMHcxuHnWRjcJAmvpkZKoDAY2UGMyrmHP0mK FUZCVJx9zdhHR3vcc6RYyHwJOkieh4PBJw/I8kW377HzJ71G1rqp9wKoIgTpTVHDbUol uhUP4p13YY+C35VVJ8RnbyLybcfF0v0/u625EnoY28MbeZRZ4eNh6V1febVKFSxKgZQy GPtgabyzia+qmK7AhUdZzfIOHze4oBcf9FBYsx/M/Xv0HQfdkhGkdLEVfcmjqOrkiMlJ 12V2BJC2Nof3HzHjMDe9OWmvtJZd+xcx00YnJpN4PHt8vBe/GEsuXHW9evOegvGj9Lb8 edhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=qn+rNn9N2AKhJsrYZC9QhTqLWm6nKoAEZ/AZYrBJZSQ=; b=OtZSJDeqjJ9/S3FyY8Y+Qdz3OrDOZlgXXXNDg7epTPy+8WAfu9vf+59O8roCiYp2Mn h7dkhipQoLAiMwokz4P5KQSwqQm/ckTQCDwjxbuUbdahnVXpU20iRXH3wvmiayGNl7wO XzGk47FdF18kdCfNINOCOP7iYvgZa3kqPjDHqFWGZEtS2bJvHS+OzmjT7iOL62W+WUzp sgJmnC3yTtk9m+PIx3kkFzX1IloqzPS/QDzDlG1mdGVRAwXhjE6r5w6HhDJ/wSzS87yR 58tsu9ChMR0TaYvB82M8XvV4JaN0ix/T4U9amUR/4ntpdyoNIu7gUMftpsYqK3oV/NA/ hvNA== 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 d88-v6si7659545pfl.297.2018.06.22.07.38.30; Fri, 22 Jun 2018 07:38:44 -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 S933629AbeFVOhY (ORCPT + 99 others); Fri, 22 Jun 2018 10:37:24 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:41848 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932170AbeFVOhW (ORCPT ); Fri, 22 Jun 2018 10:37:22 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fWNBa-0006ev-VD; Fri, 22 Jun 2018 16:37:15 +0200 Date: Fri, 22 Jun 2018 16:37:14 +0200 (CEST) From: Thomas Gleixner To: "Chang S. Bae" cc: Andy Lutomirski , "H . Peter Anvin" , Ingo Molnar , Andi Kleen , Dave Hansen , Markus T Metzger , Ravi Shankar , LKML Subject: Re: [PATCH v4 2/7] x86/fsgsbase/64: Make ptrace read FS/GS base accurately In-Reply-To: <1529536506-26237-3-git-send-email-chang.seok.bae@intel.com> Message-ID: References: <1529536506-26237-1-git-send-email-chang.seok.bae@intel.com> <1529536506-26237-3-git-send-email-chang.seok.bae@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Jun 2018, Chang S. Bae wrote: > From: Andy Lutomirski > > ptrace can read FS/GS base using the register access API > (PTRACE_PEEKUSER, etc) or PTRACE_ARCH_PRCTL. Make both of these > mechanisms return the actual FS/GS base. That's the 'BUG' fix, right? Ok, not something which needs to be urgently backported it seems. It's surely a correctness issue, which improved debugability, but surely not something crucial. So the right ordering of the patches is: 1) Introduce task_seg_base() as a standalong patch w/o using it. 2) Add the new fsgs helpers and use task_seg_base() right away instead of adding this misleading 'preserve bug' comment just to remove it one patch later. ..... Thanks, tglx