From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.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 827814266BE for ; Fri, 15 May 2026 08:58:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778835508; cv=none; b=rTEIrOrug6KRxUhs3efk6Xlj6Pxwb2twIwUIDimpfrYuyhUFugdCrn5FCTkKa2v0ANQPiMBp6/d8W9JoXEdNhXDXDASj/pfTVXGlTj9MkyTfzd5B1cJ2dYhU2rituxZMXlfBkaeTiEUNIohsA+vXTZfK4tYV7f2+Huj4h0GN9GE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778835508; c=relaxed/simple; bh=DpvFIVIZ1tKrtWFxiFTVbPPLSCZ0en//NG1n+cRrz7w=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=EAQXbJe2QCPtuVt4XBEmUVYQNeyvvmsZkA3mjXgZVi6Nv14aOsCMIJrG9ZKbFXbrZH+LD8esNwz76IYbKPq9GmxsbkJa8gRcPTh3W1KVxPkHAzaY+9SII6kCK9IUvxkyMWpjQIxt5BOT5i/KS5LtXvBe1boH1E7DX21Qxlv77CQ= 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=lu1TFt3j; arc=none smtp.client-ip=209.85.221.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="lu1TFt3j" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-453903ee4adso7651582f8f.3 for ; Fri, 15 May 2026 01:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778835505; x=1779440305; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=S/wqiPCT0YPI0qW/S/HjDfZIvr2fAKk25WVI+QsyRLU=; b=lu1TFt3jFJAr69OsE0Eswzb6yQhiw6jPt5rhSG5X9W/kklg09kZg51UlfWMXrNmxtH Aw+t8dnmvpj1z6xqvdwbhuxLujH7q0zbdT6Da2bR+6CrSBczvnJ/M7VidrBq9BYsIeMt zd4/mYLqqOBKl/Of1P7pTT9bEMG9LwtymPHejYPa9QF3vWqVk1Bd7HRdw+1w59kfu8XY Pevii3A19PjU7KXF1DpHJnnffHk0XMODH5y9/xk6eQBrurYZpRd9bYYVq92owdKU7Or0 APqc39F0X586dpv5ymyHKtL76A0RwT4fPAZW9E0RTcvLVj5B5UxhF9dMD4I5idOgCmZw U4ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778835505; x=1779440305; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=S/wqiPCT0YPI0qW/S/HjDfZIvr2fAKk25WVI+QsyRLU=; b=n4LSdn2y4VcZ0yCUNunP0MTrz1X/rdzmOhvER7SSjVV63cwGRmK4v9hCa744Ht8Ij+ GM8mxY080gI0qrf3o6oQU3nrmkbyRDAxkS2L8Qto4DkB8Lgcphb3UY2M3yEXWypmaTT9 K/gHixqQjdPyYpNbgeuwMhivTVNnq3w8lbtTA4Y7XM8AdoiZREB+xIiR/7dho6m1IC4z eTrlFfvU6fh1e+zFKeKQWnnsXT+RkKdRCheZzTN5WrmI8i7K+69OqqCmAM8tPxPJQpAg zFDiaCBPBuoMZb//CpTCs7xpN50QJ8bf962XcdX/FFeRcDYGDMMTI9pPLfyC0mnp4lzD pVsw== X-Forwarded-Encrypted: i=1; AFNElJ96ZwcopVYjSwqJf6XSwXPitjEQ63XGxfbPglGsuHuS0cH5Y8JtfwGWERcIgvQjxZI6Qeqr/B0WmUqB0lQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yx85r8zqgESMAORqD/EAp85vqBcAlC0r3XZacUevA4Q0pwlYFek rtQTFTiTqZzMjTauy2eJTFZuR97coHanRf+oxLqTmByIH73pG3TzbJ5nyTc9bVFmn0Q= X-Gm-Gg: Acq92OEkf7nkzWRBMYOyjpLiIx6I7oNXUWQ0ewcUwz/7VF9PWOxIg8sQKoFJto1wbLD UfuOiEf7hhtoc4ERv4WIPxsIrf7sYWjYYS4KuqqCPjGunv71tr90kdDFUeWTXDvhYErMqF1aXVJ j6xKhA3l48ucLtV5TAeEy0Lz07zuTP30593qIFdLtG79a/p6m2DjCIyHcP4WuglHNxGLvfJ7qMJ 1ett3KMDbzLi7l+pzhqgi59hzDcz4+w1TDgEuljfG+0WS77IJxuYF0JF4B/cx4IcbDT6hQ/JNkU PLnELez3EUqczZ1p1ceQDfTHVpNQ0QkVxxRLuLMpF1SgVh9UFckC9u453wZPtcTYA09HaIAIi9j upXcDdHifUGJlIVosNpEJ5KFRlxcMXjETQZtJCjMC+UgbI1FALDZVAyz+WUuijywtiklPcjhj+A hEgqRvAxp+WIJL8HsWhVPULbYo+PTDvb+9M60UmUTz2hU= X-Received: by 2002:a05:6000:3108:b0:43d:773d:78ff with SMTP id ffacd0b85a97d-45e5c5874e3mr3808053f8f.27.1778835504446; Fri, 15 May 2026 01:58:24 -0700 (PDT) Received: from [192.168.1.210] ([2a00:23c8:33b9:3b01:f7b1:b7a0:6254:c325]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-45d9e768c4fsm13142610f8f.8.2026.05.15.01.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 01:58:23 -0700 (PDT) From: Jim Cromie Subject: [PATCH v3 0/5] dyndbg: fix i386 alignment and KEEP module sections Date: Fri, 15 May 2026 02:58:09 -0600 Message-Id: <20260515-asm-generic-1-v3-0-680b273666d4@gmail.com> 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: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/3XMywqDMBCF4VeRWXdKMjFqu+p7lC5CMmqgXkhKa BHfvdGVFLo8B75/gcjBc4RrsUDg5KOfxjzUqQDbm7Fj9C5vIEGV0ILQxAE7HrOyKFGRbUoySjs nIJs5cOvfe+/+yLv38TWFz55Pcnv/lZJEgVIKxSykJtfeusH459lOA2ylREdd/2rKuqytplpfH FXNUa/r+gXBfPbM6AAAAA== X-Change-ID: 20260502-asm-generic-1-32c842a35dd0 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=1778835503; l=2729; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=DpvFIVIZ1tKrtWFxiFTVbPPLSCZ0en//NG1n+cRrz7w=; b=Ui9msCCEx+Ir7Hz8Ovx6hpfNqXShEbOJmFFaKRmm0uhdl3Bk9K/rqlNt/k2Xgk/B05Ip9zVII I/hO7sAZ13BDeSwmmAbSfGeZG0juxaDfOoXlhPA71xQJ1zK/LFcw+af X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= 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 v3: move #includes to top of files, drop redundant ALIGN(8) in dydnbg.lds.S: DYNDBG_SECTIONS macro add Reviewed-by tag (thx Petr) 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 --- Changes in v3: - EDITME: describe what is new in this series revision. - EDITME: use bulletpoints and terse descriptions. - Link to v2: https://lore.kernel.org/r/20260507-asm-generic-1-v2-0-47c52759d268@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 | 18 +++++++++ include/asm-generic/vmlinux.lds.h | 59 ++++-------------------------- scripts/module.lds.S | 2 + 5 files changed, 61 insertions(+), 51 deletions(-) --- base-commit: 5d6919055dec134de3c40167a490f33c74c12581 change-id: 20260502-asm-generic-1-32c842a35dd0 Best regards, -- Jim Cromie