From nobody Sat Jun 13 21:04:07 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 12732481FB9; Tue, 5 May 2026 10:56:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777978610; cv=none; b=XC3HI/qca56jsNcugcp4tbV6+XVvdqtxJPObNQR+UdnAIqmRKsQWihTCg5PKiDMfgCWKcsKgTFamFMXbukK2dxRrSDVzeW2jxiMgL467xBnykb7Kn/argJ76OI2Kdi7Vo0ltLAurb1IngYgQFnYnKj5+cVowm9rC0L5MuWcSpUA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777978610; c=relaxed/simple; bh=L3ScxGONJDz3mmsLC+1oZUbH8vWF3ItgsNy4Ze1y2Uc=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=IHkntNZYuInNyRJyyiTbpRqZZrq6T2KuDVhuDaUS1phrdj9sJCeBLa277MTxVTtUKDREiD5We2+1PLCHb/rKDqsgbMouYTy7ktmEXaWQ/yblekOozYhNMHGpaaF4AGv0hWsCGilpa3dBdAyPOXw23nKTTl9ABsQMMZxzPXlV0D4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sXSzvxlb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bDxCb282; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sXSzvxlb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bDxCb282" Date: Tue, 05 May 2026 10:56:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777978607; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqGD7cgrDz6fFf44gmitjgrDLTpqeDxe3bsLzuYQjH4=; b=sXSzvxlb7kpXNvQ11PrUAMH+7Gb7UCy8gf+lG71eTUvvZ//hgEe16AD/qJVftd5L+JRZTQ AC6RZU5CPoHPsV3egq1tVaqaeVja7udJ+8gHqDzoWjXTo4US2oV1QlCfkRzYboHzVkSdEH dthRLW8UE6DjpPfqlCfLc42GXSA69rzTrXHR5J60SUBPuFOb1QdES2rRIZOB+m3X4hQd9r kcrBqm7qDNW6f6kGKloRcnIlkRLE7qBwOrsYQY3XwBzUscGv8/epJRgemceu6ez5X42Ol1 5DjkBeHu9oHpBXvKcz/yhoh+G9sd/wGt8vLoIs7erCUku11DJMiKiKFp/7ttWg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777978607; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqGD7cgrDz6fFf44gmitjgrDLTpqeDxe3bsLzuYQjH4=; b=bDxCb282ztapL0v1UR67OPMykOu6xBJwEUVBK5kpUpYnOVAWgWpKYY2rYD10IHX7KsvSXL aK3Tq2aF/XeEdjDA== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] objtool/klp: Improve local label check Cc: Song Liu , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177797860650.424702.18430769554985394023.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the objtool/core branch of tip: Commit-ID: e872b3f13922ecd746f907e20261dfc11c9a9f28 Gitweb: https://git.kernel.org/tip/e872b3f13922ecd746f907e20261dfc11= c9a9f28 Author: Josh Poimboeuf AuthorDate: Wed, 29 Apr 2026 16:02:38 -07:00 Committer: Josh Poimboeuf CommitterDate: Mon, 04 May 2026 21:16:00 -07:00 objtool/klp: Improve local label check Clang emits various .L-prefixed local symbols beyond .Ltmp*, such as .L__const.* for local constant data. These are assembler-local labels not present in kallsyms, so they can never be resolved at module load time. Broaden the check from .Ltmp* to all .L* symbols so they get cloned into the patch module instead. Acked-by: Song Liu Signed-off-by: Josh Poimboeuf --- tools/objtool/klp-diff.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c index ccb16a4..c5d4c9e 100644 --- a/tools/objtool/klp-diff.c +++ b/tools/objtool/klp-diff.c @@ -282,14 +282,14 @@ static bool is_uncorrelated_static_local(struct symbo= l *sym) } =20 /* - * Clang emits several useless .Ltmp_* code labels. + * .L symbols are assembler-local labels not present in kallsyms. They mu= st + * never become KLP relocations; instead their data is cloned into the pat= ch + * module. This covers .Ltmp* (Clang temp labels), .L__const.* (Clang loc= al + * constants), and any other assembler-local pattern. */ -static bool is_clang_tmp_label(struct symbol *sym) +static bool is_local_label(struct symbol *sym) { - return is_notype_sym(sym) && - is_text_sec(sym->sec) && - strstarts(sym->name, ".Ltmp") && - isdigit(sym->name[5]); + return strstarts(sym->name, ".L"); } =20 static bool is_special_section(struct section *sec) @@ -388,7 +388,7 @@ static bool dont_correlate(struct symbol *sym) is_abs_sym(sym) || is_prefix_func(sym) || is_uncorrelated_static_local(sym) || - is_clang_tmp_label(sym) || + is_local_label(sym) || is_string_sec(sym->sec) || is_initcall_sym(sym) || is_addressable_sym(sym) ||