Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp372095lqp; Tue, 11 Jun 2024 07:06:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCl1dAtacznj+iOCJhZICZcintBNmUq562jDgg7jacgwvOWfzEAzzPrwQWW3Cze/+mZrUkyC240vvm5HgE3/tQdZCxq3sQKJeUa6Iq7g== X-Google-Smtp-Source: AGHT+IHgLh/ozZlYBaHf6Bao/7fgu+D93KMFo1JjUuLXc54cC2C/5Gn5bAEjIJ2egkXF63CXAAzp X-Received: by 2002:a05:620a:24c6:b0:797:d7f7:9363 with SMTP id af79cd13be357-797d7f79c88mr193290985a.66.1718114810522; Tue, 11 Jun 2024 07:06:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718114810; cv=pass; d=google.com; s=arc-20160816; b=vE4sbEyMH92ZSkT9z4ZFbhwHugibNtVPNQz4RB8yYRQFiIefzwlzKvqBTsIKlkJWIh odXYpH6bkneWtKDm/IGwiTM4mPFM1SPsTlorZ0Qpg15JpXP0hLVDcxgjWxTCd/Dvk3e7 eCfAtBRA9mD1inMTYvXJv2WogX7AsXVLTYHSStdAfgDoLV8UiNoBsuJkRpBqrjctZWgq 8rAR5kP3K8puVkOd6KsHLwo8dnYw2ItfRhXxlC5DMkKlsvTpjx2zBjqmBnXg8kRthSSi Pbr+dVPuAvqpCmnGsiLGldo9qXKPlDXTDb/rMwYh025lks+pV1TAKzvoesMVLga3S48s Tm5A== 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:message-id:references:in-reply-to :user-agent:subject:cc:to:from:date:dkim-signature; bh=H70qKEsyywdGIzZyFtIxa1Xk8eZnGnp/jCfVMLZyi+M=; fh=vkqfSeqCMwz2ipdmOA1L1Zy6DvQU0Ff9W+dw00EnpwA=; b=rPzKRoiPBTIqtIPYHrgceXUK13Q1ClJjB70PsctSDvMwGp9EN1EocP8uEKUhPkHXUU vp/+b2ACdPqmnDmN/jNI/l8vAq6n8jKahI1QV4ODQcWLUi/HkPSq1VyQwv6FCrG6inRr LpGMS7aWwnaFlpd38/4xs/iIEoUGtbHgLDL9DxHHKctJa7cT51WXqp0+nfxwJd2cazUQ /OxcePoDvuJdw/rl67/xsZiicLHM/chXJ2heEevJBM1AavRzv9q35GuIPTv4nVmPx76J +nF/Q9Tu5ZW2VVzOy++gpEHBatL7CsoVx3hsByHIOAqHweBqZQ7hpJVIPYRfmWJK1Z73 iXcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=Wt+tDmjI; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-210033-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210033-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-7954b8876c3si1071344785a.315.2024.06.11.07.06.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 07:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210033-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=Wt+tDmjI; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-210033-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210033-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de 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 E05CE1C24933 for ; Tue, 11 Jun 2024 14:06:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AB1017D887; Tue, 11 Jun 2024 14:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="Wt+tDmjI" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 B13FC1DDF4 for ; Tue, 11 Jun 2024 14:05:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718114757; cv=none; b=gJfV7fnAF0h0K9SfyPqekS80+AKJuGPggI8ZC0dZXl52XUOMVG6c8fbLja+gY/GVSpWPGmyU6r6xi7nM4wPcuFj8bzxyxV2pRxBKB5O3UU7hR442W4jsasJEPEvT7rDHnVaVKw9MSNDfjqX23Cia3bVqLJkIUh1rn+HhSrcKR5U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718114757; c=relaxed/simple; bh=fb9h/s1OdFP7eRPaSrSo2uGC1HXvmDGSTyWKkCdOi0E=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=Q9BuPKCBHB2+MVyaNurtgiOp9OgaiSnM2/JMooDL/gxqAZ7dKdGG1idr8E9fPNdmgaGtEqJCv/hmNxm6s81quEQH7VF9GxMbMzn+Q8F7ep5LceOApduAgHb+eVwLJU4raHHzMkO4aE2LQ8Js/+vD3Qrkmk42LWb0+3GP0rU4UwU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=Wt+tDmjI; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 999EA40E0176; Tue, 11 Jun 2024 14:05:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Bh3dWK00moCE; Tue, 11 Jun 2024 14:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1718114748; bh=H70qKEsyywdGIzZyFtIxa1Xk8eZnGnp/jCfVMLZyi+M=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=Wt+tDmjIyG6q3owvFDUPoVEa9ZbwTDyr1D2mpF1518ZWSZZwKRBrvsKVJqXd/VYZ8 kJOXKE6Rf2o4tkP0obr+nkETGmxwP6Npre5LVuuyxL9InE0UMp26SKOpO7i1QX0xwh FNqXLVU+vvDhZ1qLqX4cvZ7mDEtzLza/icSMmIHn2eKhsNPG6C+rQlw5j9R5pMa74W ojKSkzewEg3yYuOA9014cJLI3ZDa2vxY7SgUhTtmeXi9g2IityNt1ueAEPM0sxk1sX nZOhLIaYDm8lAcRteCOnyWhVxjevHu+xT9Je9k8XaJCtrxwLcTejPI2xpCVGpfSlKg 0Eqh6wtUGzjkadoqRSaOZBS4Ql2OWImEomCqXKvwoqQqBHLL9Z9CgjcrrhLpc2MyFL Ru2R/HC5TAskSXea1DQqzhU3c3hb4A1BXu8u+4sNY+haTVRKhK/deofj8/qpx32cEk JAbC3dqYmutceJi9XZnxryiFthPz2qYLcjy2CLdbdeymbq1Cq8146Vx6VqWHSDz3rS 8gO1MlHic1aswffJk2gMmqB7D54Kz1OqzmOLiXMnO4ojHCFyYH5wYacV8nU1Rx8qBG d5ju0zslFgnaeKcmDoZjiZNCinVFtpopsrIRIwO2Tu9IENot+BlFEEBbUuDpQ3S+ts GITEAm9xcrLa0A6DtCh0kWDE= Received: from [IPv6:::1] (unknown [IPv6:2a02:3038:204:3eef:78c3:4ef6:d0a7:2ead]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DB91240E0081; Tue, 11 Jun 2024 14:05:43 +0000 (UTC) Date: Tue, 11 Jun 2024 16:05:39 +0200 From: Borislav Petkov To: Peter Zijlstra , Borislav Petkov CC: X86 ML , LKML Subject: Re: [PATCH v1 00/14] x86/alternatives: Nest them User-Agent: K-9 Mail for Android In-Reply-To: <20240611132609.GH8774@noisy.programming.kicks-ass.net> References: <20240607111701.8366-1-bp@kernel.org> <20240611132609.GH8774@noisy.programming.kicks-ass.net> Message-ID: <7C4F08B2-70C1-4A63-B901-33D197A2BDC4@alien8.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On June 11, 2024 3:26:09 PM GMT+02:00, Peter Zijlstra wrote: >On Fri, Jun 07, 2024 at 01:16:47PM +0200, Borislav Petkov wrote: > >> Borislav Petkov (AMD) (13): >> x86/alternative: Zap alternative_ternary() >> x86/alternative: Convert alternative() >> x86/alternative: Convert alternative_2() >> x86/alternative: Convert alternative_input() >> x86/alternative: Convert alternative_io() >> x86/alternative: Convert alternative_call() >> x86/alternative: Convert alternative_call_2() >> x86/alternative: Convert ALTERNATIVE_TERNARY() >> x86/alternative: Convert ALTERNATIVE_3() >> x86/alternative: Convert the asm ALTERNATIVE() macro >> x86/alternative: Convert the asm ALTERNATIVE_2() macro >> x86/alternative: Convert the asm ALTERNATIVE_3() macro >> x86/alternative: Replace the old macros >>=20 >> Peter Zijlstra (1): >> x86/alternatives: Add nested alternatives macros >>=20 >> arch/x86/include/asm/alternative=2Eh | 225 +++++++++------------------= -- >> arch/x86/kernel/alternative=2Ec | 20 ++- >> arch/x86/kernel/fpu/xstate=2Eh | 14 +- >> tools/objtool/arch/x86/special=2Ec | 23 +++ >> tools/objtool/special=2Ec | 16 +- >> 5 files changed, 125 insertions(+), 173 deletions(-) > >The whole back and forth with the n_foo things ia weird, but sure, have >at=2E > >Acked-by: Peter Zijlstra (Intel) Thanks, yeah it is in the 0th mail: "For ease of bisection, the old macros are converted to the new, nested variants in a step-by-step manner so that in case an issue is encountered during testing, one can pinpoint the place where it fails easier=2E Because debugging alternatives is a serious pain=2E" If you remember, your original patch had this issue where it would confuse= two back-to-back =2Ealtinstr entries for nested because you were comparing= only the offsets and they happened to be equal, by l Now debugging *that* was insane and I managed to find the issue only when = I started converting each place one-by-one and booting each one step=2E That's why this superficial split is all about=2E We will appreciate it la= ter=2E I hope not but if something explodes, bisection will be a lot easier= this way=2E I hope this makes sense=2E --=20 Sent from a small device: formatting sucks and brevity is inevitable=2E