public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] PATCH 0/6] dyndbg: fix i386 alignment and KEEP module sections
@ 2026-05-03  0:05 Jim Cromie
  2026-05-03  0:05 ` [PATCH 1/5] vmlinux.lds.h: refactor BOUNDED_SECTION_* macros into bounded_sections.lds.h Jim Cromie
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jim Cromie @ 2026-05-03  0:05 UTC (permalink / raw)
  To: Arnd Bergmann, Jason Baron, Luis Chamberlain, Petr Pavlu,
	Daniel Gomez, Sami Tolvanen, Aaron Tomlin
  Cc: linux-arch, linux-kernel, linux-modules, Jim Cromie,
	Louis Chauvet

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. adds ALIGN(8) to the BOUNDED_SECTION_* macros

2. refactors BOUNDED_SECTION_* macros for later reuse

3. adds dyndbg.lds.S to KEEP sections in modules
   follows codetag.lds.h model

4. drops unused HEADERED_SECTION_* macros

5. removes redundant (after patch 1) ALIGN(8)s in vmlinux.lds.h

6. adds BOUNDED_SECTION_* _ALIGN variants,
   usea them in ORC_UNWIND_TABLE

Signed-off-by: Jim Cromie <jim.cromie@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: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260502-asm-generic-1-32c842a35dd0

Best regards,
-- 
Jim Cromie <jim.cromie@gmail.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-05  7:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03  0:05 [PATCH 0/5] PATCH 0/6] dyndbg: fix i386 alignment and KEEP module sections Jim Cromie
2026-05-03  0:05 ` [PATCH 1/5] vmlinux.lds.h: refactor BOUNDED_SECTION_* macros into bounded_sections.lds.h Jim Cromie
2026-05-03  0:05 ` [PATCH 2/5] vmlinux.lds.h: drop unused HEADERED_SECTION* macros Jim Cromie
2026-05-03  0:05 ` [PATCH 3/5] vmlinux.lds.h: Fix ALIGN(8) omission causing NULL ptr on i386 Jim Cromie
2026-05-03  0:05 ` [PATCH 4/5] vmlinux.lds.h: remove redundant ALIGN(8) directives Jim Cromie
2026-05-03  0:05 ` [PATCH 5/5] dyndbg.lds.S: fix lost dyndbg sections in modules Jim Cromie
2026-05-05  7:26   ` Petr Pavlu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox