[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/altcall: silence undue warning
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 1 Mar 2022 12:36:08 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=1CGuQnavDaQzxl8KQfCDTDU2TjGe6+yb2XeXhfdCsjI=; b=c4vXLvOfnq5ne9vobrOCKSGq3Ddsf7S1hR67isvr6sCti+GYjlRv8d0IyDnzuk3CJO+mdIBdjSXUXCFNaIkTOW+VfGjUABKtoDzDjuUWVU2+Vv0sCCzRUSnDgHZ0u4CvrXBZKKOMlfQK3j0XA6g57MGFV0Yhk354j+kWZE37uwUKBIS/XjlbJKB5L5zYNbELos2h4ETpxUIQw0TzDyg2mLpV3Tpiiwc9Q6eEoQvWRBA3KOuEJrqwD0ksDoyn7koo6gJIYsvyCA7866odkSo/QoQ8jbw0UPDKL0Je/3na10rnJglw3WcwK2ZPTATcq12l9i3fg67C5evUNPD5bPI59g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mzq7KSX76EZzT/aHLQyWd9FdkdzscqKe0mKOBFj60LCIJuxTcV9lM2o2VBmC+K6R60RNGcfL96KE7uwHsnRtcAsA3nk4GsttLpQcojB1BtLDz7uBuEGrBcqH5PPTZ3SLoAC9oKsI9KknBOs9WbZsBMfZE3a9IM6VwZPpM36RlqYb4n3wOCaxYDl+MuBfSq2iEa6SV3GstcsmtHto2kvk7oLHGfHb6XGFd4E0aMb0Fqofr2j31FFmGvYXlwZ4Vj7q2hA51k/b6jebM98uXcrnrPRGEsMzcs7zMeJq7Mjx1NGurdHRQeHo/Yv3fRINGX+NY7qehHobBf3H54Ww7YHcvQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 01 Mar 2022 11:36:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Suitable compiler options are passed only when the actual feature
(XEN_IBT) is enabled, not when merely the compiler capability was found
to be available.
Fixes: 12e3410e071e ("x86/altcall: Check and optimise altcall targets")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Furthermore, is "Optimised away ..." really appropriate in what
37ed5da851b8 ("x86/altcall: Optimise away endbr64 instruction where
possible") added? If this really was an optimization (rather than
hardening), shouldn't we purge ENDBR also when !cpu_has_xen_ibt, and
then ideally all of them? Whereas if this is mainly about hardening,
wouldn't the message better say "Purged" or "Clobbered"?
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -295,7 +295,7 @@ static void init_or_livepatch _apply_alt
* marginal perf improvement which saves on instruction
* decode bandwidth.
*/
- if ( IS_ENABLED(CONFIG_HAS_CC_CET_IBT) )
+ if ( IS_ENABLED(CONFIG_XEN_IBT) )
{
if ( is_endbr64(dest) )
dest += ENDBR64_LEN;
|