[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 64/70] x86: Introduce helpers/checks for endbr64 instructions
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Mon, 14 Feb 2022 16:14:30 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6ZUhc558dYqqKBxXFYYF99xbrqlYedR5rtYnwiG/5sI=; b=M532WbzVvqnWn4jJRKPab5WRyImXCgPg3YozvXyc5sQVFtbgE5pjcp0QNpgb8XR/b++xEGPvuVsJpudL+WUPMWEs6fqlR6fluvqan5DSfRKxZssaweKxRJzXSE1D+GIes6bD6esoBW7fPVc9nti0Z/PX3MgHXNNoqorvbT6yg3IvVDx6pUZr6RAxFYWMYuYQNllHpyG3O/2v3VyMwFQrunu1i/tdmfpIixUjxOIkflcZaQxzT70ztBvPHeOUwFyPVToNIYvqx0cdiHQEgx6V904j4OJePl6As1qoZstm/sEpgzgJNPcBHIA+xWCTySoVMfHFnx5UT0E4zj5W+E8XlQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eNHgUAc+q7W4kG9GlbCQSXxXydMryq5a8GG2S0F9Ds/SS51iQ90U97K007cisnpBJ2bJ7uUvgylz4zARGBMORMfsW7aANMspKELoDaYSiYA7ibAQ2goc7sgBOHdyRJfkpUMcW2jM7x9GYkJFlWknAkItlja+aQLgk0N1vBSiNCBryTq2a0e3XBoauY4Lsj839Yxh7mzp9KODSCNBqGYLn7tuRm9bRRkLAyNL0OS3Mc1DymqzgBK7ajL1uGLOiAfFHOjdCtp/aZB+6UmPfLudht5h2DalcpgqfBkeHxX5FldgJN1qlhINF84U4ELqR6PsvDnyWlQyyuKQdpsnE9Fg9w==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Mon, 14 Feb 2022 16:14:43 +0000
- Ironport-data: A9a23:5GawTqrGlDXj8XB+2N24F3ew6p5eBmLMYhIvgKrLsJaIsI4StFCzt garIBmOaKncN2rxc9F/bo/j8B8PuMSHx9BjSAVt+H83EygW9puZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dndx4f5fs7Rh2NQw24HlW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCna2gRj4DJqLcpO0QWEBDOBlwOvRj+JaSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFKoZtmtt0nfyCvE+TIqYa67L+cVZzHE7gcUm8fP2O ZRCOGczNkqojxtnMUYsCpNmx8yRrV7wXjobiky8n5on2j2GpOB2+Oe0a4eEEjCQfu1Kmm6Iq 2SA+H72ajk4HtGCzTuO8lq3m/TC2yj8Xeo6BLC+s/JnnlCX7mgSEwENE0u2p+GjjUyzUM4ZL FYbkhfCtoBrqhbtFIOkGUTl/jjU5XbwRua8DcUL+A604LLb8zqQC2NdVRV5Ztt/kc8fEGlCO kCyo/vlAjlmsbuwQH2b96uJoT7aBRX5PVPudgdfE1JbvoCLTJUby0uWE409SPLd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rJTgFQKD4xsYWzRThZ8/7G nsiWXCl+aemsD+7iWZ+37Y7pxQltek4MBEHtawhs8cLSipohq0Zb5mR6aJsFkO0aOSARcR4Z zxSiUbToNOAkDqDyeISNzWqlDdOQMVmjvfIJmj8CPeSILCNWkH4oF69P1km1PimjQdVZdHof 92Niuixupq5VmrplWN2/HYEx5tjUa6unwkjKoaiGFeS5IXbPtLoZUY5149KuZLIMvW0vFuLA BVNrCW2B+WSyLvU1nJ+m10hNC8VHU6GRmLBkAEp8yOyjBT2HR01VERysATlmoJsMtVcegJ28 3UdqBz0L1eRM4faqxwQO8HXMusE2TIBRbBKnibL1jrHLwOf3jNt5n06rMo4/zCQu1E8LIi3J DaFF9Iv287fEzjTcWIwZ1Q6xjIBH6wWDz8o/surqSReoeMMoYDHRfzOmzGovHQ1Mn3WPerKM pbEKgmdsPeEQ==
- Ironport-sdr: N+hj6CHZVqAW5BVOQ5DfXGxKwOAL8RsJylwdm1VVjx5UCayWUTLQQJRgm36XLIYkkXnYR55Gil vowS0eVsX+3gW2Nel3riJF8BNt0BHgwo9G0p7rjZiLVL8X8eUB50dtUnkeAyavy0tQQMMcASN/ Ohe47BySMS0jhr20Whd0P8R8GwRZbgYDIG2nTVcAEamsRUu9qbntCLp6FpElwN1slJXNdMAZuN eh6Z+uX1k228x6xHCIlsAFHiIxskjefHsp3/sv8A8isyHEXL5OVDuhpoEGzXqt5eHIcA8onn55 ipPXs4cYCBSJnI8JP28MwElg
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYIaOdYBbjG8K/30i9NfK2lLyWE6yTOJwA
- Thread-topic: [PATCH v2 64/70] x86: Introduce helpers/checks for endbr64 instructions
On 14/02/2022 12:51, Andrew Cooper wrote:
> ... to prevent the optimiser creating unsafe code. See the code comment for
> full details.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
From review in the follow-up series, I've merged this delta:
diff --git a/xen/arch/x86/include/asm/endbr.h
b/xen/arch/x86/include/asm/endbr.h
index 6b6f46afaf29..6090afeb0bd8 100644
--- a/xen/arch/x86/include/asm/endbr.h
+++ b/xen/arch/x86/include/asm/endbr.h
@@ -19,6 +19,8 @@
#include <xen/types.h>
+#define ENDBR64_LEN 4
+
/*
* In some cases we need to inspect/insert endbr64 instructions.
*
in, to replace some raw 4's.
~Andrew
|