From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (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 0C902346A19 for ; Thu, 23 Apr 2026 20:54:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776977651; cv=none; b=bbFI9Nd6cWNuprsGY/qUrKxis88OoTNb2LOjtWN6iv2Ns52EkTdhgSfH7iCnB4bv3zo/GP7it/x77zSPUjW21imUBs+AD9lo5X7Zr1x/BtKI5ZctGJqLW/LUGiL3Wo0ZVe3CVvWFWYD2O/OjXOPgM+rdQ7Qqhx7A+w6WdyCpouw= 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.181 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-f181.google.com with SMTP id 5614622812f47-464bba3a9easo3705004b6e.0 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=LkEJS+NLTbMHo2TCTSHxo0YjrXA37Za4Mh+bfWZYKFTZIgmsVzpcBouEKFkLpofy/C 66fQBh4ZtVsOZ0lST1+Wvs8AEpk2iB4U6lsAFsc25LwwM/Nq8UQrQEZ5+Hr/xOMn/yXp obK5d2yDgqgw8ivgcVdEuAk18+eVZYXvOwp1ek3c+57s5rozA08kPK2fFHnKy6hlKmJm i3oFrX8O/KQ1J/BcMulRR3SsbO4m5RnKl8Sac/C2ZkfkoNWZvb1RIYSVH3kKIXj8HepK 6lqwP7ToejaNqS9giWbyDDqym/dIPO+vj7JkLo8CRT4FiYLofxlWoD6GOTJ8QL0xWnZh Z8OQ== X-Gm-Message-State: AOJu0YwrxZ/uFjH+t9KC0yfL6YLfTdk51ebdUmXp77imK+AKlwef8Qdo vJdscKW1Wi3yRVRpSca5Oh4bSrTU0VtV0nDV1rsnEs1Tomk9j0/cj7ZW X-Gm-Gg: AeBDietlSN6VUQ/sKYkjab7eHOLHTK29tk8sSpj2C/aEw/zJsuAjrcs63UOsZL42zgy oMX0vCgeFcr8QdRgP6TTHZ8XLdRIW5QETWMllJcF+5F68joeaoSl4FO0i7nybSsLCXZ7KU4w5K4 5mYmZye+FqDztA5rPNde4EY7c23fw1jLIx2sKdcFBDb2vIX5+lFYMogYIBtCLx7kcYxJKhh6r5B 8qKfBtMw/o1zmM0ppuW6V5iEMIBmltPbfB+GdJ4c6gmWjc2W7FB6d+Z65Zhpq/q4Nz6fNRefSId exD+71ezRlCPpkkzCcRiTqx2h9GJI2qdKpyluuzxDPxna6xCA7BttfT195Kvs7OSZM5Qct4iFCT pMQE+eM/WwCMlb4vvlBjXzJESr6HIWDm0ONcqNjLnIRojpE971Eln98D9H23HppHmwzjutw8Fy8 CcMu2Q3MQHxDgvlCLfycyhz26JW/H+G4+rhu9gI+qEwRe59Y/82Fjw9QI7kQ8Ib5OdzF317SgBV +IRLZpe6go= 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-arch@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