Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp656486pxk; Thu, 3 Sep 2020 09:16:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVf/AaGNy5sQgzXkPQTag4CkN9Mw65hyYMAPijICgc1qRnsVnLuB8qb2dFzIm8EBw04wHC X-Received: by 2002:a17:906:82d1:: with SMTP id a17mr2862273ejy.385.1599149804657; Thu, 03 Sep 2020 09:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599149804; cv=none; d=google.com; s=arc-20160816; b=Jfge++ha30lST+07Lh4Y4W52yytkOlrrHxZcLNpNnRfqiJXVPSaXVmByi43qlaGcte ri+9GoIY6pZhN1XLlxrlRkufuHbCLHvF5IMYAP5isT6Ve4P6lgUWMSuA4aJzw2Aay/3F mhKhoNPFA7ZGqCy5mu4S47uaN5PBraAOCjn3IDYMuRzBJ94tHT7E0zvgP/5U6elRtVxS TRJZkDVlV/LvBIlbRkl++2Kl5L/pE8qglxILsvoNQI7VPQouoe4wWekdSs8/5q/5ZFs2 dCRgPyclaP0PJ/TbVSCmRo3rgvXofCe1617PrB2rwPZjrMj9mJHsOFP+rgYogHCQ1xf+ BK4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zGNTmJqKLsg38rx0KOswpd3oNMePUks3zhw3VyCYRnE=; b=awoNq3HIXfoS0NmYU3stHeu84y9U3RL3T8IwHnd+9XqiJDrEZiqDnH48eElrrZcZB7 98UL59wx7UA9BsvNcZFsyOtFvB80jvME7RbURhHs0QdWKxcl4J9ygDBLSdspxwKL47jp p4c4DwLSV49NHezyP7+ZHJICkDj2j5rLLMtfywlPa65rEB0gUaOpCq1FCe2JA1qygMO0 nFIVa5bROn5SNywb1ptCBrbEmij4P8gbEH1FUfvQaFZNdEW/tG9YgrE0F+evKT8Ptcht BHNqQs5sdxEuk57vZ0JPtiWqaWhL/h1VXFfWqVFAgp7EIalz8XuQy68xMJZ433ahESiA 3kQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HUHyfNda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1580686edp.33.2020.09.03.09.16.22; Thu, 03 Sep 2020 09:16:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HUHyfNda; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728085AbgICQPl (ORCPT + 99 others); Thu, 3 Sep 2020 12:15:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:42020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728294AbgICQPj (ORCPT ); Thu, 3 Sep 2020 12:15:39 -0400 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 520CB20C09 for ; Thu, 3 Sep 2020 16:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599149738; bh=M4de8VIlN5oGko56PdnQYFxQoRWoIZixfSOt8ZIRpmc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HUHyfNdaaBJXPriZlf3Ts2pJyj08I/ktPKdyfOn7ewAQ8zlUBn1eHxblXyok+MwmN Cn2QhTZnlkuJ0mfrATrWHnY35H3F9z4nd+P2u4UtlnIOm7OtR6ZH+dIl0N99ifRiOE dfYckGpTHxSmqtAurJcSq4FJh0Zga6d3lGbOhCqg= Received: by mail-wr1-f43.google.com with SMTP id x14so3820397wrl.12 for ; Thu, 03 Sep 2020 09:15:38 -0700 (PDT) X-Gm-Message-State: AOAM530FOxx16mrOC0c+YmYe8+394cViO/AGO3rJ1JbYIHFn4Ime55gB obDV0ptPEUpokjQortYSVrDCX+v6WivYiJaaYEAX8Q== X-Received: by 2002:a5d:5111:: with SMTP id s17mr3244344wrt.70.1599149736897; Thu, 03 Sep 2020 09:15:36 -0700 (PDT) MIME-Version: 1.0 References: <46e42e5e-0bca-5f3f-efc9-5ab15827cc0b@intel.com> <40BC093A-F430-4DCC-8DC0-2BA90A6FC3FA@amacapital.net> <88261152-2de1-fe8d-7ab0-acb108e97e04@intel.com> <1b51d89c-c7de-2032-df23-e138d1369ffa@intel.com> In-Reply-To: <1b51d89c-c7de-2032-df23-e138d1369ffa@intel.com> From: Andy Lutomirski Date: Thu, 3 Sep 2020 09:15:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v11 6/9] x86/cet: Add PTRACE interface for CET To: Dave Hansen Cc: "Yu, Yu-cheng" , Jann Horn , "the arch/x86 maintainers" , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , kernel list , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 3, 2020 at 9:12 AM Dave Hansen wrote: > > On 9/3/20 9:09 AM, Yu, Yu-cheng wrote: > > If the debugger is going to write an MSR, only in the third case would > > this make a slight sense. For example, if the system has CET enabled, > > but the task does not have CET enabled, and GDB is writing to a CET MSR. > > But still, this is strange to me. > > If this is strange, then why do we even _implement_ writes? Well, if gdb wants to force a tracee to return early from a function, wouldn't it want the ability to modify SSP? --Andy