From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 5BADD37DEB7 for ; Wed, 12 Aug 2026 11:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786532430; cv=none; b=K9SwB0ukRksa3UHIKNButNkR2XuXtol8JbHQg8861Q0Fur/VsLrgChmDt8k3Tee8218nh05m0wmB9LrG3PQe5lh55xg/2FMspJoY5VKEzwryzVlhGfESlGh2/KT6lhOmgHSS1zPl2DzGEU+6lqy7gsW5hQUf8vOkg5gS7CGTGDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786532430; c=relaxed/simple; bh=T+ZnnLY3i247c0xXbcmj4pheL5sTP3Artq7jq9pS3gg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KFBuJAvjes8tm8sYtpH9A7KJKdFi7SZAyyd+1k8DF1/8/ChcP/Ni1AQCstw1P93wbVMeVRiOUWmUNzrLJ5I/QlEcZoDXQ0KcL0P7ivNXO0ZLbsieeC8wPsU4D1YA8LCtT8KLU+Zz7WiAVGYUN7jhDnzPue2yRKDlqfa9XAca5UQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=fLF3aedy; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fLF3aedy" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=R7Zv/HZYIlWKGwefXOcagiUzbS4Y2Alig0LxwUS/EoQ=; b=fLF3aedyZcVjXklSPsM2V8kbTR XE1mZQrwUxnUp1XP+Sor9J62w5FgVdIAPwiTQ5wGSMN6TE9EnUo9E8Wq5fnKIVPto/1eJoDxraCWq 6PyF7sYMLNH9+8BOJb4wywWE3nvTzBuMhDIpw8p/t5n14x+uujKP3AgTNWPTXfIoUkJhJGjznMgvU och8jm05rNhqqsOxhvkWj0o4WwRKdz51gDoDpHdcNSsEQZAo1kZyhwzCxGIhteOe9XC5KIy3vSW9d vbhVQYVecmchIR017Z/2ZNcoFSd4mU9Y+DKAPwqW60npfgE7vc2TLSsVXC0comLGHWHj7coBuYADg Kd4MOCEQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wu6h6-0000000FKaI-1imt; Wed, 12 Aug 2026 11:00:24 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 836EE300382; Wed, 12 Aug 2026 13:00:23 +0200 (CEST) Date: Wed, 12 Aug 2026 13:00:23 +0200 From: Peter Zijlstra To: =?utf-8?B?5p2O5YiZ6Imv?= Cc: =?iso-8859-1?Q?J=FCrgen_Gro=DF?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Kees Cook , Nathan Chancellor , Josh Poimboeuf , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/alternatives: gracefully skip unrecognized indirect call instructions Message-ID: <20260812110023.GL776954@noisy.programming.kicks-ass.net> References: <191300ae-0f0d-430e-955f-bdd2aea4997e@suse.com> 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 Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Aug 12, 2026 at 05:22:14PM +0800, 李则良 wrote: > From cd58bd112a6178593c6bc9c0f9b307d6897ae3d0 Mon Sep 17 00:00:00 2001 > From: Zeliang Li > Date: Tue, 11 Aug 2026 19:09:09 +0800 > Subject: [PATCH v2] x86/alternative: WARN and skip unrecognized indirect call > only for non-O2 builds > > When the kernel is compiled at a non-default optimization level > (e.g., KCFLAGS=-O1 or -O0), the compiler may emit call instruction > patterns that differ from the expected 6-byte sequence > (opcodes 0xff 0x15 followed by a 32-bit displacement) checked > by alt_replace_call(). I don't think we want to cater for this. But what actual instruction sequences is it emitting?