Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2727739imm; Wed, 3 Oct 2018 08:17:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Ur80WtfGxuzp7VPZczEU1yuU7u0b+EGizx8vxxVAPv+o7/3GCjBg6HObqsH31De1JvATj X-Received: by 2002:a62:c957:: with SMTP id k84-v6mr2143685pfg.205.1538579852628; Wed, 03 Oct 2018 08:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538579852; cv=none; d=google.com; s=arc-20160816; b=qJk119rfH62iGx0uZGqu/zer/dSwZAE/JWgh9pUx+IvNLpuXwpQsy8ook4QrhmIvB7 8Pvz5SdHemAJR7PYW1yffE9KMfr+xIFgsTRCJMC7MEWg9ajKYuXgJBKn7l/8a+7aUztR LHs8lKuo9/QagGh0yS5eJDbKFxW2VcOwDHuNCY3DHEtzx3ykRLhGNt8R6GwBiXEKvV8R yLgh33aXnbuWpJ6/fmlAgkZ64CfuHmPRgpzStD4nD2wqpxNsWnk6C7x4Rqq0CD/k/Rtm aWlEnEAQWSBXo8yLj6OJZN5NCoA/ra0zGBkv9LDShrrNQElfNQPoy96fymREw3ydSmRw E4KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=/coWZ2un/Bsf4RmJ0cxmIZQ1Fw89aH1AEuCpltM6gcs=; b=ef+7aV7O6UGyGmyo00nA45uMkIDPUErYL5Zd/vNR4X0DaCa7NH/eRfSFEEi30/155N FjOfIX7OgFYYoYJ4/0iY0mrLW27HAj35JCfQnEspDcMSxaaPU0CNw2tdLHNvlwiteaJN OKe+2eHHF9F5UsSQrdg7enifQb7KEnwcbIwV3gT6lbKME6dVSNlb8d10pnpL+dS9xtUi A1wQxPxAgy/KpKJU3oEpZ/TCw8vafT1Kdg30GnIWuYWQHSCQzfZvHu+R/zcEfak02oSp 0M6WEpbhXuoqv/afW3av1FhMXbR7zWRO1ffEkBYgbZhnbDFbyVyCD/hXTRAtsQxpeMA9 SmNw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22-v6si1645997pgh.340.2018.10.03.08.17.17; Wed, 03 Oct 2018 08:17: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbeJCWGA (ORCPT + 99 others); Wed, 3 Oct 2018 18:06:00 -0400 Received: from mga18.intel.com ([134.134.136.126]:13896 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbeJCWF7 (ORCPT ); Wed, 3 Oct 2018 18:05:59 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2018 08:17:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,336,1534834800"; d="scan'208";a="78169137" Received: from 2b52.sc.intel.com ([143.183.136.147]) by orsmga007.jf.intel.com with ESMTP; 03 Oct 2018 08:17:08 -0700 Message-ID: Subject: Re: [RFC PATCH v4 18/27] x86/cet/shstk: User-mode shadow stack support From: Yu-cheng Yu To: Eugene Syromiatnikov Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue Date: Wed, 03 Oct 2018 08:12:29 -0700 In-Reply-To: <20181003150754.GC32759@asgard.redhat.com> References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-19-yu-cheng.yu@intel.com> <20181003150754.GC32759@asgard.redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-10-03 at 17:08 +0200, Eugene Syromiatnikov wrote: > On Fri, Sep 21, 2018 at 08:03:42AM -0700, Yu-cheng Yu wrote: > > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > > index 5ea1d64cb0b4..b20450dde5b7 100644 > > --- a/fs/proc/task_mmu.c > > +++ b/fs/proc/task_mmu.c > > @@ -652,6 +652,9 @@ static void show_smap_vma_flags(struct seq_file *m, > > struct vm_area_struct *vma) > > [ilog2(VM_PKEY_BIT4)] = "", > > #endif > > #endif /* CONFIG_ARCH_HAS_PKEYS */ > > +#ifdef CONFIG_X86_INTEL_SHADOW_STACK_USER > > + [ilog2(VM_SHSTK)] = "ss" > > +#endif > > It's probably makes sense to have this hunk as a part of "x86/cet/shstk: > Add Kconfig option for user-mode shadow stack", where VM_SHSTK was > initially introduced. Yes, move it to "mm/Introduce VM_SHSTK for shadow stack memory". Yu-cheng