From nobody Tue Dec 16 12:42:13 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8CAAB25EF96; Fri, 9 May 2025 20:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746821864; cv=none; b=CV90uabmV4WYSj3qXlRo2khER8SPi0eXXeW+9kpEbcGWd30YcQXiMlbH9GHzOF0dE98jNafLvwXqCxPtoxJ/cdgghFdDiUJWMA3ZFTBQQwUXJ6mWa5RcCkgJK8czi2w0yCETvy3IfOZAydWnpgi9WpkiR/ORYZ4aOy22vt/tT08= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746821864; c=relaxed/simple; bh=EiuK1X9yLyff3oe0kJ8VsJ5+DhDW2GwGgf3p+fKQ2NM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZdZwpxHPhjTMiaQLXLmlPV1wMYuGT3ghpH1WaVn43TpEc4QGgnJXH8faCXiKETejM1wrxrQVXhY2q9Frm9HhQw5Ej53pm0hwqO87XNlpn+bpo6fijF2JtkMN+SDS0LpKuWVViQ7FgjnaEpM4AML+D4MKRSWWPdWv38A6+omHNEc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c21BYl2r; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c21BYl2r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA34DC4CEEF; Fri, 9 May 2025 20:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746821864; bh=EiuK1X9yLyff3oe0kJ8VsJ5+DhDW2GwGgf3p+fKQ2NM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c21BYl2rdLgF+eH3o2JamZr/mX7tkuutuMO3Ug4Ak4+y1JmUHQ1nb7AW5g3TJUjJE 2a2KZuTl6V1WVFi9hVkrXn0ZndyycOw60emEAshUzL21lLV3XoX/nrTQFxIvqWhLSY PpenhAp0tZF2LeM46MZ0qoEdQwdLD6j8+OiW54JncQRjAguwJlL2lsXW8Dfz+wML6Z +qrsxdYBPXzJZb0CUtobmUff+IWWYruLrEfXO3gCTtM7m12HhX3w4sQIICTQ8WpUew kTXNz53eJMRBlC+7GYs5VoSQ6/fKCySFmzZyzj0Fzg2jxwOrwkiCWATQLg8xEQYBIt mVBvwYFKyTLaQ== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Petr Mladek , Miroslav Benes , Joe Lawrence , live-patching@vger.kernel.org, Song Liu , laokz , Jiri Kosina , Marcos Paulo de Souza , Weinan Liu , Fazla Mehrab , Chen Zhongjin , Puranjay Mohan , Heiko Carstens , Vasily Gorbik , Alexander Gordeev Subject: [PATCH v2 01/62] s390/vmlinux.lds.S: Prevent thunk functions from getting placed with normal text Date: Fri, 9 May 2025 13:16:25 -0700 Message-ID: <5547e8efe2291df0c8acf06a9bbc8f3129cbe229.1746821544.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The s390 indirect thunks are placed in the .text.__s390_indirect_jump_* sections. Certain config options which enable -ffunction-sections have a custom version of the TEXT_TEXT macro: .text.[0-9a-zA-Z_]* That unintentionally matches the thunk sections, causing them to get grouped with normal text rather than being handled by their intended rule later in the script: *(.text.*_indirect_*) Fix that by adding another period to the thunk section names, following the kernel's general convention for distinguishing code-generated text sections from compiler-generated ones. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Signed-off-by: Josh Poimboeuf --- arch/s390/include/asm/nospec-insn.h | 2 +- arch/s390/kernel/vmlinux.lds.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/nospec-insn.h b/arch/s390/include/asm/no= spec-insn.h index cb15dd25bf21..84372c3f313a 100644 --- a/arch/s390/include/asm/nospec-insn.h +++ b/arch/s390/include/asm/nospec-insn.h @@ -18,7 +18,7 @@ #ifdef CONFIG_EXPOLINE_EXTERN SYM_CODE_START(\name) #else - .pushsection .text.\name,"axG",@progbits,\name,comdat + .pushsection .text..\name,"axG",@progbits,\name,comdat .globl \name .hidden \name .type \name,@function diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index ff1ddba96352..fbd6d1f83b67 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -51,7 +51,7 @@ SECTIONS IRQENTRY_TEXT SOFTIRQENTRY_TEXT FTRACE_HOTPATCH_TRAMPOLINES_TEXT - *(.text.*_indirect_*) + *(.text..*_indirect_*) *(.gnu.warning) . =3D ALIGN(PAGE_SIZE); _etext =3D .; /* End of text section */ --=20 2.49.0