Message ID | 20230227222957.24501-18-rick.p.edgecombe@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2682681wrd; Mon, 27 Feb 2023 14:34:31 -0800 (PST) X-Google-Smtp-Source: AK7set9tl6tzeoHfSpvS2vRvX+oTp1Wi1ByjghU2525LoOTcVykQphHJxUAHALg0RTG3sm0P/DDE X-Received: by 2002:a17:906:b4f:b0:860:c12c:14f9 with SMTP id v15-20020a1709060b4f00b00860c12c14f9mr275674ejg.40.1677537271729; Mon, 27 Feb 2023 14:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677537271; cv=none; d=google.com; s=arc-20160816; b=HmKudB4SzO6buzGqdNen0yHZhb7f1Tl79EA9gaku4o8/46rLkmKUUKJLiufBDrdfqM /jJHmvPiVXwA6Cn/78jwrTGa3WTeZ4Rzy6XEe19MBFAwjuGBTsl/630Z5DRumUWJMRmY +MYO2Zg2vh2R6CpsIS7Ge/BJXkMN98WobwuZe7kzVOo037kUC0UzZVEf6R1sGPXu7PtV sbY8U4B+QXFey7UBJOt7ZAFtWPX6+SUIJZz1yU4FegONVxkNNU2eBQTzTQl1BAmXlxlj ssC9PKy8EqqhonxMF/50Sq0U73SYZyhS8Q3yZhhjCAmb9IcwrkpzWN5aXKeiwFqM4OUi V+OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=/86SfoVQQ8nfu81V3XQo7ipVqL9sa+8xwOyr++XyGK4=; b=l7zq/pfj09dgihWI8iaErUvzq06imRPoQ6Q53s2bEPj2BpS5EL5rNulBAeUKWpXW9U bkYglRINMCtvRLEoNaMMzZ03//D+UcgxZt24x2NpcV4st2IwvB0TV74NMz3YWd9hw6Uk ELk7VjL3VKKkqRdvNFRjUJtD5ztlz35rdC2Q9GgHYvKNffwzQ2tXguca46GbPJ3kQlFt UQBYc6Fxk5F20spb+p8chyHTwcUP5aLK7F6idwc523eyt53ZCI/8scEdBkaw9i1aNXdk 3F/mJbeNbO9rnJLQ13IdPHzCZbVXnb5DiV6PhFkbcn8semjzDGUBHa3jKsG2dRidUMim igKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OoTfc6kd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020a17090695d600b008ccc0fd3d13si795608ejy.348.2023.02.27.14.34.06; Mon, 27 Feb 2023 14:34:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OoTfc6kd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbjB0Wcv (ORCPT <rfc822;wenzhi022@gmail.com> + 99 others); Mon, 27 Feb 2023 17:32:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbjB0Wbs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Feb 2023 17:31:48 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D5529E2B; Mon, 27 Feb 2023 14:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677537104; x=1709073104; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=CMdfKd48MBBKKroi4bf9lEd66dWh8s6uGF9cifN2Nfs=; b=OoTfc6kdYcKTX4knrc6BeGGYIVKneFnoZmufcJoFBVejcoaZHi8sOKpb FTv4cmyawN2pYlVKiuRX7Mn6SXhCIcve99Z/UOyoyGnORMrHjAjWzmicY 9X1dPyQbBgpVneRQ0GGZjVytsys0k5EOQJyfduign+gdoOKjyQLfN28D1 UUasJGKRLTHsNdJGyYoUQ9sfQmH9L1egr8LBWoY09FlgmacmK/Iyg5sLj +j6ZON/LYcAIpEe+eRQc2h1WTv5yfgjn+PkXLJjr40UMeyHI6wjmIAbx/ jEwstLPEjN+TfX0Z2xhVMsy2h0qdEjtVygfNmM2qls3pL+rJuxwLK5sl0 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="313657425" X-IronPort-AV: E=Sophos;i="5.98,220,1673942400"; d="scan'208";a="313657425" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2023 14:31:23 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10634"; a="848024589" X-IronPort-AV: E=Sophos;i="5.98,220,1673942400"; d="scan'208";a="848024589" Received: from leonqu-mobl1.amr.corp.intel.com (HELO rpedgeco-desk.amr.corp.intel.com) ([10.209.72.19]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2023 14:31:19 -0800 From: Rick Edgecombe <rick.p.edgecombe@intel.com> To: x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, 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 <arnd@arndb.de>, Andy Lutomirski <luto@kernel.org>, Balbir Singh <bsingharora@gmail.com>, Borislav Petkov <bp@alien8.de>, Cyrill Gorcunov <gorcunov@gmail.com>, Dave Hansen <dave.hansen@linux.intel.com>, Eugene Syromiatnikov <esyr@redhat.com>, Florian Weimer <fweimer@redhat.com>, "H . J . Lu" <hjl.tools@gmail.com>, Jann Horn <jannh@google.com>, Jonathan Corbet <corbet@lwn.net>, Kees Cook <keescook@chromium.org>, Mike Kravetz <mike.kravetz@oracle.com>, Nadav Amit <nadav.amit@gmail.com>, Oleg Nesterov <oleg@redhat.com>, Pavel Machek <pavel@ucw.cz>, Peter Zijlstra <peterz@infradead.org>, Randy Dunlap <rdunlap@infradead.org>, Weijiang Yang <weijiang.yang@intel.com>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, John Allen <john.allen@amd.com>, kcc@google.com, eranian@google.com, rppt@kernel.org, jamorris@linux.microsoft.com, dethoma@microsoft.com, akpm@linux-foundation.org, Andrew.Cooper3@citrix.com, christina.schimpe@intel.com, david@redhat.com, debug@rivosinc.com Cc: rick.p.edgecombe@intel.com, Yu-cheng Yu <yu-cheng.yu@intel.com>, Peter Xu <peterx@redhat.com> Subject: [PATCH v7 17/41] mm: Move VM_UFFD_MINOR_BIT from 37 to 38 Date: Mon, 27 Feb 2023 14:29:33 -0800 Message-Id: <20230227222957.24501-18-rick.p.edgecombe@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230227222957.24501-1-rick.p.edgecombe@intel.com> References: <20230227222957.24501-1-rick.p.edgecombe@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759025321794858485?= X-GMAIL-MSGID: =?utf-8?q?1759025321794858485?= |
Series |
Shadow stacks for userspace
|
|
Commit Message
Edgecombe, Rick P
Feb. 27, 2023, 10:29 p.m. UTC
From: Yu-cheng Yu <yu-cheng.yu@intel.com> The x86 Control-flow Enforcement Technology (CET) feature includes a new type of memory called shadow stack. This shadow stack memory has some unusual properties, which requires some core mm changes to function properly. Future patches will introduce a new VM flag VM_SHADOW_STACK that will be VM_HIGH_ARCH_BIT_5. VM_HIGH_ARCH_BIT_1 through VM_HIGH_ARCH_BIT_4 are bits 32-36, and bit 37 is the unrelated VM_UFFD_MINOR_BIT. For the sake of order, make all VM_HIGH_ARCH_BITs stay together by moving VM_UFFD_MINOR_BIT from 37 to 38. This will allow VM_SHADOW_STACK to be introduced as 37. Tested-by: Pengfei Xu <pengfei.xu@intel.com> Tested-by: John Allen <john.allen@amd.com> Tested-by: Kees Cook <keescook@chromium.org> Acked-by: Mike Rapoport (IBM) <rppt@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Peter Xu <peterx@redhat.com> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com> Reviewed-by: Axel Rasmussen <axelrasmussen@google.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Cc: Peter Xu <peterx@redhat.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> --- include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h index af652444fbba..a1b31caae013 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -377,7 +377,7 @@ extern unsigned int kobjsize(const void *objp); #endif #ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR -# define VM_UFFD_MINOR_BIT 37 +# define VM_UFFD_MINOR_BIT 38 # define VM_UFFD_MINOR BIT(VM_UFFD_MINOR_BIT) /* UFFD minor faults */ #else /* !CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ # define VM_UFFD_MINOR VM_NONE