Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp417000lqh; Fri, 31 May 2024 05:38:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVp7PTuvih2hOlg8CdHeRwpzZDzUWFYhBesaCp6c5YuvvHG0djlfeFfDqtAnAmJ1QaCJXqe3369Jk4kvLKQkpqU4m2vn6yteF8JFTCdtw== X-Google-Smtp-Source: AGHT+IHL3eluJC78MDbrIr2wiujZQRiDe6W9VQDzRWrQNFkVKm3Yv6HfC/dWk21AIGkVr+HuY8Cw X-Received: by 2002:a05:6214:5b86:b0:6ae:e4f9:cb8 with SMTP id 6a1803df08f44-6aee4f90d1cmr1163066d6.38.1717159115505; Fri, 31 May 2024 05:38:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717159115; cv=pass; d=google.com; s=arc-20160816; b=T4xhcwDJ7rVEhmvlurmJ2xDchGziAxF2/xc1HwZzuf4srwuqtmJkpw4mlqeiXE6w1F hYqXCHMvP12YRm5DaDIGR8HEWnix6TCRkMbLKI4YAt0pHiW9nXx3ZpscUEZdGv1FNzhq HJsEO3BhPswjTvQmRQzhr9b0j6JPX0Stoz4uDIQ3NYTZ/tbqB3RVd0IdjgQTEIQzj1qu NY60Eaz/+puSMZQ5CaWn+7ljqfbZAkKtl/aNNgaIKAF+XNhLA+fTQaF6I00A4/Py9gSk y59JqR0lZ6BNooNxh4OasT4E5KAG3qJ9Xv8jsh7Q9twdFI8KyFLejsrPJcuXJNYwJ+Jz uPNA== 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=dO7sb5JcO6i9Rcf7EJgcNy+q/ocR6ZNa9+R8uvk9NcE=; fh=b+GcvI4Pcayc3mqYGvUYD/O2AEP50jeeZwnwIXNAGVQ=; b=HaOl42wX3FFMtcge89xndBNYzvJuLgFhPcCRieWi/QMFsWHAk5r19QqX0JUYW6TT0H 7Xejt5HIeUhxNx3WRieZZPnrUswTN7ivE3giyCOIMHxJ8UHthZu8gqUnQ5xINis4/qox QQEL8dgOlFeBCRKrt/7ij4tmUKAzjf3mMVQwqqzFT9cqiCIrgdZVdsW8hc9jt+2gtC73 YE1zkpGKzf/hlwbBAFBObXFo2POJqVVyxMwjaBv/751b6oYWHgsNb54xarvh4DqlRwEI aMwA3HVgEA03+4QXe7/HwmEFCjsR1BEsQpK2mXW209ezv6SjoZ8+mktrClRy1XDiGIRl S9NQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K4EUF29H; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b42bfa1si19507836d6.466.2024.05.31.05.38.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K4EUF29H; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196798-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B5E6B1C247D2 for ; Fri, 31 May 2024 12:38:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 249D917C20E; Fri, 31 May 2024 12:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K4EUF29H" 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 50C3C178360 for ; Fri, 31 May 2024 12:35:31 +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=1717158931; cv=none; b=G3MKjCMSxyKd7Y/Wc/JzIfscwBE6IUJb3iBNYoxnt2vw/1O9GtgkyxZ4ww280dRdNYufsHgR36OjlGww6Y75TH9z4l9eRGb3qwSs5c3mqc6qwHdBmDZa8bfsiCRWsZ5EjuVVZ8gWrsPSyc/Z+69VOZE9gTKgjtVD1SBBWP7kIwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158931; c=relaxed/simple; bh=7NxE+QUoLbZ8CDIeAmX8OcSwhoxtLVNGR18li4xQTuY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rgwhDvymtVInYH8VvlkIHACrBTOjsZhmpUaK07jOFdQ8l9Q76V+G63IeHvioQ60RLHhjQj4DutXwmS9QROAvmppolvH3jFPh+RA+cazLIb1qQrh+jmSgn/rDFvq27EFP6l7Ttgcs8A9emQiUc8q7RZzV7BvhvZxaX+oBS0mSVHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K4EUF29H; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54FA6C116B1; Fri, 31 May 2024 12:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717158931; bh=7NxE+QUoLbZ8CDIeAmX8OcSwhoxtLVNGR18li4xQTuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K4EUF29Hs2lsZEdvfsXQK9VFUJlOvrjEGJ77A4XkRQ1kfiEIP+W9c0umx70+V7sOn hZeni+vTxTNkxDjsayxljDu9yrIeCIQ8IJvBGGFZ8nyJsC38cU0LQnI/Y1EynmlBwr c0jzrMx2QDk7e+4kucMws8BWeE/8GfqD2a72tt0uyDZkH2xMvNoWobfCgLeffv9po6 PK9s9s9Hyu8Pzw6A0p6pPPPPx/vIQ6oNoS7QV94N1EBeJ4r9OcNmFU9NiNMVB+K+sg gveEZRVIAPZ+4cIRr6gYkn3ke5Rl+WFF7mdeY2d95dl3yUlwYrrtQWiub/l1upEoWV vxGxXY+KU4KuA== From: Borislav Petkov To: X86 ML Cc: LKML , "Borislav Petkov (AMD)" Subject: [PATCH 12/14] x86/alternative: Convert the asm ALTERNATIVE_2() macro Date: Fri, 31 May 2024 14:35:09 +0200 Message-ID: <20240531123512.21427-13-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 | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 4b17267f3f2f..82a79e17e952 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -452,28 +452,6 @@ void nop_func(void); * @feature2, it replaces @oldinstr with @feature2. */ .macro ALTERNATIVE_2 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2 -140: - \oldinstr -141: - .skip -((alt_max_2(new_len1, new_len2) - (old_len)) > 0) * \ - (alt_max_2(new_len1, new_len2) - (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 - .popsection - - .pushsection .altinstr_replacement,"ax" -143: - \newinstr1 -144: - \newinstr2 -145: - .popsection -.endm - -.macro N_ALTERNATIVE_2 oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2 __N_ALTERNATIVE(__N_ALTERNATIVE(\oldinstr, \newinstr1, \ft_flags1), \newinstr2, \ft_flags2) .endm -- 2.43.0