From nobody Thu Apr 2 20:20:26 2026 Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) (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 457872E282B for ; Thu, 26 Mar 2026 18:54:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774551273; cv=none; b=lZiKMCMoPJoFmT0nrS2c2vUQESUE5fztljdhaBJ5yycwrOIePB/9xL9xS58FrFFKUovTNgutUPIchDjLhIkFRlZdVzO0/BccyPu1dT8amOzXP9jMEvO1d8fxiGBYOTOmWpPOpPB1QDZWvwBigR4rKs7A0HUd+tgMTUMrVfPxug0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774551273; c=relaxed/simple; bh=mL3eQ5I+NpnVGpIpXZD2MNW+j/Qf6zw5KKDmKMjenuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ENlQcRcL/7MC5sHqGsyf3BV1trJZ7IIlC0gnf4PqIDIRHAJ9jWksmKKTE/cNGukhd5spYFeGOskmYSceFWlyEYoHtUjiCz963OMGkYg1Cz+OKAVgNyAVZZg7Y2shP57mhPl4mArrhvrQnoqT0dbMn4ofj3kNrPTiWCBGqlXzjXM= 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=qu7Dmkh/; arc=none smtp.client-ip=209.85.160.46 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="qu7Dmkh/" Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-40427db1300so818673fac.0 for ; Thu, 26 Mar 2026 11:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774551271; x=1775156071; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gYmxGb7uQeQFtcBU/KNsuA+yly7Rfm4LYjwUpGocOHU=; b=qu7Dmkh/CB730YnANHAwVKdgXoD4DXFfmZLXvtTK7VLxfTzTWNEOVy+cPIL/cO3ES5 hFsMVGotLQXRT7SsIUrzbqCJl3G05goIuF1nBlSKD4GQkmE8yq/5XC0mF0ZDkfzDmxw1 TQxKWAf4P3poniFlPrQWPsI9BYUw5TAxKUYPXQDUoiLS3ciOFmvJ5Cddc76Az07P9Bzr ZwPA1YrwoOUBQDCQYDnHTGLwEMqiCz8svrKTQA5fDakFTacCGwoz/2RTM6VyhTCHV01l aqtAh0oBAwek08VWIEenaAn/nFd/RfNavFOISZv74NCzouoVIqr2DxrrJJM+ZfQOD9Ir 3umg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774551271; x=1775156071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=gYmxGb7uQeQFtcBU/KNsuA+yly7Rfm4LYjwUpGocOHU=; b=MQS+UZkZdHOV6JMPWnxNtD5aHoi1gj/JbaBG5ACIEYGU6vZb2vhHfWSk+jo/v7357z fyCMn1nzLTV2ii2qW7YddTNqFPRVoHt6r39ATYHHygYkjHNZw656oEoNhxw5KUoPs4vF xbGumVcNqe6+1UIs8DZFmwrLq6G3UTc2cEDEYhTqWuUooS9LN7Lwy8Luw+Me6qVWfuju GVELL9usnIcDjs+HNBy1azl2nKyHSxpAMnn19yleyEz6wBFwAOgQb7066C5FDGdneaSO 5cPZLAn5zFKgJvBVPLgsG4JT0yX0ojWAXetgbRTMeWNplr7gut5Y6s6EKExtePPVrxXc OTtg== X-Gm-Message-State: AOJu0Yxpwk4BdZGOipnn0EOuCbs9o5poT7EJ/tYsOfGg7qCcwjrN+hQL wis4uGOVi8IB9C7Qsb8o8qQW4L5sjcU9Xzxkw3HWMZQF3VO+Nfrur7RpVVREXQ== X-Gm-Gg: ATEYQzwBoGwntTmU7Um7yX7zKM/7J3slZF/Tb8zHE1cI0EyPpHzkCbVdml9KnDPbaIU BIp/b8R4LCptUgJ5sod8e/bAWXW55D6DjI+vXqDDCmCE4Lj/Ex7gMFhHsENEbUS+vECgYQr8Q+a 1pPUhq066fLVqR4yg3vYJQyWH7CS2eN7Q+RGlzTun5VhZkYgt+aT02GFfGWopoRg78E3n/KPoWU 7L3N+Yj8w2MvW5wINtQ+g0Osa495Flo2iNR2jd4LsrUP/o9PPD6zzjdaS3WW8Hk2mh2nBnX1HtP xXrrDwc7zOgpCQiCP8N4S1DHfaid7yN7yyWytFwj7iYQOlVvBfa7KVBhIEtpu//PmTH+sDw1nju xRp3zVvwEBL8/bBj/bANxeYGgNRvnGLBPEyaEQn0j9yeS/RriLH/WeXaWXPDGHF8WIMSWf/OxyF AjJUbCcxQCbtp5XBPL3MIKj7RCzsQ+FK68XwudpeKSsVb8F6M6 X-Received: by 2002:a05:6870:8131:b0:417:ab68:fbaf with SMTP id 586e51a60fabf-41ca6ddbde6mr5024881fac.20.1774551271056; Thu, 26 Mar 2026 11:54:31 -0700 (PDT) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 586e51a60fabf-41cc7760c08sm3075171fac.4.2026.03.26.11.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2026 11:54:30 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, airlied@gmail.com, simona@ffwll.ch, jbaron@akamai.com, gregkh@linuxfoundation.org Cc: jim.cromie@gmail.com, mripard@kernel.org, tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, christian.koenig@amd.com, matthew.auld@intel.com, arunpravin.paneerselvam@amd.com, louis.chauvet@bootlin.com, skhan@linuxfoundation.org, pmladek@suse.com, ukaszb@chromium.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, kernel test robot Subject: [PATCH v12 01/69] dyndbg: fix NULL ptr on i386 due to section mis-alignment Date: Thu, 26 Mar 2026 12:53:05 -0600 Message-ID: <20260326185413.1205870-2-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260326185413.1205870-1-jim.cromie@gmail.com> References: <20260326185413.1205870-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 aligment, which scripts/sorttable.c does not tolerate. Move __dyndbg section back above __dyndbg_classes, restoring its orignal 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/vmlinu= x.lds.h index 1e1580febe4b..58daa551420b 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -212,11 +212,13 @@ #endif =20 #define BOUNDED_SECTION_PRE_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + . =3D ALIGN(8); \ _BEGIN_##_label_ =3D .; \ KEEP(*(_sec_)) \ _END_##_label_ =3D .; =20 #define BOUNDED_SECTION_POST_LABEL(_sec_, _label_, _BEGIN_, _END_) \ + . =3D ALIGN(8); \ _label_##_BEGIN_ =3D .; \ KEEP(*(_sec_)) \ _label_##_END_ =3D .; @@ -869,15 +871,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 =3D .; \ + KEEP(*(.orc_header)) \ + __stop_orc_header =3D .; \ } \ . =3D 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 =3D .; \ + KEEP(*(.orc_unwind_ip)) \ + __stop_orc_unwind_ip =3D .; \ } \ . =3D ALIGN(2); \ .orc_unwind : AT(ADDR(.orc_unwind) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(.orc_unwind, _orc_unwind) \ + __start_orc_unwind =3D .; \ + KEEP(*(.orc_unwind)) \ + __stop_orc_unwind =3D .; \ } \ text_size =3D _etext - _stext; \ . =3D ALIGN(4); \ --=20 2.53.0