[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/nospec: Remove unreachable code
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Wed, 10 Apr 2024 21:27:51 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=hqDVVuVZIT9XpLtZ9dxEXKgRvETkyzpDzmWB1qR8OmI=; b=WDuOouxTLcdhiZ3ObQQuOa06yYSTNcNbGj6KgGqzm1gLgab2wQWioh3te6W/Zzm5PbIqv+TqnBrmb/15ejF5bVl/eYxyGZDK4IbJfS7g6XYpT0mY8ABw1foo2WvnV66P6kNVbekSReQbNnHHz33MagwDrgDu2Fhy9sZ+vkbBbmL5s4Eqct/8hYcrtcQsAWyg26poFxlFdhppOhcbqJHd7cHNKwiFRuc/qAmAjlVfC2ghZNl+yRHvFGqEh2+nSL5Y3vBG11m4UkCeyrYyEW8pV9WefbONbvtBtrGG09xQT7jP/Hs69zjydPLTUk4NVh0DyTfjT2npvKlkLyNNdp/wzg==
- 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=hqDVVuVZIT9XpLtZ9dxEXKgRvETkyzpDzmWB1qR8OmI=; b=Oj1dVKOI5HDEk4Vzxjt++mMkPZU4H2HHRzTw1ZrVM2m1u8CIEng7Ts1BQQDh8URziIbsRka1oZxJaRlvt3armCgTyq85AVc6CN1j/cVk3pJOAKsdk9xh9n+VI1hIdQzJ9hDgiWWP1Un0JFb6jmrbLvTsfzsxjT9W4E9+PIAdkIEpcvq0u3SUJorzjwcvXxSYjqRNinku2uXaBJiZoxw9J9VT9FAIPeCmZPVKaVztHTYjBNccF/HsTyhQ1vsXyMJnaaN/SckLjXQwsxIiRd6NSXFhCv7Qq0BYgzYePF0nBGwY2i+QW8VcWMBUaXo2PW8bTdtfcfDo1tr9xxG/zKtvDg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=d0Z62+XQ/6hbs5DG+uSZIqL7yjxwHxETlF39Fmk9ahdmtKe741PmwcKZYgjjOnzVwz2woLDg6VLRjbuqDOIwZ9SMUSqNPoUZQEK2GGnMboGxYeI+FJCJrnCPvsF9j0LS71DdCMjWldqdcL1uttyQinLZGU0YxkThD4cQZTIVlz7yWZRmSU6FE0p2L2lK5da8mzkREv6NxFcHa4qZkOAsvxLNJrIzIFaQLw+ofOphisya5IicYERxlu0ZCLMSLC2FEnzJjlFLyMDOW6X3cCuRAZ9Abs+nL+L4EWZkZz3Hq7U0eJfqn0X5gPzXg2QxaU6wmXr+a2OQvP9DCXd4sQFC7A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HGtnyaobqjB8P+mvoHh/0UlBUQbWo/xSCqADHxdssmPP3iNiM2FeWwpnnPrw4Sk1MnPJudyjAk7RxaNxIg4qFCvX8NSxicyD5uOivwfqMbpxqzJcvz6mgNECaJqvd1Kvm0peDMK/tYm9RslBflYJMeH+8A8pYrFm+dRl7PQ8oToWe002p4vzNau/eWsryjPBA/kw1Al2E4uEvAfRggFDdki2HEU6HYlkGhsKYFcgeJBEyPYIUkOdTJlFD2sjwJo0cWYh1JvCvgh6a06+5JFJyxW7ZSlnLvB56X9FES52HOpVem14o1IlUC5yWURRL1gMjSRPTuPzwsL1kwHKOE/fIQ==
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "consulting @ bugseng . com" <consulting@xxxxxxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Federico Serafini <federico.serafini@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Delivery-date: Wed, 10 Apr 2024 21:28:44 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHai30hEj6dToSBkkethOfcXBQ7mLFiBNuA
- Thread-topic: [PATCH] xen/nospec: Remove unreachable code
> On 10 Apr 2024, at 20:26, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>
> When CONFIG_SPECULATIVE_HARDEN_LOCK is active, this reads:
>
> static always_inline bool lock_evaluate_nospec(bool condition)
> {
> return arch_lock_evaluate_nospec(condition);
> return condition;
> }
>
> Insert an #else to take out the second return.
>
> Fixes: 7ef0084418e1 ("x86/spinlock: introduce support for blocking
> speculation into critical regions")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
|