From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6BD623655CC for ; Wed, 10 Jun 2026 19:55:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781121301; cv=none; b=LxoDQioaPSm+ZHsF5lc8dWM5eQ1D11dhDAVsgRKe2Tv1i8SRdBzHoONAQ3uyc49VxBC8NpSUUM+xM21O5BH4tLUIKWLMhliTYYUDzMkGmGsngtDQ163qH8tygqB0ZyvXUuH56wP/YANcobbLCO94HL6rvAvcm/hPw/0l7TJwH4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781121301; c=relaxed/simple; bh=zEEfsPs2ZpzkUCZglfNdOyxsvas7smzHUwVvwV0U65o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gJLbGpW/eaF8FmhlNpXBPV4qJPXmj2zHpR34JLJtwRvGRFW0rVGid+PpkWOS7AlWvWF9ux2wbJyXjiZo5pk1llpcF0aFKFZ97pjPxm+m0gbIzQ/4bHYgxfKLiy/9sgoCv8aG/4eaHts/EsoGDytn8l1yn6vIRAHDhFFs2RjL2+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z41bQmZS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z41bQmZS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44E821F00893; Wed, 10 Jun 2026 19:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781121300; bh=T/dSGuqi8XAycB4P5pBzePqeQhUgH2K4G6yyg/DSlDc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Z41bQmZSh9c11zdoUh0ZdYYM6XyXkThE0PSgmVX8yVjFAdVMDn9+hgMOeAqHe8S3w FHrsz3yBf5umRaWpDeUB0lCv441mOnDp4heATdt0OS7Ql44ij8gzR0A7bkK5rIWsk0 yO9BCFZgujq8Z7dUL+x+vrS+hGbnaOKF/57aQQl+DSL/Slvim9RjONRrhMpCSFDCiq a2phWb1cRvtVDt1dEHzh2HI8sv5J4NuNGb7tuVOCO7AtVGE1LoGtd48YNW0KZXDydZ UR7bJ88z8BESHVNDLa+lBrUz2/mCo6EJOKFlnlT4BR4t+LO0fiDOrbqe6h5MFBm/XQ 95FZu3UZJGv7A== Date: Wed, 10 Jun 2026 12:54:59 -0700 From: Kees Cook To: Calvin Owens Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , "Mike Rapoport (Microsoft)" , Juergen Gross , Josh Poimboeuf , Mark Rutland Subject: Re: [PATCH] x86/cfi: add __init_or_module annotations for fineibt Message-ID: <202606101254.8F644479@keescook> References: <1f50aecf23311dc5ffb965c5ccfb8b49208dbb3f.1779763849.git.calvin@wbinvd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <1f50aecf23311dc5ffb965c5ccfb8b49208dbb3f.1779763849.git.calvin@wbinvd.org> On Mon, May 25, 2026 at 08:22:53PM -0700, Calvin Owens wrote: > I'm seeing some benign section mismatch warnings with fineibt when > building kernels with CONFIG_MODULES=n: > > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0x1db (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0x473 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0x57c (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0x6d9 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0xb57 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0xb81 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0xd00 (section: .text) -> poison_endbr (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0xdd3 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0xe58 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: __apply_fineibt+0xe85 (section: .text) -> text_poke_early (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: apply_fineibt+0x8 (section: .text.unlikely.) -> __apply_fineibt (section: .init.text) > > Add the missing __init_or_module section annotations to fix the > warnings, and also free up a tiny bit of memory after boot. > > Signed-off-by: Calvin Owens Reviewed-by: Kees Cook -- Kees Cook