Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp964390lqt; Fri, 7 Jun 2024 04:20:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbBTB4WwATg0wQaxP+X1YSFg81EnAk/8F7WvDulmZBuVsR+icMUe2WgyEW7Hb/LglYBKTS9wzZFoulZg1aKb8TCkhCsnSuYwbXDromsQ== X-Google-Smtp-Source: AGHT+IHPFVUa9DQsYW8IzDd73q0MdXAxVvd+Xi6Y5SWS9fFo7vUUR2e/BNCabMg5HPdLJ2u86mg1 X-Received: by 2002:a05:6e02:1c8c:b0:374:98b2:5a with SMTP id e9e14a558f8ab-375802f737dmr25530435ab.8.1717759226890; Fri, 07 Jun 2024 04:20:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717759226; cv=pass; d=google.com; s=arc-20160816; b=B7ljxNWX0e7QrpmwJnGFH1V1bfIoq8GmMA8loHhWXt7D9VY0yT6wuHXEKdZzK+l6my PPqxfvFM/ekDZRNRUFasRDevBzDOphx62n2MyC2OONuywrdMzgKs04hJP2u4FVdRSraF 46sVeTBcnSk4826jfHOV2TBeCuyHktlmYnu+x+nNgYGHVR8o71vA1oGGb5yXPy7KQ7PI 6AYAD4fjkqzV0dJgwTYnSRYIsccprJkuRpU3IIOsBTDI69FRNyCtRKDNLvRdAfrjlJwN tYZnAYyY4IomF1HZXJbAE7aGidyRyu29y2fXzgQb4y2B5GDT7aJMuvo2DbqYAZo9SWBs Ddqw== 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=VRy4pc5DYvkOWe+bu9y3n2vPwbj77ubi+WK39f7Sezk=; fh=b+GcvI4Pcayc3mqYGvUYD/O2AEP50jeeZwnwIXNAGVQ=; b=yrOISTPhQWQ8T3lXr0LicejWB9xo1lPUfhL63ipn2CxtlTh2rIrfLfqg6j0qamBIFh yqGziixrle7AImQplA0hw32qVPEhpHq2d5q98xqcpN/m1erYY1qhww1unpipipmNwkfl Ye+GjETr38BQk5RGPK3QAfkm6r0zFJgVrohz+4hRM1/nI+vXdOS5pUgF9FcHUokXxEbK p8+TOh0Q6pVDDk3MYxjQf2A+Pc8FqXuvNIbOKYY+MYXMamP3gDh+76fgZQQ431AFMtKE 95WKLEqSnSx7AZjwZKchlSAaMsCDuBMYdy/XEdrAnlkn6H0lP7yEUg5Uf+1MGfGWjoHf j22w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Svmy+BAa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-205894-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205894-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 41be03b00d2f7-6de798fb97fsi2809022a12.406.2024.06.07.04.20.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 04:20:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205894-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=Svmy+BAa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-205894-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205894-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 79D18289274 for ; Fri, 7 Jun 2024 11:20:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29015194C97; Fri, 7 Jun 2024 11:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Svmy+BAa" 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 56151194C6A for ; Fri, 7 Jun 2024 11:17:24 +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=1717759044; cv=none; b=Lla6q9WbEugznDPGcjQfPGPTKZ0diD0f2vNlUTQ8ju8RuId3L6LkNmyGTV6kFYmGmom/tRxVNjuijnwpZLCIPhIPCXZbeF+3T59xkXK0H9PWEMzxUCtS3M80utZf9kioEwP9PNQ7GSLRxtDWUoOMIHmnr0lKikrW+mOGKkhtdhs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717759044; c=relaxed/simple; bh=BOkJs2FsO7d8uNtY+3OezgdrS5yyqUklsYRb9p4/cHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AqHFCKiR1o0QNiVtxG88Ktk8QA0wdeNRuLxUqaVq/26v3rx0jcS8jA0jhWA/tOGE842fHGm7q7qGu8xevNwll0PTsY8w0oOcqdMtUFA1lPgjloyp20w84pm/7bGZSGrjPVdMXhPD7Dz69ojhTTXp6c7Lui4GcSoCE5I/povQZ74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Svmy+BAa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C048C4AF0B; Fri, 7 Jun 2024 11:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717759044; bh=BOkJs2FsO7d8uNtY+3OezgdrS5yyqUklsYRb9p4/cHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Svmy+BAae22V871Em27Q07St8n3Zp45mP38pOHn2sdeGOp+aegDS9xThazfLNUBLp 4n0aelZx370IJyIESbYe1hZ9t0MaDiRsVnNPChLQ9bSAf3U41/CCTTQkQpavrzIMV2 Rubx1i005loSncmH69UMt0V9LUotZmMtbXG5DfZNiJKuX0uk1S2p7aCOXoJuAQ/tMr 0bFbzCYlVvQ3sFYV26fi2aLYAqNFduHhBOxN5+yAVwgFy52xmuKmpTo89INm6x8EEW Yja5UWa6uMwr/UPL1lYKQBuoEMwf069HsxTNNxU+qX1PvCLarnYvOi1y6OgiSTeHfP 4kIgrsW+7HCFA== From: Borislav Petkov To: X86 ML Cc: LKML , "Borislav Petkov (AMD)" Subject: [PATCH v1 13/14] x86/alternative: Convert the asm ALTERNATIVE_3() macro Date: Fri, 7 Jun 2024 13:17:00 +0200 Message-ID: <20240607111701.8366-14-bp@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240607111701.8366-1-bp@kernel.org> References: <20240607111701.8366-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 28e07a038964..5278cfb1f745 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -466,31 +466,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