From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (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 561E2334C2F for ; Wed, 8 Apr 2026 20:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775678540; cv=none; b=XLQwUVe9RSBwW1vr3lR0r56iRi2FyGasSC77UD2+mMjnTAPD6qRjnT8dZ0bJ6GnMK9OVcj5bUza5KiHdT0wtYk1zVZ3WJefSjgQ38uT2MGeooeyrNLc8BZkLDHUMCfX4VPHv2czEE1GUzbGkl+n+IY585Db+GSH1HBYeatx13Vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775678540; c=relaxed/simple; bh=mL3eQ5I+NpnVGpIpXZD2MNW+j/Qf6zw5KKDmKMjenuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CmQTnNTvHqBhbp8g87LAktyEhGW4i0otDkn2rnSqIhOzAQQTpkms4kko80tynCRmK4K7W4m3tve2na9EXRsNaM6rmM+60vrIebCVC5ojxUBbsheduUChWojfUAFuTItqGVjVOsH8qyrbmWuYhcqmCLe9MI68QGr835AuEHubeiQ= 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=QOT1Hhm8; arc=none smtp.client-ip=209.85.161.41 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="QOT1Hhm8" Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-689e6737446so85393eaf.1 for ; Wed, 08 Apr 2026 13:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775678538; x=1776283338; 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=QOT1Hhm8nQBr5JAnJBHiw4/6iWgUO3ZQmEQPpAOenRGk8I5PL0hKdCcmqBFNZXIwNR 7fibSD8SSqLVt1VSNi3vvD39zp7B+HST4PQwQ9gEku4O2b4BYCumet5i2CNxkXAhREi3 Pw62UgNLKpGuhSlvnT/zWT5VBR9VoJdMY/GHXFKqwbiHxeDdK+eMiX05YgCKhG3Y7wtq j6yQ4AUrQLBTHrZQTkRlVpfggn7ifYsxgaWNakXDfyzPnZtDg6kDLCN5OIKv1neS6UDf DrJL3h9NpJBpGCS0eHqL3EBtAmAJkvYSxcDeHoav8AFhxaWKTKM+J+6Iwexi6JbNVVoW BD4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775678538; x=1776283338; 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=k6OtOUnYwtjo+URedGiju5ndnzvl/9GkTbhlSHJU6kg1cAbt2+i/65uj+Oa4IxU+22 dQRtbJErEM8l5gv4qv7+broYyMu1U+hY8/dom3zrDfV8/5FpEHVxW0S69QkTeydagsJr 3TX+gUnoj0/OYTRGNFe0JAl9/qNlsckJtyFA+qlVTk7Sme9Y3AAhWLDUACOE5dxOiLGg mBRK7hay5lNIsyyafvBBlCIVGCubMymC9V8wK3wv01RVKDveYrRi3ToDZzYx7wKGGkJ3 HG1kHs24GOr2X3LxQ6k5gGHQ7AbY1+DCntYsPq/KYv57H3FVwuDS6VRMhS8TIATZMHZZ 6pUA== X-Gm-Message-State: AOJu0Yz0brMny62vq3w+tWryPkvkMtheu+w1FBuEtGxLgoelLMJKpIOX z9obMDjYu9pSfkUoIEwR66felHE9pwLZUhx+GavdQBu5tZmNjXB0JOABTZQeRw== X-Gm-Gg: AeBDieuXrLwChPJyePpRS2YbjX95DRa+Fa0RMsxViooJw48AUoUvHcGaucLWTOk76y4 k7HW6XXpK4qVv36B703LJ0pjlz8JCCSTgDeEkMY8ezMh8Yo6xWPTqScN0MpH1UlyUX9ReKxmCNu ouYGFdqQCiqMinhaKGK2WSUg1Ei0fW5GKf6RBxdJENxAIXt07jhHt9chTw9Jo4Q03IvkrDXbkdi p4wYeNZFaoMh+zmkORYUo6tqLqIeJ9oqUrW1J1FaSqrGue3XgTLpCR6V+/BQmeCzZ+sqvcU3BBg eTL02GTKDiIjwjRx+T6Ecjb/2kJ7SO1iuEljWgdY4oUz+sDVtJ/6FDGyvHw1SR4bPM3TUtTreu9 TuiGf1bqMn2goPRPiVm/Em7twDsnM6ocgjoP8GK1tfV2GXUlmFh4uGc8djAhK5MWH7w9B0Z3VaO xhdo+Lyln3ntYPvXqBc+ew+404iIvIhSVMLStQciyNh+aNrjvY8P/z8hTm5chOehXIDaLk9MBOq tM= X-Received: by 2002:a05:6820:c86:b0:680:57b4:9068 with SMTP id 006d021491bc7-6821d83c55fmr12256265eaf.17.1775678537892; Wed, 08 Apr 2026 13:02:17 -0700 (PDT) Received: from frodo.raven-morpho.ts.net (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-680a63c7fd1sm12254208eaf.8.2026.04.08.13.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 13:02:17 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, jbaron@akamai.com, louis.chauvet@bootlin.com, Jim Cromie , kernel test robot Subject: [PATCH v13 01/36] dyndbg: fix NULL ptr on i386 due to section mis-alignment Date: Wed, 8 Apr 2026 14:01:36 -0600 Message-ID: <20260408200211.43821-2-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408200211.43821-1-jim.cromie@gmail.com> References: <20260408200211.43821-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: 8bit 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/vmlinux.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 #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_ = .; @@ -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 = .; \ + 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