Message ID | 167933036526.5837.17795357929902595060.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1329043wrt; Mon, 20 Mar 2023 10:07:21 -0700 (PDT) X-Google-Smtp-Source: AK7set8UBysLF2KPxVQichRBGy8ss8CT2znyqHdw7hbl83oweB+qYF9lABL+m5Ix3ywZyTWq9Agr X-Received: by 2002:a17:902:db0e:b0:19a:b869:f2f8 with SMTP id m14-20020a170902db0e00b0019ab869f2f8mr22522607plx.21.1679332040709; Mon, 20 Mar 2023 10:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679332040; cv=none; d=google.com; s=arc-20160816; b=RXuFFEdu0CfuU5t3SYeWAhCZv5QBSeEVcf6v3u9ffizDTLCsAvf1HTVDwH5OnZbmYJ MmUjNM+fviQZOQ1Cu1uoWC2P6/3Bqg1Qufq69GWWG5JVfpaK23/su/IT7QJpvWqzWAos J7vP0JOTAYlLLHn6NvzdJ0wO38fFFe3EYkZp8XGnzICK6Dkzi0UT9ftuFwLg3tvWnStj 0HoF0cXvmo7H9V0opxlxQg2P5MLKcHzTnfBcTe1ToObfSVi/nK4NNhPYL54nQLQZdtSA F24R96AeZVv2Q463nrZHHkoYt94zNhAh/kap50viZAMmeo5uYvaTJipN0YwFZqLz2c+z xXLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=yoZLOt43Nj4HcPAR6MnnHHxjOvqvURzyMrfyzfY3TWk=; b=lqAQeegf8C2Ru7KjtgxFsskvUfZuLIYFgkBTrLJ/x5RFSqLjPAn3OlPsiiEZgCcjTq 7WuNBqOkDTJQgCj0MIcUloGl4R37WEZk6+k4ZZzX+QvwuaBRISqVEAXaBJgPhh5H1OHp bsnQvy47JAD+qcSgrRjtYgMw6jtZqHaQ1RsxiTxG/rPifOOo1H3NTWmAGInvu69xaRRY xD1gN5SFmzyYDkMT6v27+XSEvKgEsFwG3YhbxNQMnTMwSng370C/hygcjeOB6If7vT8d iDRyilwv+4MiSsaaOTJK0aNnWLhn8WHpqTja3wQ0XAvv5ipLw7YNRp8fsaciU9n6/Tfy K80A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=t4kLOQd0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg11-20020a1709028e8b00b0019ad44844b3si10410043plb.118.2023.03.20.10.07.05; Mon, 20 Mar 2023 10:07:20 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=t4kLOQd0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233207AbjCTQyI (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Mon, 20 Mar 2023 12:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233119AbjCTQxf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Mar 2023 12:53:35 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ACAE26864; Mon, 20 Mar 2023 09:45:41 -0700 (PDT) Date: Mon, 20 Mar 2023 16:39:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679330365; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yoZLOt43Nj4HcPAR6MnnHHxjOvqvURzyMrfyzfY3TWk=; b=t4kLOQd0b/+DTYAAZVhw22iJIwtUwcGq9+2OLL4bS++hK1xw3cBJ5kw32n23WKblx5s9co JqpY0Su6/xGH7cWX1Cespmfawka7LTPXckSZHbE8phFWAI8HVDRSZMPKGZoLgWN8abItF6 8H1zRSxmREyzACoJmT/ei97gLOyDoelmaQdAZIkwTRcNr5eSjvn5r6vb3WyVosdc0oyaGU v9DJ+0IaqyaYBy9QwQ/n2i0gBz0yDbYyg/skANq4b7WRZdHBUaKVMpzX+gL9LVsEs+aTvA AirODSfcG/VvZ7ENhY6bToWeuTkiShWlRDLXdBnFNPpWeHydQMXGILh8qFPqoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679330365; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yoZLOt43Nj4HcPAR6MnnHHxjOvqvURzyMrfyzfY3TWk=; b=UsNBxfnN8/+KX+Jhufhmpb772ZPQzIBXQ/aMwAX+fUX5/VdAoSpmhehLmizpqfP/HRvmSr rQaQTLh7zNzF5cAg== From: "tip-bot2 for Rick Edgecombe" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/shstk] mm/mmap: Add shadow stack pages to memory accounting Cc: "Yu-cheng Yu" <yu-cheng.yu@intel.com>, Rick Edgecombe <rick.p.edgecombe@intel.com>, Dave Hansen <dave.hansen@linux.intel.com>, "Borislav Petkov (AMD)" <bp@alien8.de>, Kees Cook <keescook@chromium.org>, "Mike Rapoport (IBM)" <rppt@kernel.org>, David Hildenbrand <david@redhat.com>, Pengfei Xu <pengfei.xu@intel.com>, John Allen <john.allen@amd.com>, x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <167933036526.5837.17795357929902595060.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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?1760907273677570781?= X-GMAIL-MSGID: =?utf-8?q?1760907273677570781?= |
Series |
[tip:,x86/shstk] mm/mmap: Add shadow stack pages to memory accounting
|
|
Commit Message
tip-bot2 for Thomas Gleixner
March 20, 2023, 4:39 p.m. UTC
The following commit has been merged into the x86/shstk branch of tip: Commit-ID: 4c8e07c3b6db4a514b03f2f2455e81e512d2f785 Gitweb: https://git.kernel.org/tip/4c8e07c3b6db4a514b03f2f2455e81e512d2f785 Author: Rick Edgecombe <rick.p.edgecombe@intel.com> AuthorDate: Sat, 18 Mar 2023 17:15:17 -07:00 Committer: Dave Hansen <dave.hansen@linux.intel.com> CommitterDate: Mon, 20 Mar 2023 09:01:10 -07:00 mm/mmap: Add shadow stack pages to memory accounting 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. Co-developed-by: Yu-cheng Yu <yu-cheng.yu@intel.com> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Mike Rapoport (IBM) <rppt@kernel.org> Acked-by: David Hildenbrand <david@redhat.com> Tested-by: Pengfei Xu <pengfei.xu@intel.com> Tested-by: John Allen <john.allen@amd.com> Tested-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/all/20230319001535.23210-23-rick.p.edgecombe%40intel.com --- mm/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h index 7920a8b..2e9f313 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -491,14 +491,14 @@ static inline bool is_exec_mapping(vm_flags_t flags) } /* - * Stack area - automatically grows in one direction + * Stack area (including shadow stacks) * * VM_GROWSUP / VM_GROWSDOWN VMAs are always private anonymous: * do_mmap() forbids all other combinations. */ static inline bool is_stack_mapping(vm_flags_t flags) { - return (flags & VM_STACK) == VM_STACK; + return ((flags & VM_STACK) == VM_STACK) || (flags & VM_SHADOW_STACK); } /*