From nobody Sun Jun 14 06:08:19 2026 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8BC01FC8 for ; Sun, 3 May 2026 00:05:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766746; cv=none; b=p/tVPxGE+lxUlde3wcS52naOecswK23la1XSDQjS3qZ2CFhHx1G90awteY/nyHIope3C+I0BrsL9QtYMvPCTEzasKHfA3+MKm+9cfOjhuoOEEXzMcHT4IuGvI3Y/hUowLdUj/L4bdqO3+kxF1Ap0UwdfdD5Ou/5eTJ6tE4he5q8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766746; c=relaxed/simple; bh=T4HdIJRhua32rXeeRFVONMGDwwZnoLvUq4UsJgWkg+Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tUUOFf3h6QjEYuiFvAlHhVunQricrHq7G468mK9J4zTdjU2zrQC3NqvPRPRhv91FBLoAH/d2x3JedldWBBrrCVd4v+vgHcIYMUDBmzt/yhZUrIy0n3QJ0BQj3tVTJ29PKqI6DLT3g5ZrUulK+3OK9W+ZMuT3PyL3is6sGVhB6WE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rtRcwoo9; arc=none smtp.client-ip=209.85.210.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rtRcwoo9" Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-7de7dc85b74so2851573a34.2 for ; Sat, 02 May 2026 17:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777766744; x=1778371544; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=e+orEjBju94Wn5kqJa2iOEDSFRgssMF6O2tAVSchijk=; b=rtRcwoo9l9S/nrqJS1OjbtWNBiEQNgiph1Rw01lWHtY57Tk3uo0lyFcFM+RWAj7mJO IgCoKVxmndOl3fU5NePyxKYh9/PwXtONg9mquSdx/Ae3jipddZ5zd738kD/EJP8dSsYK qEtdeMcXL/FV1nskZka+Ov5FFR3hVZ60guX8PGwzPYs6jHrrSB4C9q7AMtE583vD4Mly Ba7eegMw8KYtKMAV+y17RZGfkVPSJ0WXt/mQ3vhyDpO0WLgT6HB9yVVew6xiG+ijL7JK qKMimgxNnlUBvsyH8kpQa5r4Iil/Qj4Qn/eNHHdLSJhNGCq6HZSg4WYL91Ej05ygkIwK SwAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777766744; x=1778371544; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=e+orEjBju94Wn5kqJa2iOEDSFRgssMF6O2tAVSchijk=; b=ovBHzH9TqRQbHFdA2jJguVXqHWzMcqtwNXVCWtWDwLumYx7Lxk7mudOJviYPoOvp2N 1+Hgn/Zdg6fuGqYIhGEYkDmYXj2p6d8xA/+2b1nmwnHurB3QaYwQeY9zSj9hBDwbRKHH dpcmGpUJPb3VhcST3VVhE97ouM0KBN/n8QfbqSs+M5vRpNyKX/s39fK+GGBpbfEIk0yA 8NC/K/iE6/kve6qZopxpGO89cAxdIGeEWGx1XrzoZfUgBYj4zzGNPqV9lO7N2pOa1s5j 9yq2oMeh+P2HwTk/zBfa5UTRqVV6of5t08elScE+SEh7JEcX3dAnwXcAUn1I1ROCYS+w PV3g== X-Forwarded-Encrypted: i=1; AFNElJ8IknU+w7F2oi3dk9iSBsO/HSoniyHWU6Bjj+YewkV7s5yrQJiwjLvAqbZElSnc9GL+44kQQkbtNsWQxZQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzlcvDVWaofRwStuKAzmJ/TXKwlyzmyxwurmOpWLbbb3ATzzvZf KD4HNRKi5jrogZ1EvpIWdd+U9sIt7CLYviGWSpn5hqD2HaK1G4pwDvI/ X-Gm-Gg: AeBDietUbYQAbCZ3WuYvM9LDjG2/rN8morHQHHUmjgC9wTZcQyHIWQ9yTPAOZ9NWsvo XkrDhEMbiNtBOgxyFq6pt0fE4PuIIoHHKVyfbZ4igeuxx1JVaYLyASw1zSRAdfeAdMF6GoSBZT2 OFTnV4NyEENTVmrC1VRtNREFHNFmnrwGLxyRehkjoIktMvvogPSlKIJmKnyEqHaDUX1tNsVz1+Q Vp51o4PyNMsuCeV/tlBspBSxDuLxSedvMZPHKJ2jTn9v6aY4JM9P1RstzexBeudPZ65KRo7u/mG fdLqLz4PxWd1w64u90mFfTVtM4Ni890h8mW0i6lGTzBvGrJmkBfxLmXtXV4evMF7TIgi2F09gQp /GPHEWBXBWDtURTGZD1uaQIZMjnySYqeFRvpUwuhkNcUhnTxLrKBEovkqMVSUir/CF+DmMS4o6P qo7hLLmvb7cUtUJ0c1xHUiHW8/I2Lm035uxx4D32FMvkkIdD7iTa9bZQvPrbfipHoiPUFb2Eu9 X-Received: by 2002:a05:6830:7306:b0:7dc:2f4f:17b4 with SMTP id 46e09a7af769-7dee13eb7ffmr2973910a34.21.1777766743703; Sat, 02 May 2026 17:05:43 -0700 (PDT) Received: from [100.82.231.29] (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 46e09a7af769-7decae2b090sm5379676a34.24.2026.05.02.17.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2026 17:05:43 -0700 (PDT) From: Jim Cromie Date: Sat, 02 May 2026 18:05:32 -0600 Subject: [PATCH 1/5] vmlinux.lds.h: refactor BOUNDED_SECTION_* macros into bounded_sections.lds.h 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-Transfer-Encoding: quoted-printable Message-Id: <20260502-asm-generic-1-v1-1-1103ee0152df@gmail.com> References: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> In-Reply-To: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> To: Arnd Bergmann , Jason Baron , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Jim Cromie X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777766741; l=3696; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=T4HdIJRhua32rXeeRFVONMGDwwZnoLvUq4UsJgWkg+Y=; b=atZx++KLjfkDNp37NiY8N611XjrKSTFbGie9Mj6Jk+d75vNFomY1fZg96TsGq1flERLmjq410 9KaoS6EEk2PD9rD86N56RBhUJ5HsrEKvzQaf6hkz9YmjiSI2qr7lLWf X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= Move BOUNDED_SECTION_* macros to a new helper file: include/asm-generic/bounded_sections.lds.h and include it back into vmlinux.lds.h. This allows its reuse later to fix a failure to keep dyndbg sections in some circumstances. NB: this ignores a checkpatch warning, because new file is covered by GENERIC INCLUDE/ASM HEADER FILES CC: Arnd Bergmann CC: linux-arch@vger.kernel.org Signed-off-by: Jim Cromie --- include/asm-generic/bounded_sections.lds.h | 36 ++++++++++++++++++++++++++= ++++ include/asm-generic/vmlinux.lds.h | 30 +------------------------ 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/include/asm-generic/bounded_sections.lds.h b/include/asm-gener= ic/bounded_sections.lds.h new file mode 100644 index 000000000000..8c29293ca7fb --- /dev/null +++ b/include/asm-generic/bounded_sections.lds.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef _ASM_GENERIC_BOUNDED_SECTIONS_H +#define _ASM_GENERIC_BOUNDED_SECTIONS_H + +#define BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + _BEGIN_##_label_ =3D .; \ + KEEP(*(_sec_)) \ + _END_##_label_ =3D .; + +#define BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + _label_##_BEGIN_ =3D .; \ + KEEP(*(_sec_)) \ + _label_##_END_ =3D .; + +#define BOUNDED_SECTION_BY(_sec_, _label_) \ + BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, __start, __stop) + +#define BOUNDED_SECTION(_sec) BOUNDED_SECTION_BY(_sec, _sec) + +#define HEADERED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_, _HDR_) \ + _HDR_##_label_ =3D .; \ + KEEP(*(.gnu.linkonce.##_sec_)) \ + BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) + +#define HEADERED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_, _HDR_)= \ + _label_##_HDR_ =3D .; \ + KEEP(*(.gnu.linkonce.##_sec_)) \ + BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) + +#define HEADERED_SECTION_BY(_sec_, _label_) \ + HEADERED_SECTION_PRE_LABEL(_sec_, _label_, __start, __stop) + +#define HEADERED_SECTION(_sec) HEADERED_SECTION_BY(_sec, _sec) + +#endif /* _ASM_GENERIC_BOUNDED_SECTIONS_H */ diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index 60c8c22fd3e4..f78300aea8f6 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -211,35 +211,7 @@ # endif #endif =20 -#define BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) \ - _BEGIN_##_label_ =3D .; \ - KEEP(*(_sec_)) \ - _END_##_label_ =3D .; - -#define BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) \ - _label_##_BEGIN_ =3D .; \ - KEEP(*(_sec_)) \ - _label_##_END_ =3D .; - -#define BOUNDED_SECTION_BY(_sec_, _label_) \ - BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, __start, __stop) - -#define BOUNDED_SECTION(_sec) BOUNDED_SECTION_BY(_sec, _sec) - -#define HEADERED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_, _HDR_) \ - _HDR_##_label_ =3D .; \ - KEEP(*(.gnu.linkonce.##_sec_)) \ - BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) - -#define HEADERED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_, _HDR_)= \ - _label_##_HDR_ =3D .; \ - KEEP(*(.gnu.linkonce.##_sec_)) \ - BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) - -#define HEADERED_SECTION_BY(_sec_, _label_) \ - HEADERED_SECTION_PRE_LABEL(_sec_, _label_, __start, __stop) - -#define HEADERED_SECTION(_sec) HEADERED_SECTION_BY(_sec, _sec) +#include =20 #ifdef CONFIG_TRACE_BRANCH_PROFILING #define LIKELY_PROFILE() \ --=20 2.54.0 From nobody Sun Jun 14 06:08:19 2026 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D191040DFD9 for ; Sun, 3 May 2026 00:05:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766748; cv=none; b=XqXo1CjVKY+FRqDlFVw2YfRiL8/zbBr66mnGO302/yeWQX7btt5YtSfmeKMq79Wo+dofYuwpK4gLHQTPFI5fidvAxObETY2FI2ad2R96hl7NA8FUr8tsxkHY6vp6sTbMOazPb1xDaENSNw6D83f/2vzpUa/6EKQwW7OyqdzpUm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766748; c=relaxed/simple; bh=gyhl2dDHOhDRfo2EoLm//e3PBy86xHd/L/qSVe14+FQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OqKJUCP++tA/kA59XbQfvyIIR3CaE7xk4sDFS7FQfhaMLA7EwxD3rQVIOrQjF6tfQXOH85DIKu8gM4WYaKkWazxYwFwJockVOK+CN/n9yi9s2FkF+NTXQlni4X+s8lAxmOStkQuZzOZYh5UNJIi5iCbSjdOMc17iNKixv6/RXUo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=g3VOCxne; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g3VOCxne" Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-7dbd23bc684so1949202a34.2 for ; Sat, 02 May 2026 17:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777766745; x=1778371545; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GsoCp+QEhPQqcC7YciJ1pPB6BZ3pQYi3CKXlL70tQeM=; b=g3VOCxnecD/pohIyg7NcjpGfMQ+HU4vwtWCmXltWCtycAbEglYyepfJz2h8UhRuGRy WUWQfZowyrzQyUp+Ll9F8DAFFIDmbt0/6OvK7ZTpO8poIkY63ULjRQFNz22ynTIMhD5F skvj10gFxkfzQaQaBkgchHFfUw5rNrYgWtTBY9jBx/cCojOxfa+lehENsKFW+D/m5HjL gTHyDpCfDuVmmnkxOjPAPLpcC7AzNdUwu6Ej131P71Cscv4RyaRBb6ZpfjUVIjSH6s6u w2iVxOpf9OGJOD7FLNIkUepmVbYwVPAypj5SyI5yihoxbkO3meft9h3mFJ0eDoPSpbqI zIYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777766745; x=1778371545; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=GsoCp+QEhPQqcC7YciJ1pPB6BZ3pQYi3CKXlL70tQeM=; b=RvmFVCnJ3JGGIqf6o0MCknIWqhP3y8zdxOpv5MmYrSF8UktYzYJw/HDZWlg3cDvp1v wnYqfAUPhhJKG5nnNZI9JANoxi11QGQyqmB9lV4t7BPPzNtAVDh+gD/hD4q4f6cyCHDD JXPYReltvWL+y20d+82brctYDC6airxawwTycas1ifve/pEyZJZjS5Wl93IVb0sEd0i8 QWBgI0eT8OXKHqUqsQ4S+00R5bAD/J5JOj1U/M42H12r6zOQcZGpphcnspDPs2fC+P76 05X5SD9nQhTck3aP33fOQiIVAmbokw1/V1PoPmCEWmXpIu2allSbqNq5dmrKW42XCNOk JmFA== X-Forwarded-Encrypted: i=1; AFNElJ8cQcvv4XcfmldRF+YKfg389Q8eget4/By+MnFOvxTljpMGb+LJ3ug1cyklYEZFReYW7LU2qAE3/RWG/iM=@vger.kernel.org X-Gm-Message-State: AOJu0Yyn6LZdnghooQ+Feov6LTZs4d7zKnW7ilxQzV1NYQh8Z700Rdw0 TmLq/QX8gvuVUfnPwfYPvlcAuCRRCXLt2a/VI9MRs6WAmeljhbwu9kGy X-Gm-Gg: AeBDiesVKOhWrZnuON60XA9emdWt2qiPyLYd3l1feHp6teJH4g5g+paskYPq05F02td xgvj1dr8ecPFLc5AgQXjT+dmmRvfKQdZAHfMTETswVvWgxE48do/GSftqxs8nfpIiMdI2FKXAfd xFnVqO2VcRK/bL5IhsxGafQeFVBSPOUAoqtD02U70CN+JW078LzX/a/v2QjTyn4M+sC8fG3GxbF WnCoXvVbdU1uBUBuOiX8Xr6ampo8ZjR5lPGN+eG4BX36rdqGC6LxzLpD65h7mjaQCHUrM5rkJ+A jlvZFM5RgDXSYYeTw4PXsd1+rJcq54n0XXJm+nWEV5sp2y+QeVM27JZjWi/QC5rVoWHCiI6m6yk TZrKP1FoTJAAzHvMhuriN+tjRB0I75I6uPWTGEul2+uQxtKjEyGSKwTs2oblheNxsPxCibtzJCh xCYbxNYPsuNlSwx9hIwYfdEx6naKnhjKWqI7DEyGdOFreGnul63fRUhvMZz/8YuCkB3pfzofTX X-Received: by 2002:a05:6830:82d1:b0:7dc:dd19:7f69 with SMTP id 46e09a7af769-7dee13b08e6mr2908812a34.17.1777766744839; Sat, 02 May 2026 17:05:44 -0700 (PDT) Received: from [100.82.231.29] (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 46e09a7af769-7decae2b090sm5379676a34.24.2026.05.02.17.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2026 17:05:44 -0700 (PDT) From: Jim Cromie Date: Sat, 02 May 2026 18:05:33 -0600 Subject: [PATCH 2/5] vmlinux.lds.h: drop unused HEADERED_SECTION* macros 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-Transfer-Encoding: quoted-printable Message-Id: <20260502-asm-generic-1-v1-2-1103ee0152df@gmail.com> References: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> In-Reply-To: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> To: Arnd Bergmann , Jason Baron , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Jim Cromie X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777766741; l=1428; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=gyhl2dDHOhDRfo2EoLm//e3PBy86xHd/L/qSVe14+FQ=; b=CHcC16x2mZkLd9L6WSnN21EV5fptSGWQ+tM7q3yJFpjXLAwI5HVDVy3sD2GXtxkwS/MquW4pq 9tslC9W6skxA/B/GQxi1A1G+gAdw3J1OCTEvOBGH/eoQDbxX3x07d+M X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= These macros are unused, no point in carrying them any more. NB: these macros were just moved to bounded_sections.lds.h, from vmlinux.lds.h, which is the known entity, and therefore more meaningful in the 1-line summary, so thats what I used as the topic. Signed-off-by: Jim Cromie --- include/asm-generic/bounded_sections.lds.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/include/asm-generic/bounded_sections.lds.h b/include/asm-gener= ic/bounded_sections.lds.h index 8c29293ca7fb..268cdc34389b 100644 --- a/include/asm-generic/bounded_sections.lds.h +++ b/include/asm-generic/bounded_sections.lds.h @@ -18,19 +18,4 @@ =20 #define BOUNDED_SECTION(_sec) BOUNDED_SECTION_BY(_sec, _sec) =20 -#define HEADERED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_, _HDR_) \ - _HDR_##_label_ =3D .; \ - KEEP(*(.gnu.linkonce.##_sec_)) \ - BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) - -#define HEADERED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_, _HDR_)= \ - _label_##_HDR_ =3D .; \ - KEEP(*(.gnu.linkonce.##_sec_)) \ - BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) - -#define HEADERED_SECTION_BY(_sec_, _label_) \ - HEADERED_SECTION_PRE_LABEL(_sec_, _label_, __start, __stop) - -#define HEADERED_SECTION(_sec) HEADERED_SECTION_BY(_sec, _sec) - #endif /* _ASM_GENERIC_BOUNDED_SECTIONS_H */ --=20 2.54.0 From nobody Sun Jun 14 06:08:19 2026 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D7F635959 for ; Sun, 3 May 2026 00:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766751; cv=none; b=i17gADI5evcEGweRh03civRzJT3AIFwQtbupO74sQKzE45TLHmUAvh0Ou/Lyk4k/AtqXcgZAdBfxtY/Eb571e7s3Gvnbepf6MNnv/dvmAWUwWBnd/mWJez1JBExgnJj02/OLK9L2wtRFrBulTg+Q7YZl4kN4HzE7ynoQlGsGh6k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766751; c=relaxed/simple; bh=XIgrbxGfBcI1a1vO4dXszCHdSe19TSDFODvG8fCABn8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HMZobn78mJj3WONmpHZNzx94GODrKrVhfB1a19lmBZDkUibnoNaY6lqlo/7se60YWvEqesS2il6WjxyKKt5Tz7GcWpVGBkqIPLAkRKG6d//DuCS2kng4O4uLBGGAKUYExYJVB8gbu2op8+9+cyp6S9g3dJg+k9SpZe0gc55uo74= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GivwvlBy; arc=none smtp.client-ip=209.85.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GivwvlBy" Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-7dca00c1591so903374a34.3 for ; Sat, 02 May 2026 17:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777766746; x=1778371546; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZJy3pLduHUQEJsOIJ6mQFn4RDUX2xoMEEvvPtoEzxc4=; b=GivwvlByN1p9NqV3NI0jcoEEvGTmxj9t5IS46kZmrjS49q4xheA1FJ5NZHp94aIFD4 W/2l5MUgHPp5NqNIkBt9W3XoHQ7/IB3HUIOJNpfJd0LTdmq1Z4uHYpfDuGwNMUtjIO6E 9EbwLbvdkV533TrQOjxiAI33pqIUM3Q4YQonm0Q+WvwqAL1av7bfQyKAxIKfITFQJ3GG kX+jmmXZvoRzyM68Nnyb1zZBCqGCrOUyfPPsSUq3L8cbxkAMb/aJTmlbS/KksuFhDNpr +aviNW/EOU0Huxs2rj7AocXd+myqGdvHuxjNye4drvxnNU+JmQOtuOI4+O8Fyf+bEFIE N/Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777766746; x=1778371546; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ZJy3pLduHUQEJsOIJ6mQFn4RDUX2xoMEEvvPtoEzxc4=; b=L7uMppJZQJXqz4quFlBuuTxY5cYzfAG1q9NBB0wtnb/o7expuZhCiuGf7InEiqdYzs HnRdw4+vBbYG8FmLMBTaYC3+NSJuXZUoNb5Qy5jSBXwGM+7tzXA7Md7JFsO+3iZB8JcA 7O2ps8gMufOfiYUNsLed4JgaxfiydvMlhVQ4Dj4FGltJnYvrI8kYXSqhBM4qjKrMj0u+ N+bMOzQ4k2S3PIT3n2iRn9XBlqDLnGeqiLNl6YSez8BMCcL0Vky0UZkBg/5KmmEEs9Dc 21oAy9yB2bWYvDJk4z4ihVe8HVofDS4nbu1bxMwgaF2rmTCT3wgY9giwddnV7N+JvXUt 36Ag== X-Forwarded-Encrypted: i=1; AFNElJ8B0NeraKtoqtaDcwXKC+gA+mdQAXI1Yee4X1F6TyehPaCFLPQqNxx2ISqRfoEkl1V1ezEZ0/hR+9wDDj8=@vger.kernel.org X-Gm-Message-State: AOJu0YxLJ1f04zt7wh+6iflLumnIhQhZjwbe6EctcN/j6ziHPxmjsDYt jK6oOvPpflTcgeYuoy9heislWC4lWVAM55RZ2Xo17vsZqqK607mQ7rJi X-Gm-Gg: AeBDietNAn3i4a5bZyL1XWzPOVu76ZRaw7DiZtCTdxlecyNo94B46TxXGLx+X95avI1 xGbV0S54yz5wX/8ItDO9hO0ETnNaTLZSewg3fqQTNcTnW+zD9G8QvLZZU0+APm3tVW9YdUOKpQM 50fLCvUP9xVDWnipaHp+RYCOaFj+1yCpzKUb69tDFPk2hicQa0GzT5gq2/flsmxTLkdSoiT0UZX Yh6UqhXK0LQeSrHPSHHKLDBHabNRYFSxMnVXcs5ELwVpaqsCGuO5j8+wOhrufPCDGegoi1qgmCq +Onh1CG0RiG0W32c8O3gxxmpMm24dgWiPzBotmfCDkpb0x7c+fC/fQNpWkidrht4gjBM3t3thQU wGm+Sri1/iGwA7TWL8rI1xI+T3cXfdvC4QhLH29ZE278KwDfmAihGafgciMC5SIzmBWy5KtD+eD j0SU5D8C7BVJ7QkvB4KXZKb1uMEeflA6U9WZQB0R6gAV48rqnx8NJrQ9cC9TTsUJQR/lo/dqpe X-Received: by 2002:a05:6830:2785:b0:7dc:d0e3:5bdd with SMTP id 46e09a7af769-7dee143b7f2mr2634196a34.19.1777766746228; Sat, 02 May 2026 17:05:46 -0700 (PDT) Received: from [100.82.231.29] (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 46e09a7af769-7decae2b090sm5379676a34.24.2026.05.02.17.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2026 17:05:45 -0700 (PDT) From: Jim Cromie Date: Sat, 02 May 2026 18:05:34 -0600 Subject: [PATCH 3/5] vmlinux.lds.h: Fix ALIGN(8) omission causing NULL ptr on i386 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-Transfer-Encoding: quoted-printable Message-Id: <20260502-asm-generic-1-v1-3-1103ee0152df@gmail.com> References: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> In-Reply-To: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> To: Arnd Bergmann , Jason Baron , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Jim Cromie , Louis Chauvet X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777766741; l=4326; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=XIgrbxGfBcI1a1vO4dXszCHdSe19TSDFODvG8fCABn8=; b=go6hhL+GZg1MThN9GkA9ic1Z78uoIl9KSJI4Z5X2pyNkZNh0ik2MzyKvza1Afhw/pxKZTBqDx anyKKlk04nGDEyOuxGZCfj6ccvMp/3eL7VTpDsT8sKq0f/X4eVaeSLU X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= Almost all uses of the BOUNDED_SECTION macros are ALIGN(8), either explicitly, or by being below an aligned section. The noteworthy exception is BOUNDED_SECTION(__dyndbg), which immediately follows BOUNDED_SECTION(__dyndbg_classes). On i386, struct _ddebug_classmap is 28 bytes, so without an explicit ALIGN(8) in the macro, the following __dyndbg section gets misaligned, causing a NULL ptr deref in dynamic_debug_init(). So fix this with an explicit ALIGN(8) in the existing macros, and introduce _ALIGNED variants to handle the rare exceptions. NOTES: ORC_UNWIND_TABLE now uses _ALIGNED macros to match the explicit . =3D ALIGN(x) instructions, but keeps the instructions so the symbols between them are not "re-aligned"; scripts/sorttable.c does not tolerate sloppy padding. Also add . =3D ALIGN(4) and change BOUNDED_SECTION to _ALIGNED, to agree with .orc_header, added here: b9f174c811e3 ("x86/unwind/orc: Add ELF section with ORC version identifier") Suggested-by: Louis Chauvet # _ALIGNED variant= s. Link: https://lore.kernel.org/lkml/177402491426.6181.12855763650074831089.b= 4-review@b4/ Signed-off-by: Jim Cromie --- include/asm-generic/bounded_sections.lds.h | 17 ++++++++++++++--- include/asm-generic/vmlinux.lds.h | 9 +++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/asm-generic/bounded_sections.lds.h b/include/asm-gener= ic/bounded_sections.lds.h index 268cdc34389b..8ff3e3420f60 100644 --- a/include/asm-generic/bounded_sections.lds.h +++ b/include/asm-generic/bounded_sections.lds.h @@ -3,19 +3,30 @@ #ifndef _ASM_GENERIC_BOUNDED_SECTIONS_H #define _ASM_GENERIC_BOUNDED_SECTIONS_H =20 -#define BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) \ +#define BOUNDED_SECTION_PRE_LABEL_ALIGNED(_sec_, _label_, _BEGIN_, _END_, = _ALIGNED_) \ + . =3D ALIGN(_ALIGNED_); \ _BEGIN_##_label_ =3D .; \ KEEP(*(_sec_)) \ _END_##_label_ =3D .; =20 -#define BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) \ +#define BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + BOUNDED_SECTION_PRE_LABEL_ALIGNED(_sec_, _label_, _BEGIN_, _END_, 8) + +#define BOUNDED_SECTION_POST_LABEL_ALIGNED(_sec_, _label_, _BEGIN_, _END_,= _ALIGNED_) \ + . =3D ALIGN(_ALIGNED_); \ _label_##_BEGIN_ =3D .; \ KEEP(*(_sec_)) \ _label_##_END_ =3D .; =20 +#define BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + BOUNDED_SECTION_POST_LABEL_ALIGNED(_sec_, _label_, _BEGIN_, _END_, 8) + #define BOUNDED_SECTION_BY(_sec_, _label_) \ BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, __start, __stop) =20 -#define BOUNDED_SECTION(_sec) BOUNDED_SECTION_BY(_sec, _sec) +#define BOUNDED_SECTION_BY_ALIGNED(_sec_, _label_, _ALIGNED_) \ + BOUNDED_SECTION_PRE_LABEL_ALIGNED(_sec_, _label_, __start, __stop, _ALIGN= ED_) + +#define BOUNDED_SECTION(_sec) BOUNDED_SECTION_BY(_sec, _sec) =20 #endif /* _ASM_GENERIC_BOUNDED_SECTIONS_H */ diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index f78300aea8f6..d3f20b411e16 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -641,7 +641,7 @@ #define EXCEPTION_TABLE(align) \ . =3D ALIGN(align); \ __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(__ex_table, ___ex_table) \ + BOUNDED_SECTION_BY_ALIGNED(__ex_table, ___ex_table, align) \ } =20 /* @@ -833,16 +833,17 @@ =20 #ifdef CONFIG_UNWINDER_ORC #define ORC_UNWIND_TABLE \ + . =3D ALIGN(4); \ .orc_header : AT(ADDR(.orc_header) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_header, _orc_header) \ + BOUNDED_SECTION_BY_ALIGNED(.orc_header, _orc_header, 4) \ } \ . =3D ALIGN(4); \ .orc_unwind_ip : AT(ADDR(.orc_unwind_ip) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_unwind_ip, _orc_unwind_ip) \ + BOUNDED_SECTION_BY_ALIGNED(.orc_unwind_ip, _orc_unwind_ip, 4)\ } \ . =3D ALIGN(2); \ .orc_unwind : AT(ADDR(.orc_unwind) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_unwind, _orc_unwind) \ + BOUNDED_SECTION_BY_ALIGNED(.orc_unwind, _orc_unwind, 2) \ } \ text_size =3D _etext - _stext; \ . =3D ALIGN(4); \ --=20 2.54.0 From nobody Sun Jun 14 06:08:19 2026 Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com [209.85.210.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DCB82030A for ; Sun, 3 May 2026 00:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766750; cv=none; b=G7Wys7HzqBEYWJDy5/LmmHPH5RPeZ9k3swxI6w3O83WW6m8NW2J+lnyFAzhoFwSoc+/+Chc1dUzdRiDWpDMocAb2ibynzElzX3SPH3t5yFhOMcBTxYEXreOeECUxLw12w/XpJDVR+ej+HmzdQmJkrANpCZYPUyoC4O63BnBRDsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766750; c=relaxed/simple; bh=jx+bBZ4Ea0N4OhMqfVeFfhxzER8rbH2ykIENWAaRjuk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F90H2vf7ZdyCCjiu/0hzT/GOoQOo4Dmv7s/JZ2YDTPAkE0powKidyCz0ncdOm2DT+wve7Yh/zjQd545q/WxJEkNbbpAbernnxV76LhtIC3i0ysLpppGICQMls/pOHNrYhM6OVxYbHp/8Ost+Wi1A1XG4B5dleGTEDMLzsdqcePc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kNJ5UQWW; arc=none smtp.client-ip=209.85.210.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kNJ5UQWW" Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-7d1872504cbso2555461a34.0 for ; Sat, 02 May 2026 17:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777766748; x=1778371548; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zsRoTlD3yayg24jIZYOgg3Ot8INI+rN2puwSkcqrIrc=; b=kNJ5UQWWkabQ30/abdU8LFnkhg0M22ISP9IqVnDmMvAimXOjbszMkKuRp+HxawozR1 zudoMB3waKOeeZTx79MBvSAOxj/QUj9iO5btumQIF3D4I3YcpJAJZ3q9JqTfyhABqWV9 LXsgC8BzbEhPBEGn/+Ipk+CBxdbkMRSXjYcOQiDs0UJFV7kclgYdX35op4uq14jocXyp MAMbRJHBbtVCWOJRAXHqp5MYL2tR53ZTTqoQRj8jS/4YBShROdUcxz/MLFTk7p8J9GHu PCYqCoWAiQvpNBKYC87BZc+kTQQh8mHeaN1wGWSfh+FoK4wad5uFBzx7hpb9X84RFbj2 q/Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777766748; x=1778371548; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=zsRoTlD3yayg24jIZYOgg3Ot8INI+rN2puwSkcqrIrc=; b=EDNXvuZB0G3pIJZ20mxkFux4KhOMP5Er2zDQ/G+/u2dc3C+eNfFfayrqDdwXUkNjdG 8VrltIfCAPq/FirU/VPbWIjQCidJsUvvpFcObqRC52nL1Jaqou3b7GWsy4sCcztryaCr q6lsmC9WZH9ZZmqhXC8VHrwMdbXXBPP5AROvhR+uDxSxdEe42HI9XuKP0fqj4JC0Zcmh 0G1t+gl078wIP9Q/M9vJyeBKDwyM6TD9W5ydtZjnc1YiQNJKCFhLG9hA3blMD3W26rK3 6VJNiVD1QNW4PZxR8ttWvdyCb29x5swllpc7Ys+mYJJHZ81VRwNYmdrB4MFuo+tLD3o6 wj7w== X-Forwarded-Encrypted: i=1; AFNElJ8hMeJHTi+MdA8J29LVN4AG3ko2AHZ/g2ibsmyhq+lOBcXCEKpYIxv75onft9He6CSvb6H//Y0hkER+KTs=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/5mqpif22swZZcwcvelBXxei9aeaps2gm9Ro6EjVqPU4R+qle j/vWM62rQG2kV+g7+pBJPssQfYlLjbV6kJTHY3Jj8Og9F9rw7Qjuf1PWBchh5qMj X-Gm-Gg: AeBDiesgPKpNbLmQtPhne59ADaxerbpMoCeVrd1U9wMMZ7a9QuMPfWOciDKvxufZ5/i UY1zseGdh5zC73YtuvHFKS13Vi5PG+HoEp8XxYNlo4UP5MOipDG3iq1h09QnvF9JR2cqXwt0lcq b5EqXSpg1iwpc7tARRsyWVo3kVCzBo9K1GybgpRI7dd+z7BFU9SMncKyjIjMLd8nVVqofdEW3rX 64R3Opvb57IAUgVgPTFfXofJSL01CDxbH4QYzLyOh3APfZf9hs4Xpxkfvo6ImL3mAklXTYt47YQ pY1A8suOlSyvpl5fJQVjCRaJLnwq0nOcWoKfcDAte7Es5yYL6t4un1FI9gpOXxRcZUl9oY+1wx1 IH3LbA8EhkLU+FNKl2fYDJbXPd737lLP63yia9LK9j8b5lBwbdo8VbwG3qe2axPT34MnE2d1hbG 4w1uxpwJYER+7OxFtFC58HyZ82rkz8WceRxPtZfocXorK4mZbe73zPJYyQ5auAWLQUQUYGyU9V X-Received: by 2002:a05:6830:6edb:b0:7db:a297:9e62 with SMTP id 46e09a7af769-7debe311362mr4677748a34.8.1777766747728; Sat, 02 May 2026 17:05:47 -0700 (PDT) Received: from [100.82.231.29] (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 46e09a7af769-7decae2b090sm5379676a34.24.2026.05.02.17.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2026 17:05:46 -0700 (PDT) From: Jim Cromie Date: Sat, 02 May 2026 18:05:35 -0600 Subject: [PATCH 4/5] vmlinux.lds.h: remove redundant ALIGN(8) directives 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-Transfer-Encoding: quoted-printable Message-Id: <20260502-asm-generic-1-v1-4-1103ee0152df@gmail.com> References: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> In-Reply-To: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> To: Arnd Bergmann , Jason Baron , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Jim Cromie X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777766741; l=3579; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=jx+bBZ4Ea0N4OhMqfVeFfhxzER8rbH2ykIENWAaRjuk=; b=SIcEjVBNyPi945YnFwtLqpMRiycq9NN0/ZNFFBbSslazq3QklTZ6cVnzFU0RU4ofAdzG2s0Ah fSjCMvxtqRZA7Jg0RyDeGcFk5s8i0Mx7JE+r9sVRf9Tt0DP6VAAhjua X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= The BOUNDED_SECTION_PRE_LABEL and BOUNDED_SECTION_POST_LABEL macros were recently updated to inherently enforce an 8-byte alignment. This makes the explicit '. =3D ALIGN(8);' statements preceding 'naked' macro calls in vmlinux.lds.h redundant. Remove these redundant alignment directives to clean up the file and clarify that the macros handle their own alignment padding. Signed-off-by: Jim Cromie --- include/asm-generic/vmlinux.lds.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index d3f20b411e16..d9d2eb708355 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -229,7 +229,6 @@ =20 #ifdef CONFIG_KPROBES #define KPROBE_BLACKLIST() \ - . =3D ALIGN(8); \ BOUNDED_SECTION(_kprobe_blacklist) #else #define KPROBE_BLACKLIST() @@ -245,7 +244,6 @@ =20 #ifdef CONFIG_EVENT_TRACING #define FTRACE_EVENTS() \ - . =3D ALIGN(8); \ BOUNDED_SECTION(_ftrace_events) \ BOUNDED_SECTION_BY(_ftrace_eval_map, _ftrace_eval_maps) #else @@ -262,7 +260,6 @@ =20 #ifdef CONFIG_FTRACE_SYSCALLS #define TRACE_SYSCALLS() \ - . =3D ALIGN(8); \ BOUNDED_SECTION_BY(__syscalls_metadata, _syscalls_metadata) #else #define TRACE_SYSCALLS() @@ -277,7 +274,6 @@ =20 #ifdef CONFIG_SERIAL_EARLYCON #define EARLYCON_TABLE() \ - . =3D ALIGN(8); \ BOUNDED_SECTION_POST_LABEL(__earlycon_table, __earlycon_table, , _end) #else #define EARLYCON_TABLE() @@ -285,11 +281,9 @@ =20 #ifdef CONFIG_SECURITY #define LSM_TABLE() \ - . =3D ALIGN(8); \ BOUNDED_SECTION_PRE_LABEL(.lsm_info.init, _lsm_info, __start, __end) =20 #define EARLY_LSM_TABLE() \ - . =3D ALIGN(8); \ BOUNDED_SECTION_PRE_LABEL(.early_lsm_info.init, _early_lsm_info, __start,= __end) #else #define LSM_TABLE() @@ -315,7 +309,6 @@ =20 #ifdef CONFIG_ACPI #define ACPI_PROBE_TABLE(name) \ - . =3D ALIGN(8); \ BOUNDED_SECTION_POST_LABEL(__##name##_acpi_probe_table, \ __##name##_acpi_probe_table,, _end) #else @@ -324,7 +317,6 @@ =20 #ifdef CONFIG_THERMAL #define THERMAL_TABLE(name) \ - . =3D ALIGN(8); \ BOUNDED_SECTION_POST_LABEL(__##name##_thermal_table, \ __##name##_thermal_table,, _end) #else @@ -404,12 +396,10 @@ __end_init_stack =3D .; =20 #define JUMP_TABLE_DATA \ - . =3D ALIGN(8); \ BOUNDED_SECTION_BY(__jump_table, ___jump_table) =20 #ifdef CONFIG_HAVE_STATIC_CALL_INLINE #define STATIC_CALL_DATA \ - . =3D ALIGN(8); \ BOUNDED_SECTION_BY(.static_call_sites, _static_call_sites) \ BOUNDED_SECTION_BY(.static_call_tramp_key, _static_call_tramp_key) #else @@ -454,7 +444,6 @@ *(.rodata) *(.rodata.*) *(.data.rel.ro*) \ SCHED_DATA \ RO_AFTER_INIT_DATA /* Read only after init */ \ - . =3D ALIGN(8); \ BOUNDED_SECTION_BY(__tracepoints_ptrs, ___tracepoints_ptrs) \ *(__tracepoints_strings)/* Tracepoints: strings */ \ } \ @@ -947,12 +936,10 @@ =20 /* Alignment must be consistent with (kunit_suite *) in include/kunit/test= .h */ #define KUNIT_TABLE() \ - . =3D ALIGN(8); \ BOUNDED_SECTION_POST_LABEL(.kunit_test_suites, __kunit_suites, _start, _= end) =20 /* Alignment must be consistent with (kunit_suite *) in include/kunit/test= .h */ #define KUNIT_INIT_TABLE() \ - . =3D ALIGN(8); \ BOUNDED_SECTION_POST_LABEL(.kunit_init_test_suites, \ __kunit_init_suites, _start, _end) =20 --=20 2.54.0 From nobody Sun Jun 14 06:08:19 2026 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E5CA33E7 for ; Sun, 3 May 2026 00:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766757; cv=none; b=Ne5CYCmXHMzSZqeZsDmWOrK3r9PF9PD4lzF554Z6YPj37EfR3tL+odMVlxAhR5UFbcxYx5eipZqTQQx4ocqTYslU9+dgaeUfzZuf3n18DWj4vPWtroGc6HMHLuFVAYStcOhrwrE5HgCCgh+hdv1WnvGpqB66DweuyPfN0ftHchM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777766757; c=relaxed/simple; bh=WCo4IngWd7T+cDO/VH26BhNsjTRcrHFIF+C77YDtGX0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Q0kIsDKEsg7igK9pCqx6culSA7J6rA+cJXvWHg7JkKIJ4FeMPaIDfjWoB8mKlw/NEfz3IhN5s6Zn9eV6qBfb8Uo6CKD/WwcllzlXW3dWgPjQNyEgY3bfLahQWQBLg9PMFXnMvx/14BcUJEn3sFJQDm/zgls3OINyYNu+JRvngYo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=oilHwTjx; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oilHwTjx" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-7de46b8e432so2931678a34.1 for ; Sat, 02 May 2026 17:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777766749; x=1778371549; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hi2XkQAfIYbnsnMWknwKW3P0EwWvqlKqATEGqIBom3w=; b=oilHwTjxcwEv/t+DbLpUfAvRhrGOkLlkopVDpt8F+3jmufxgyHyGAqCKjf7afdqq7i 5/fRDtaHuumV6Z9X/zrFXN8OppvVkxiYVw1Bbu2+EiVH8gwpmns/TfqNl6aXGtrA7Y3H Qdiwo47LBpuzGBbOZbbqBblIkG56Ncwckfl6jigkAPK3DzvvwVlXCE8Q5bImjYJx3AlM nBXxFA7JG8SEsPhZDj5UPJDoGPs4GeqaF/LMCUIo4Swl5HR2rf5wTy+8aIhT3S8fLgo4 Fnr2hUXb4PLj3U7cAmNcVQAKJVOQqTmdB4bg4HdJAEXMnS/wppHx15Sy3B9nEl813/BD baEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777766749; x=1778371549; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hi2XkQAfIYbnsnMWknwKW3P0EwWvqlKqATEGqIBom3w=; b=CExztMkhtl/CCsaTAVtUrmQ6ZARW8SBClyK9e+ng7T0TCZ2POOFIa+MdMN+iOFIpp9 Q8n2ElqO974gZHwMXot3VXTHcXwtHT410kKemWz9LlMAY+r1Jmjp10CIdPCEm1vvzoF2 yJKLwWzla8W6QIzrLq94qVqu3inCOegqUymBk/bDynGVxw/J+ep5XnSePhkrVUeHOG9Y vdt/Jn4lAFIO8P+5/2z7H5eo/n5Hm6N1wJ6Qov3DUn9r6BWB0g+ki8rVGI20rxh7Cw/s zzMgMli90ZK4/bLN10hNyWjQ792B/Ls2k37Gmf5M/BJDR4vMY365JQDb81+av49vu9qm rLxg== X-Forwarded-Encrypted: i=1; AFNElJ8o0Oxhu/6QjdcfFMZnNyfvFgJLsK1Cod4FdsjLeLTOJqx1Y89yE/3tAGsmN/hs88TLvTUwu1NWtPb21aQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzN7nL7Q5VhGq6TPXsPXP0tiBzvWqnQI7yiL4u4OJf84dbbMtg5 0ExE85nlVB+rpFkiJnf11srbIKokHBsAV2KdDanFQ12SLflDvm9S6lV65RYlIBo/ X-Gm-Gg: AeBDieuw9a4/67ew0lo+BC7tdHWIGvdM0gjVRfUXAegI8Nzt7d+gVj8wFf3aIveB+zc sQ2xnlb8AJx/Kbb2feJ+g5KywiND/GAw+DITRjFCCafuSqyyRh4Lja1YbE4Q3uWPkGMiJ/6JiTz 1t+FQw/MzVPL9NkEitCiTwxkx7hwHoTrELHWes2WIW86nEsNCGenJc1sWzRyFi0hVvFxJUNxQx+ LkrZaxNGIg/Ds55Npi+O4D1mQjqUOVRsUqKKiGoTaOq4HqIotcDHMsHlvxJs3fTlknjGv3ATVYA I0N/GREKF6kM1thQpramnvpzS/vdoNZ9AkUcOnd5ay8xRuhbvLbs+pMYubdR+zTqF4eNYViJBQ2 /6zw7P7J3Tn+LilBvrbrn7Roab6wQgCmTi5V0vy+hLkts0KZrXpoOX4mCDDKbNEnDjR0qnXEOGt i73mDWjpUMlLSUfIt75U3raRNPpex+VBUhmqA4BdYZuuzjOo2vbuUh/pWjV83Z7uYBdF1gw1ej X-Received: by 2002:a05:6830:6401:b0:7d7:f13a:761c with SMTP id 46e09a7af769-7dee14371b8mr2524196a34.23.1777766749001; Sat, 02 May 2026 17:05:49 -0700 (PDT) Received: from [100.82.231.29] (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 46e09a7af769-7decae2b090sm5379676a34.24.2026.05.02.17.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2026 17:05:48 -0700 (PDT) From: Jim Cromie Date: Sat, 02 May 2026 18:05:36 -0600 Subject: [PATCH 5/5] dyndbg.lds.S: fix lost dyndbg sections in modules 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-Transfer-Encoding: quoted-printable Message-Id: <20260502-asm-generic-1-v1-5-1103ee0152df@gmail.com> References: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> In-Reply-To: <20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com> To: Arnd Bergmann , Jason Baron , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Jim Cromie X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777766741; l=3739; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=WCo4IngWd7T+cDO/VH26BhNsjTRcrHFIF+C77YDtGX0=; b=MsxKRcJINzBKfgiZDoIH1qONFugHmNLzQUcfOGghBMScsKxNkgzec9MtG5jAsiiLe9m+rcTUV 5sfTrj25FmZCpkyMojb71FU6WQXFERQyTQ+FEdOpzVG0bJ2mUveh2qu X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= Several build configs had problems with __dyndbg* sections getting lost in drm drivers. Fix this by following the model demonstrated in codetag.lds.h. Introduce include/asm-generic/dyndbg.lds.h, to bundle dynamic-debug's multiple sections together, into 2 macros: vmlinux.lds.h DATA_DATA: move the 2 BOUNDED_SECTION_BY(__dyndbg*) calls into dyndbg.lds.h DYNDBG_SECTIONS(). vmlinux.lds.h now includes the new file and calls the new macro. MOD_DYNDBG_SECTIONS declares the 2 BOUNDED_SECTION_BY calls, but wraps them with output section syntax to keep them as known and separate ELF sections in the module.ko. The KEEP fixes the lost section. dyndbg.lds.h includes (reuses) bounded-section.lds.h scripts/module.lds.S: now calls MOD_DYNDBG_SECTIONS right before the CODETAG macro (consistent with their placements in vmlinux.lds.h), and also includes dyndbg.lds.h This isolates vmlinux.lds.h from further __dyndbg section additions. CC: Arnd Bergmann Signed-off-by: Jim Cromie --- MAINTAINERS | 1 + include/asm-generic/dyndbg.lds.h | 19 +++++++++++++++++++ include/asm-generic/vmlinux.lds.h | 6 ++---- scripts/module.lds.S | 2 ++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2fb1c75afd16..182e50b0fad9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9070,6 +9070,7 @@ DYNAMIC DEBUG M: Jason Baron M: Jim Cromie S: Maintained +F: include/asm-generic/dyndbg.lds.h F: include/linux/dynamic_debug.h F: lib/dynamic_debug.c F: lib/test_dynamic_debug.c diff --git a/include/asm-generic/dyndbg.lds.h b/include/asm-generic/dyndbg.= lds.h new file mode 100644 index 000000000000..f95683aa16b6 --- /dev/null +++ b/include/asm-generic/dyndbg.lds.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DYNDBG_LDS_H +#define __ASM_GENERIC_DYNDBG_LDS_H + +#include +#define DYNDBG_SECTIONS() \ + . =3D ALIGN(8); \ + BOUNDED_SECTION_BY(__dyndbg, ___dyndbg) \ + BOUNDED_SECTION_BY(__dyndbg_classes, ___dyndbg_classes) + +#define MOD_DYNDBG_SECTIONS() \ + __dyndbg : { \ + BOUNDED_SECTION_BY(__dyndbg, ___dyndbg) \ + } \ + __dyndbg_classes : { \ + BOUNDED_SECTION_BY(__dyndbg_classes, ___dyndbg_classes) \ + } + +#endif /* __ASM_GENERIC_DYNDBG_LDS_H */ diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index d9d2eb708355..54897d742c6c 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -332,6 +332,7 @@ /* * .data section */ +#include #define DATA_DATA \ *(.xiptext) \ *(DATA_MAIN) \ @@ -345,10 +346,7 @@ *(.data..do_once) \ STRUCT_ALIGN(); \ *(__tracepoints) \ - /* implement dynamic printk debug */ \ - . =3D ALIGN(8); \ - BOUNDED_SECTION_BY(__dyndbg_classes, ___dyndbg_classes) \ - BOUNDED_SECTION_BY(__dyndbg, ___dyndbg) \ + DYNDBG_SECTIONS() \ CODETAG_SECTIONS() \ LIKELY_PROFILE() \ BRANCH_PROFILE() \ diff --git a/scripts/module.lds.S b/scripts/module.lds.S index b62683061d79..2e62dc5bd5d4 100644 --- a/scripts/module.lds.S +++ b/scripts/module.lds.S @@ -10,6 +10,7 @@ #endif =20 #include +#include =20 SECTIONS { /DISCARD/ : { @@ -61,6 +62,7 @@ SECTIONS { *(.rodata..L*) } =20 + MOD_DYNDBG_SECTIONS() MOD_SEPARATE_CODETAG_SECTIONS() } =20 --=20 2.54.0