From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (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 04B45345CAE for ; Thu, 23 Apr 2026 20:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776977651; cv=none; b=io56Cg08S7CkrjljF2q2MZTX5bN5xJlZKQ8itCtP/w7GX8GDzzfC1RyMRF8ixe7L6gwVXCijF6XSgPt/EOYP9vodaPdHUG8OpZqHejyjHT7ZUPEyvToaU+NTpTnu9g/ewh14jLqYse2GIbP9WXh8aSYhb5fIymBgbHFwXh5/lZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776977651; c=relaxed/simple; bh=YvI+c+2Ph7G01gY6UA2wVrmrHHoi2nJdOmOI4+tqFF4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=A8+EQMBCd3OkCZGzrplGubGrXnSx7lQ2jQZWuzjMvkNHr4NRygMt8qdehnO9kBHl9H+3VbDLp1XxWhlCOrV2KOuIWX+xbv+mS6uoiuutX59+YxUHO1Rg+om4uT/PR4kqQhiX2jTHWn9/ic+eG8jVtHj/LJsSWM6087HddDdzjUg= 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=V6ddrJDR; arc=none smtp.client-ip=209.85.167.180 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="V6ddrJDR" Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-479e4835e16so2475916b6e.1 for ; Thu, 23 Apr 2026 13:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776977648; x=1777582448; 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=vh+dAS21x3C6ulKovRegxLPmO53GnqH/AjpAPmkhI+c=; b=V6ddrJDRE6GeIVkfpv4uFL1QGP2y742sZlS4+Aenf1ksZChR54S3b8oM+EsBEfW8DS 85sGrVybFZcKwjSfzue3csRiiSYix0QOZBZtRTnxkPKAV8e8eWtmlOm4Go2lwfb9XVA2 qtbxjy8aqzMXwF2HBZTgCyi9Yg+Ah2iFN8OU6CsUeNByM0Ifzs+RZeysz8ADUqXTZCRw 23J00iirdL4ciwHx93ZKvrsYWo/xdxewp8DzfGkaL8f9yoSDzTfYKurR9QhnJJ49Rogi LklzzMkSuF8+vUvU3VjthPHidWJAAe5RSV0AK4GLkJLJP7kTu+J/XX/xP/3kl6vkFNLX KuqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776977648; x=1777582448; 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=vh+dAS21x3C6ulKovRegxLPmO53GnqH/AjpAPmkhI+c=; b=JM6wKM/m8Tp69UbIa0Nk/Z3KdIVj8501jJw5JW63WJRZuHJFeCXTd0ch5qMR5YqI3R M2BLOU1VguV4QUbCGtJXuknQbSzQkaHppYXh/+BqfxJCY+glcbMuSAL40zEhg0PQQzS4 Cqk6KT/fQJ6LBxXtuLlH6VQkI3EQLTQ6Aa0wybmIAYCBvQDp/ttQC9DjZ/ZDLKPzNY2a AqUiA+u43Ptzr5m2nJhZESux3jNgNNxS3+8Tc8lotw8EqJ0ot7M+zS8XQtBtOAe0ft2b oHRuHteXo4A296Ilh0IVBbM8Ue+JihgBImkzq9Jf0MGIsANeD0zUmL0MjM46TIBKpwf3 LQOw== X-Forwarded-Encrypted: i=1; AFNElJ+z9c4GsRDVyKHf8eOcqF028fXMzeKP9z6f0QQa9Ht12SjPGXYWGknWMThixVsQ0ulKdAi5PUK9DZyU7/U=@vger.kernel.org X-Gm-Message-State: AOJu0YwEn8iOEUJuMwToXLiESFTKi8awjzfnW/2yl0gpbIKBVaC32jFD s+gUrnpZYSIIyJI/tBB11J98SHQ8Jx4/G7npdB+IjMQqq69GSx47UB3I X-Gm-Gg: AeBDiesa99sipBwRgOK3blhc1ICsTWp2yjt1WkO5L6q0EFjR+P7kOH/fX7BT8cAr0lZ 6ay54tpCLOIz2c0jEpCC5DGb/n7W/hd7WqjgLhCFOO7igSLMwK2nhiFO7TOn1n92/CFr0fgg8yI oCM6D2AXFUK5/R5TIA5lmtwHtURCERuy/ZTzSkp+vRK4W57U2HrjMxWAQ5HwCP8D6jPnIK4uscs KdIkdiNJA2+P71lkCGKmG1EkSgpXAhp2erIYi1KJgChMgpGtwwRv0SnrOI+cu/xo2IK1Hhpnfrb /hvwJruT/cvxCxKRlZ7XQFMMgMGE7yOKeni+9LdqOi9Mwb9RjOqCXuw7ws1TePdGMuuLML+ZWTR 2iPOW3FWgdcfQ7I8i58I4dlVWi+KoHlh7I3oNikmImK+NjC8FFQkPerqe6Nuk91MfzV6WZqjkPu WFe3JzYrf6HJEfOZsGmktImhjj2f60hAGlBFgDlH/lqqOzbxjhk6LwJLGpY79IsQkwSPNxWNYKc yHjvQuRxxw= X-Received: by 2002:a05:6808:138b:b0:45f:59e:1e06 with SMTP id 5614622812f47-4799c8711e1mr17988935b6e.4.1776977647783; Thu, 23 Apr 2026 13:54:07 -0700 (PDT) Received: from [192.168.0.245] (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 5614622812f47-4799fead505sm14329744b6e.2.2026.04.23.13.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 13:54:07 -0700 (PDT) From: Jim Cromie Date: Thu, 23 Apr 2026 14:53:42 -0600 Subject: [PATCH v14 01/92] dyndbg: fix NULL ptr on i386 due to section mis-alignment 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 Message-Id: <20260423-submit-dyndbg-classmap-foundation-v14-1-2b809a8019d0@gmail.com> References: <20260423-submit-dyndbg-classmap-foundation-v14-0-2b809a8019d0@gmail.com> In-Reply-To: <20260423-submit-dyndbg-classmap-foundation-v14-0-2b809a8019d0@gmail.com> To: Arnd Bergmann , Jason Baron , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Andrew Morton , Jonathan Corbet , Shuah Khan , Shuah Khan , Greg Kroah-Hartman , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , David Airlie , Gerd Hoffmann , Dmitry Osipenko , Gurchetan Singh , Chia-I Wu , Matthew Brost , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , Lyude Paul , Danilo Krummrich , Patrik Jakobsson , Zack Rusin , Broadcom internal kernel review list , Louis Chauvet , Haneen Mohammed , Melissa Wen , Sean Paul , Jocelyn Falempe , Ruben Wauters , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Marijn Suijten , Xinliang Liu , Tian Tao , Xinwei Kong , Sumit Semwal , Yongqin Liu , John Stultz , Philipp Zabel , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Chun-Kuang Hu , Matthias Brugger , AngeloGioacchino Del Regno , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Alain Volmat , Raphael Gallais-Pou , Yannick Fertre , Raphael Gallais-Pou , Philippe Cornu , Maxime Coquelin , Alexandre Torgue , Oded Gabbay , Maciej Falkowski , Karol Wachowski , "Rob Herring (Arm)" , Tomeu Vizoso , Liviu Dudau , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Liu Ying , Laurentiu Palcu , Lucas Stach , Paul Kocialkowski , Jianmin Lv , Qianhai Wu , Huacai Chen , Mingcong Bai , Xi Ruoyao , Icenowy Zheng , Laurent Pinchart , Tomi Valkeinen , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Javier Martinez Canillas , Huang Rui , Matthew Auld , Jani Nikula , Luca Coelho , Russell King , Christian Gmeiner Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, virtualization@lists.linux.dev, intel-xe@lists.freedesktop.org, nouveau@lists.freedesktop.org, spice-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-renesas-soc@vger.kernel.org, etnaviv@lists.freedesktop.org, Jim Cromie , kernel test robot X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776977636; l=2644; i=jim.cromie@gmail.com; s=20260203; h=from:subject:message-id; bh=YvI+c+2Ph7G01gY6UA2wVrmrHHoi2nJdOmOI4+tqFF4=; b=JyTcuYLHHiwHBHDMwQ80bkTwG2D19eoKHDE+tl83KcpGRfh3fZenxZ7q9Sw+M3I1crSkiEMPL U/h1shBkXbNDxTVmN1qvPMSBm5G8hxuK6TqMgzZBBZXdklZASPjpC8F X-Developer-Key: i=jim.cromie@gmail.com; a=ed25519; pk=C6E5ODlPQo7ZBynATXH9wg7K6HxP0pIXyf4s38Qw0XE= When dyndbg classmaps get used (later in this series), the __dyndbg_classes section (which has 28 byte structs on i386), causes mis-alignment of the following __dyndbg section, resulting in a NULL pointer deref in dynamic_debug_init(). Fix this by: Adding ALIGN(8) to the BOUNDED_SECTION* macros. This aligns all sections using those macros, including the problem section above. Almost all the other macro uses are already ALIGN(8), either directly or by being below one. Removing BOUNDED_SECTION* uses in ORC_UNWINDER sections. These explicitly have smaller alignments, and using the modified macros here would override that alignment, which scripts/sorttable.c does not tolerate. Move __dyndbg section back above __dyndbg_classes, restoring its original position. This is cosmetic, given the alignment added to the macros. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202601211325.7e1f336-lkp@intel.com Signed-off-by: Jim Cromie --- include/asm-generic/vmlinux.lds.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 60c8c22fd3e4..db38f52035f3 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -212,11 +212,13 @@ #endif #define BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + . = ALIGN(8); \ _BEGIN_##_label_ = .; \ KEEP(*(_sec_)) \ _END_##_label_ = .; #define BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + . = ALIGN(8); \ _label_##_BEGIN_ = .; \ KEEP(*(_sec_)) \ _label_##_END_ = .; @@ -862,15 +864,21 @@ #ifdef CONFIG_UNWINDER_ORC #define ORC_UNWIND_TABLE \ .orc_header : AT(ADDR(.orc_header) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_header, _orc_header) \ + __start_orc_header = .; \ + KEEP(*(.orc_header)) \ + __stop_orc_header = .; \ } \ . = ALIGN(4); \ .orc_unwind_ip : AT(ADDR(.orc_unwind_ip) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_unwind_ip, _orc_unwind_ip) \ + __start_orc_unwind_ip = .; \ + KEEP(*(.orc_unwind_ip)) \ + __stop_orc_unwind_ip = .; \ } \ . = ALIGN(2); \ .orc_unwind : AT(ADDR(.orc_unwind) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_unwind, _orc_unwind) \ + __start_orc_unwind = .; \ + KEEP(*(.orc_unwind)) \ + __stop_orc_unwind = .; \ } \ text_size = _etext - _stext; \ . = ALIGN(4); \ -- 2.53.0