Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp416991lqh; Fri, 31 May 2024 05:38:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV48YS3XPrKl7DHbi4di/TkljNUoz2V/CNPKp30L2c339ibeYpvnlHBZHbWgydhwSjxoL4Q7oEcE7an3jjOkuWYlFuBnqUabOxuzWJ6XA== X-Google-Smtp-Source: AGHT+IGtkUXzrzWNggsU+F277/RcoxJgtftSjU9TDalZJlaQNjGggJVGUmsgprNMtpHm59l23TYV X-Received: by 2002:a05:6a20:3ca4:b0:1a5:6a85:8ce9 with SMTP id adf61e73a8af0-1b26f0e569dmr2223556637.12.1717159113514; Fri, 31 May 2024 05:38:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717159113; cv=pass; d=google.com; s=arc-20160816; b=zF6ZHWQ+Kn9eUv1NLWm8kYl8brtdvInr1uWycHhzwglU5TwMvailXv4kllk+LyKJfq P2KU/RnpQv7LhWV0PaDCAHEE8Rh8MVxfSh/nhHBkbT13F4ATM9aqtW6TZAglrCVex7an uEObED5V+dU3+WEmoE3nUndl9fIuZJvKWoJCLVUaWWljtzjlWObTApOx4nGsswBiuNVZ rq95bE8PBlzTtOVc7GHdhtXDvIsYi+am5s0pyR1YJ4LwTsb9jn9haw9Z7vRKRvUaWN+V KeH6gr7eyGqU+PRnoyhamlgOlrYFs7SQVw6CV7WVqnA2uSRskEtwsmHQgt0X94hbb0dg Lk3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=uAX9Dh5JCE8Jbx7I9/mbNEuZ53Rjgyvypf/3PrC4/KM=; fh=b+GcvI4Pcayc3mqYGvUYD/O2AEP50jeeZwnwIXNAGVQ=; b=FlcQ6L4VqcfgtaUABhHfMK1CLqsAOnKbXyoSex2jIKtTlS985+Robfz1tJ0/0xoJln KMLhT6kwuLkJSC9wUURvSKQJSxQmCw3oV5wDpqsYQF2ysGrZmWmsOuaqMj0oAWInIGZ5 ElTnEeBol81V4C+qsD5z3Og4zoUXFUS0gSUsMSanBV54wk3laPS6jBhksku5DlMEjJQU gDPG9ga4/J/btPGEH8pWd4stDKryqIkotvpQ5+cpiIw5maaqnGq5A6/+00iYwAveCCiO 4cvPqw0XuwWVAX9TujqG/6AGhzKKklcoOdNm4vDRhcMYyfzcpmW344+jHnzaqs1ytnRN zPbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b82ZdiRb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196799-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196799-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-7024e88ca59si514857b3a.14.2024.05.31.05.38.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:38:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196799-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b82ZdiRb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196799-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196799-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2B6D5284BAC for ; Fri, 31 May 2024 12:38:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 691FD17C9E5; Fri, 31 May 2024 12:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b82ZdiRb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9015117C7A3 for ; Fri, 31 May 2024 12:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158932; cv=none; b=aWwPJvSFGYCkrvfE1YzKsZHmiYnI0m8k8Eh7hTijg1k43bklg5uBEJ9L8XghxdTHg9kNa6fb+Gz1roUvp8fubsesbQ98wcw+8RTbZ+eo3hGs/2TPYp5nYQUKxlZwB7r7FQyY9sBeKhEd8Dg/+1r1Gu9O+oFy9AklJ5rMtDoJrvQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158932; c=relaxed/simple; bh=/qlLGNymXFpWMsOYIm3n/ty8t96hW2L/4Kjnjwv0hN4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gTC0koQdAY4IDCfyjKlKnrc5kfy0jxHfiOIk5nvGxG9HUkzS/pIj3Yr9vnEuHiPkdxFIww81A42lQX6zc4OaMfbCkNg0oXNcEoU3tkZ1mwhxFXcuMPKJyvFwdH4RMCkOvxtanMXWFRa1ggx2J0qwqQ+Y0g8d03X/498IM3I3Dmw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b82ZdiRb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9420FC32789; Fri, 31 May 2024 12:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717158932; bh=/qlLGNymXFpWMsOYIm3n/ty8t96hW2L/4Kjnjwv0hN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b82ZdiRbM5pH74g0M+NV0dSfQg8bfyn+67a8MkQx03D5WjNKtcMdPdgy1rxyx7cED OUUii0bxajdVRTKeJvFiTwgvJkmNgIwvAdnUeQ6IVeVdurmG0nZaSxrPS6+fAdOaX3 PBi9mObhWXJtetbdkefrp4thbn5wlPEugOPgxPByo9D+wRCypzIphqBdp4PnUTfR0d gSjoddIQJcZlSbmlmZ/opfOlAoanhg7R5sUzR/VUMDCmzcRfYn1D4RcpjMKlHHUEIr qjeD6BMP7P9g9b010lRcjuCDvUp6JzThS4qF2LALzZLGUQ61soyO/YrkVNg7OBIHy4 kcbgYwRpLTlNw== From: Borislav Petkov To: X86 ML Cc: LKML , "Borislav Petkov (AMD)" Subject: [PATCH 13/14] x86/alternative: Convert the asm ALTERNATIVE_3() macro Date: Fri, 31 May 2024 14:35:10 +0200 Message-ID: <20240531123512.21427-14-bp@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240531123512.21427-1-bp@kernel.org> References: <20240531123512.21427-1-bp@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Borislav Petkov (AMD)" Signed-off-by: Borislav Petkov (AMD) --- arch/x86/include/asm/alternative.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 82a79e17e952..19b574331ffd 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -457,31 +457,6 @@ void nop_func(void); .endm .macro ALTERNATIVE_3 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2, newinstr3, ft_flags3 -140: - \oldinstr -141: - .skip -((alt_max_3(new_len1, new_len2, new_len3) - (old_len)) > 0) * \ - (alt_max_3(new_len1, new_len2, new_len3) - (old_len)),0x90 -142: - - .pushsection .altinstructions,"a" - altinstr_entry 140b,143f,\ft_flags1,142b-140b,144f-143f - altinstr_entry 140b,144f,\ft_flags2,142b-140b,145f-144f - altinstr_entry 140b,145f,\ft_flags3,142b-140b,146f-145f - .popsection - - .pushsection .altinstr_replacement,"ax" -143: - \newinstr1 -144: - \newinstr2 -145: - \newinstr3 -146: - .popsection -.endm - -.macro N_ALTERNATIVE_3 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2, newinstr3, ft_flags3 __N_ALTERNATIVE(N_ALTERNATIVE_2(\oldinstr, \newinstr1, \ft_flags1, \newinstr2, \ft_flags2), \newinstr3, \ft_flags3) .endm -- 2.43.0