From mboxrd@z Thu Jan 1 00:00:00 1970 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 CAA222D2488 for ; Tue, 18 Nov 2025 15:09:27 +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=1763478570; cv=none; b=XiHvXTXqZ6rdhju4MFvb8J+cT7CkGB/Z3PH9wMpt+vWxG2prQ8JkBE6pgSLr7V+aIo41K0/g2l85M1kos42dc5uSN8ht1Yof7VxULQ79I/TjsTi2PSktVAovy/yn/3oMT+qeh9AnTS6LQWYWCuARPa4/tmdzteO6qzIWbZU+a7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763478570; c=relaxed/simple; bh=rP+z6qNNWI9EyKLUZg79aJz4VzVbGIaAO5q/uWIxo1E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bh1QTm9o7ousq7Ce0HdmcGLK2bfkIIt74h7TYoFMAiPktCARN6uyc+2cBaGWbx/B5MiXNKxflyu4sQ9P4QpIhfeJtSkhPAQcXk16yKM9qDqMZFiqm3JZ86JcQ+carCRjMnNDf5yV+/2VDULN6YEq4EDOAegVL11qOd8xlIl1n7s= 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=fail (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=QRwUPyWs reason="signature verification failed"; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="QRwUPyWs" Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 9029A40E0216; Tue, 18 Nov 2025 15:09:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=fail (4096-bit key) reason="fail (body has been altered)" 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 bT3udofGi0zn; Tue, 18 Nov 2025 15:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1763478561; bh=rb9Hh3nNoXMAQBuZGLZE456JO+Q3uV0IWlVpSzI+cgA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QRwUPyWsJLhS/G6L/Wp+an/R+SQo+kAJihVtwoMjQuPkWFfErw95KavZ1LnwxrSsf a2pMuGoyRiBy0OdND8tjRUEzZKbPFsn3491qe4DWB4bV9j+ofEzaT2pzeRerws3zZS xu/WNzXgvzPNGHkKvzjWV0ULvQOpo1iLnwWQco0SI+0HQ1VHu1CkQNLa1oo44bopRS TwQ9ioe1Jk1ex2xAK063I5OfvXYSbVEs6FKSdeeDQnfKt3az2wF9M313ANOZHXH+uA dQEQWnToD9MCtLTSkEWR3hvxlGV4ODWbvXJYfpyLmqb81VgyGx9UpVJSS1GbC1KcJG 5UetPQL2/scJENmrqOah8KyaHEiKC6HMjW6Z7hLyh0ow9SpXA/azWf6iP+jy7EB/Id TnwSzmJWXXQhtNn7uFtV8mu6pLBxLHmHR+ugcdGT1ZxmdNERGEfo6IReEapKGM+Q0Z LzKm55usPAc1CqKbpbGsBUkj5EQyHrcDNpIc85KABaAFVBSZMeE3E/ibyXblSRBG+p 5gno50Jv5+RcKg9XB7AC/kOvuiXLM8Tvuiom5NxyhRajdyeqb7dY3OlZ3I+7495RMG 2SET/QW1YZCrIck3QWICmWYXdTwSVzrySLNaHXSbTVMC0KRmDGZ3oQ0LZJRWOrKkCH J830Kpg/jvuIChzVg46/Weuk= Received: from zn.tnic (pd9530da1.dip0.t-ipconnect.de [217.83.13.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with UTF8SMTPSA id D51BA40E016E; Tue, 18 Nov 2025 15:09:13 +0000 (UTC) Date: Tue, 18 Nov 2025 16:09:08 +0100 From: Borislav Petkov To: =?utf-8?B?SsO8cmdlbiBHcm/Dnw==?= Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH v3 2/3] x86/alternative: Use a helper function for patching alternatives Message-ID: <20251118150908.GKaRyMFPX0oidW-YMv@fat_crate.local> References: <20251110082339.30144-1-jgross@suse.com> <20251110082339.30144-3-jgross@suse.com> <20251117134146.GHaRsmGrON5UF7q2P8@fat_crate.local> 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-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable On Mon, Nov 17, 2025 at 03:45:05PM +0100, J=C3=BCrgen Gro=C3=9F wrote: > It doesn't do the patching. That is done in the caller of > analyze_patch_site(). It doesn't do patch site analysis only either. > and putting the code to be patched in into the temporary buffer and the= n it > is printing the debug info related to the result of the analysis. This belongs more into the patch_site function, I'd say. > I can add one other layer doing the split you are asking for: one for g= athering > the information and one for applying relocs and debug printing. But I'd= really > like to keep the final patching in apply_alternatives(), as this makes = it very > clear where the final patching of the code is done. Fine by me. And I'd like to have clearly separated stages with functions = named accordingly and functions doing *only* one thing and one thing only. I'm even more fine if you do: analyze_patch_site(); prep_patch_site(); patch_site(); and have it perfectly clear and separated and borderline trivial. Thx. --=20 Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette