Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2715596imm; Wed, 3 Oct 2018 08:08:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV60iiBKNSc53DZ/vnCvRP84IjIi3WrBUimS8hfkU5gBd5d/jNhaLYDqjQMFcOgscLdDdd7me X-Received: by 2002:a63:8742:: with SMTP id i63-v6mr1746879pge.27.1538579287076; Wed, 03 Oct 2018 08:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538579287; cv=none; d=google.com; s=arc-20160816; b=hrpxCbFz9/WJ7ygyzfmdIKoqDMcIeRHLbtQAf4r/0KP+dwUSIpMW1Ge+nBvIV06J1F F4ebi0P1mArBjzPI02mQR5oAuDNTOnAbJ5Fsbwbn+q7azK/5UXj7JVadqHnE3aRjTfWT OnqQP/pQPYLMwAh0GU4BUfARS/ixm41SPzJ2FJTeGPwfRNGdJyKGsQ+HFtVWOs1R6SgC 6V2YKOVHcwwqKeISQt+k7TrswepZT2jPIwrXD7+qubsOtXSoMNPvjGCMv3Y+eHI6GLRr CHkaoNtL22ZGl1yd2HPPclP67oIajOY6VhqaeNhrizxPeVFVmX37bRhndZBdw0RjkD3n L2qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0QsoM3vGtnoGsqzQFqE6pLG4i22PL4T+1S25TeGcVLg=; b=f/YrV6rWcIYRjVv+La+Ku6EOCmjeOsuGJu07U884zAMW/0eLQL8sBM9GuOKR5zUl4C VqLuNkfJhstS1mUsn4oEoVOVkmv2tWl/9ggZRCcAcsxPqbnT2SsLqqingn8YFoqUFaqA dsYCDp3N2+UoUGG5cWv/sryuPgl9lmLHScgiIsDOL0XkNhRbLiICJFYrlOnZ1rD8Nnpa lITYsKXvl7MoQVrtP4GFYCKIg+s8GkuVnVMNRr0XSrrKyoA81eJwIcz7eZegSAAn5sSr AKuadoCm4L+Ydiej/4iaAG07dZGkYSRlENwV1wncPELbklu725sVLlwlAmk7exdsg8W/ 5YUQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si1558457pgl.503.2018.10.03.08.07.50; Wed, 03 Oct 2018 08:08:07 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726971AbeJCV4b (ORCPT + 99 others); Wed, 3 Oct 2018 17:56:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50638 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726801AbeJCV4b (ORCPT ); Wed, 3 Oct 2018 17:56:31 -0400 Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E4DDCC05D41D; Wed, 3 Oct 2018 15:07:43 +0000 (UTC) Received: from asgard.redhat.com (ovpn-200-34.brq.redhat.com [10.40.200.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D67F83001659; Wed, 3 Oct 2018 15:07:34 +0000 (UTC) Date: Wed, 3 Oct 2018 17:08:03 +0200 From: Eugene Syromiatnikov To: Yu-cheng Yu 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 Subject: Re: [RFC PATCH v4 18/27] x86/cet/shstk: User-mode shadow stack support Message-ID: <20181003150754.GC32759@asgard.redhat.com> References: <20180921150351.20898-1-yu-cheng.yu@intel.com> <20180921150351.20898-19-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180921150351.20898-19-yu-cheng.yu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 03 Oct 2018 15:07:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.