Message ID | 20230119212317.8324-10-rick.p.edgecombe@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3265C6379F for <linux-mm@archiver.kernel.org>; Thu, 19 Jan 2023 21:23:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 664476B0088; Thu, 19 Jan 2023 16:23:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EDE76B0089; Thu, 19 Jan 2023 16:23:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A2496B008C; Thu, 19 Jan 2023 16:23:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1E74F6B0088 for <linux-mm@kvack.org>; Thu, 19 Jan 2023 16:23:43 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id D89FD14030C for <linux-mm@kvack.org>; Thu, 19 Jan 2023 21:23:42 +0000 (UTC) X-FDA: 80372825484.21.0D7A960 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by imf27.hostedemail.com (Postfix) with ESMTP id DC42A4000C for <linux-mm@kvack.org>; Thu, 19 Jan 2023 21:23:40 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aU5e2BFy; spf=pass (imf27.hostedemail.com: domain of rick.p.edgecombe@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=rick.p.edgecombe@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674163421; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=SLtGihyn/x9FzqL6Gl9syvqGmcYAMPQwgzBEC4XQqQQ=; b=dxZJ/DiSo8ER7LpZT9c+5xhxfM1979HDJrhoVNIWZ53qx5yfMa2/evqWT9WCTG04LxtG58 BikilH/7O9TOyOp616bwIn2EraY7UUp/nUjolq/hvlf6jC2Ri99s6WAv+ntUecY8PysSCg muWkVsBkCZh5H70ryrd2VIvw0QtDhg0= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aU5e2BFy; spf=pass (imf27.hostedemail.com: domain of rick.p.edgecombe@intel.com designates 192.55.52.93 as permitted sender) smtp.mailfrom=rick.p.edgecombe@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674163421; a=rsa-sha256; cv=none; b=oReSlylAtEZpPS9oQKW1rrvXZGV5bBF1kv3J8GxWKoK6WlnMHS8wUddCCgwfZ/Crtt1LTi ATIe3Xkld01yIodqVPjnNTkpkLiMVqUmfaOCJq/FZpY8p+LqRn/YQ72oyDEHqLE349Wtb5 wMk70tbe+FQW4+nRDv9I2GalpxPGX7M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674163420; x=1705699420; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=tmt4cSd6A0kDS/7f4GwHJfynyFRJ89yUY8hbbxiN2tQ=; b=aU5e2BFy++df7SsTXbVEvf5MTtW4IUqnNQbTRmYH3+MJC4whmbsf5XRY f/vEHApwx890V/cqieS0sIsmffL48evLk/+Ngfs2hZgZlbMdyg2VnhRgQ HC94PLpXXpVrgdLp3G0I3021ilEZ/HzuPltlrxyHLXCv/pAJd/bPX/57l ofx34EEUkrH+mTT9N0qtP3xBJEn+sGqg5jtLcB5WZ6biyl+FEKgpmDYoS 7y9atj9RR1WRYe5KhR3a9qTlVGPQBf+kAQ0a/w8z2eJ0404xiaZNvdp4Z d/LZKmDvKyjLbhy6ss3PVrj8yEEyIP1ty4hInLMKW6Ijvh+yK0B6qHSwV A==; X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="323119367" X-IronPort-AV: E=Sophos;i="5.97,230,1669104000"; d="scan'208";a="323119367" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 13:23:39 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="989139027" X-IronPort-AV: E=Sophos;i="5.97,230,1669104000"; d="scan'208";a="989139027" Received: from hossain3-mobl.amr.corp.intel.com (HELO rpedgeco-desk.amr.corp.intel.com) ([10.252.128.187]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 13:23:37 -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 Cc: rick.p.edgecombe@intel.com, Yu-cheng Yu <yu-cheng.yu@intel.com> Subject: [PATCH v5 09/39] x86/mm: Move pmd_write(), pud_write() up in the file Date: Thu, 19 Jan 2023 13:22:47 -0800 Message-Id: <20230119212317.8324-10-rick.p.edgecombe@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230119212317.8324-1-rick.p.edgecombe@intel.com> References: <20230119212317.8324-1-rick.p.edgecombe@intel.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: DC42A4000C X-Stat-Signature: c6nnx6dh5fh74e3sok4toc5r6e4qgq7c X-Rspam-User: X-HE-Tag: 1674163420-6456 X-HE-Meta: U2FsdGVkX18poT+oKD0JHkOTNh7xUc7PcXE/raR8rGmIbN9eWCyMHlP5PXF4mnEyxP2b4sPQhxbrnKcB/Mx+7i74WfqEWlvQohwUBA9jhJMLc/u78qYFkNiHtoiKjxawdEx4z2I+4H2Y6ZObu8D6Oo35/l7AJcOCZEXGqWLFn9VeR+WB+J4XCuLZ7i+ZoTvqbiLPw6XQFMk1VP5RQ7MZV6ZP0NNWUSq3w6oAkudcv5fx6wfzMk5zL9NcIodcHDvkvkcqyw1ca8c3muzoMKIbp7WLK0cfmNMi/oUZBVtr9rCm9crOKnPm51c4ONB42qjYquOEStkI44JinjDJJoc+OTy/Aor3ScPVzCQLLZdrn8AVU+3KjY3dTqwfDmBGpkEDAyhHOi5oWh8a5EdvXpZXJlrv/8Z/Jh40KtFYYkwKBnPU1BqAJeTWzj/UKJyxgikkv8H28DiuvpmcaX8gJiOMjuc4hwLeuXyb1vCresGQmPn7cBrITZondmvEBgn8+ZT0jsUzfXyYKFZNQDMtbngwKMSKu23Bt+fg3AQ6ZXHQwoHvY31ADXaE71wjguZvgQkQ6p7/a4gyGZrCOT8jjrdRfUnMoxnEsr57IgwW/MCffNc7g8gN/BbATSHy82bpotm6DjNYEgwIYI6bS0EHHoBYPiDGhotvnnaRNJw++QtwtAyWjsf13sJzAgpHskwDeJc/oq0h3DNtpZa3NPRSvOhq/mQyPslaVjZ6csx9lp+iz57LmCBVYzIGximlBqOAt2OijJCR/QWLbDMtbT9lXyYwqwQybnr3qvuY5VnuE9Fcsd/mRO3bXcKw1xUXNdTgx9IM9v6+cWAoXAFJfpmD1IccnCveSsn3OT+UzgL4xtHQ63nBewEmnBd2jSPPvlTAiuya2BPVXNKAM739UMtxsikeO39XOPwo2W0hRpj7wf3tVZhTlpeJhZB3XJcDT0oqGG+1mPbyRqPmLwGeHmFQWYb rrte6Dm3 TgsoabDHK0mybjN1mMQOe9SbY/YKN1zC2FaywBRx6fpFUIjdymh5/gjtGH2lUPvc0JI8HNU936x/9pQbkWPM8QVTCu73cb59ZkRuoPaCxxOE/AtKi1NGy8xW4HZL5imQt9B0O+Pb95pKyqFCYb6ox3yTmODA/VJBVR2bI118l7N4slTjExfwPMdFTUMDDb3k0kSCauczoMUKYRxQ3nquClJGYqfn8YoZJUj3aIaJtHFRtrgvxK1HhU1rzvvoMHpvXf9H0Dd1Khnmquy43ZAYjxq1uiDSniobmnjPz/jzhV8rjcP0xXTtZMkzv9h5LYuxf0Ng1MLCBCmN5X90= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Shadow stacks for userspace
|
expand
|
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0564edd24ffb..b39f16c0d507 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -160,6 +160,18 @@ static inline int pte_write(pte_t pte) return pte_flags(pte) & _PAGE_RW; } +#define pmd_write pmd_write +static inline int pmd_write(pmd_t pmd) +{ + return pmd_flags(pmd) & _PAGE_RW; +} + +#define pud_write pud_write +static inline int pud_write(pud_t pud) +{ + return pud_flags(pud) & _PAGE_RW; +} + static inline int pte_huge(pte_t pte) { return pte_flags(pte) & _PAGE_PSE; @@ -1120,12 +1132,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp); -#define pmd_write pmd_write -static inline int pmd_write(pmd_t pmd) -{ - return pmd_flags(pmd) & _PAGE_RW; -} - #define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp) @@ -1155,12 +1161,6 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm, clear_bit(_PAGE_BIT_RW, (unsigned long *)pmdp); } -#define pud_write pud_write -static inline int pud_write(pud_t pud) -{ - return pud_flags(pud) & _PAGE_RW; -} - #ifndef pmdp_establish #define pmdp_establish pmdp_establish static inline pmd_t pmdp_establish(struct vm_area_struct *vma,