From: Jim Cromie <jim.cromie@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>, Jason Baron <jbaron@akamai.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Aaron Tomlin <atomlin@atomlin.com>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, Jim Cromie <jim.cromie@gmail.com>,
Louis Chauvet <louis.chauvet@bootlin.com>
Subject: [PATCH v2 0/5] dyndbg: fix i386 alignment and KEEP module sections
Date: Thu, 07 May 2026 14:40:04 -0600 [thread overview]
Message-ID: <20260507-asm-generic-1-v2-0-47c52759d268@gmail.com> (raw)
This series starts with a fix to a section misalignement on i386, and
follows with cleanups and refactoring for reuse.
When CONFIG_DRM_USE_DYNAMIC_DEBUG=Y (currently marked BROKEN) and
CONFIG_DRM=y, the __dyndbg_classes section gets a single
struct/record. On i386 this is 28-bytes, breaking the required
ALIGN(8) on the following __dyndbg section.
This breaks dynamic_debug_init() with a NULL pointer dereference; the
section traversal logic encounters padding bytes instead of a valid
descriptor.
the series:
1. refactors BOUNDED_SECTION_* macros for later reuse
v2- adds note that macros are for vmlinux.lds.h only, not for modules.
2. drops unused HEADERED_SECTION_* macros
3. fixes ALIGN(8) omission causing NULL ptr on i386
adds,uses BOUNDED_SECTION _ALIGNED variants
4. removes now redundant ALIGN(8)s in vmlinux.lds.h
5. adds dyndbg.lds.S to KEEP sections in modules
follows codetag.lds.h model
v2:
- avoids BOUNDED_SECTION in modules. Since ELF sections have well
defined bounaries, _start & _end symbols are useless, and empty
sections are unhelpful, possibly confusing to tools.
- sets 0 address to the sections, not just whatever current is.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
Changes in v2:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v1: https://lore.kernel.org/r/20260502-asm-generic-1-v1-0-1103ee0152df@gmail.com
---
Jim Cromie (5):
vmlinux.lds.h: refactor BOUNDED_SECTION_* macros into bounded_sections.lds.h
vmlinux.lds.h: drop unused HEADERED_SECTION* macros
vmlinux.lds.h: Fix ALIGN(8) omission causing NULL ptr on i386
vmlinux.lds.h: remove redundant ALIGN(8) directives
dyndbg.lds.S: fix lost dyndbg sections in modules
MAINTAINERS | 1 +
include/asm-generic/bounded_sections.lds.h | 32 +++++++++++++++++
include/asm-generic/dyndbg.lds.h | 19 ++++++++++
include/asm-generic/vmlinux.lds.h | 58 +++++-------------------------
scripts/module.lds.S | 2 ++
5 files changed, 62 insertions(+), 50 deletions(-)
---
base-commit: 6d35786de28116ecf78797a62b84e6bf3c45aa5a
change-id: 20260502-asm-generic-1-32c842a35dd0
Best regards,
--
Jim Cromie <jim.cromie@gmail.com>
next reply other threads:[~2026-05-07 20:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 20:40 Jim Cromie [this message]
2026-05-07 20:40 ` [PATCH v2 1/5] vmlinux.lds.h: refactor BOUNDED_SECTION_* macros into bounded_sections.lds.h Jim Cromie
2026-05-07 20:40 ` [PATCH v2 2/5] vmlinux.lds.h: drop unused HEADERED_SECTION* macros Jim Cromie
2026-05-07 20:40 ` [PATCH v2 3/5] vmlinux.lds.h: Fix ALIGN(8) omission causing NULL ptr on i386 Jim Cromie
2026-05-07 20:40 ` [PATCH v2 4/5] vmlinux.lds.h: remove redundant ALIGN(8) directives Jim Cromie
2026-05-07 20:40 ` [PATCH v2 5/5] dyndbg.lds.S: fix lost dyndbg sections in modules Jim Cromie
2026-05-14 6:46 ` Petr Pavlu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507-asm-generic-1-v2-0-47c52759d268@gmail.com \
--to=jim.cromie@gmail.com \
--cc=arnd@arndb.de \
--cc=atomlin@atomlin.com \
--cc=da.gomez@kernel.org \
--cc=jbaron@akamai.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.