From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) (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 163703ED5AC for ; Thu, 28 May 2026 12:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779972250; cv=none; b=EPZga51NxCwDHFRZMXEGo1fuqx1nrCv9o0qKp1Rq3sYFomgOrcimUwitcNn4YWT7ygBc/YXFK8UicGGOHIdBiuw8pStqySWhaBBR8o7u3GouBkGHpehZ8lv8LeA6G9vdKRkFoz+uaOKavqVzw+aicPNaxc1wnj1nHVYYk1FK0EY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779972250; c=relaxed/simple; bh=70IgCyzZvW9ptI+ck3UExaY4DyLyamKX7zZGqqkjRlQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XVFQxQwfuUZoBckq0bvaf0ZeIAGrYSmXLXVyWy7RNnSj05jfXGwkft/HhDEwiOIc+rhwgeq6T9sQh3Tw04KVejqfSeKM9/m9UYe21zHn2d2hlmvzTymFsQ8wn7tJU5tX4oWx/tGblYsAk0MjGQIAGspu3ZjynoSOfsXNQjoHWaU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=CLITt5Ma; arc=none smtp.client-ip=209.85.128.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="CLITt5Ma" Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-4904c1ce4c1so65957975e9.3 for ; Thu, 28 May 2026 05:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1779972246; x=1780577046; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JOsam8NjoAr1MmJMyDY/LLfJ9CvvvTbgnZHck1lUMzM=; b=CLITt5Ma6XDQi/57vx+zuVU36I/CRsYmI1OjcZOYI9CM9UiCETJYGU1tj4UGA1MayQ wnyJAnnuPt6/Yq3vQtcgQu4ZdFiUwQH5bFPmGzF5UaWqf9GAU3ys7IOtcrz2oDhwC1qV bsQgVjZJv4OlZ6wZWZCfnlW1x+akLY8Xnc7fWi/QVpWV3/CEZfx+aa7aWvTiaLkPNcNu MJKTbDcauwdfL9w3mkYTMLblUBpBkgarZySbhbHIfFv/CQQGEwcGWxCiQi2TOfEn9lFE yGsnDnuQXmeDniOVF9ZCJ4v2ICLcpMR6kff4YzLZeuK18wJtHji15ulNx+mnvfmq3Gyl foPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779972246; x=1780577046; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JOsam8NjoAr1MmJMyDY/LLfJ9CvvvTbgnZHck1lUMzM=; b=r3FCtJW6KyhrV4MTa/nMGiI1VoImdD8PFbyINGdHWKhd6zqV9De5xbCR5fDGPSVxJO nLZ/HdbVYCZ0Ojv4WXgeGNiys3ZqvSDdv09g4pAzWGTZs96vewHzQetH3AS+eCGCVI1K zfLU4mRTMJtQ0CRc0C70kcnYj2nRJEBjVWoZ2z0u4htpph0+QMu2Q62nZcTKCChJHK3v zYYI3sGB1SQt0ZmKAMTl7ql5Sy1gHjE8MIldBSFThQJBf/LX2ox6XgnSwyPrf6dcSXBF z4LD0ctC4qLZRfMz67OFf4XIGyM2if4xszj2tV8T7zFdocWIuivsbpO2PKKr0b6fdInc Bagg== X-Forwarded-Encrypted: i=1; AFNElJ82I+2w0RYCVprYHv4GkvmPAFgJQ+0jSmw2xhRI8hm9hywqRND3rm4WDASaD5f/UjsX6945bwqMZV513jo=@vger.kernel.org X-Gm-Message-State: AOJu0YzQn+N9DA27mH+Cols3FVCcKRUd67n3EPhlpoJGpmpDOqJgn9LX 9bHtwUK+FrcxEHn2J7moJ/O/s//bv+r4e9r9ZfLDYaLc2pB7HxhGwpCUSUEiqOYAq/E= X-Gm-Gg: Acq92OEHRG8QB5X7TRdcgULIqo3hNkpoO/LQBIDr5RZ+BetrP1uyQ6alHUUwyO7huQH s4XicorLgmIOLyD5IVnadYgZMqBH7QEIc5HYotDFaH2Idl0H8vpjcEk6Ul3u82Y6jZUTJKT60f5 2Rzfi5Wxvk1/q9iwiqHfQ4p5VDHStPn/C6ILSFJl9ArpoBIsGaL6DfV6euPlyRoezvTjtwNFglF pB5sSZJZMIyAfnGVgEeUeOxT9QrZZEmCzVZ8re5wS6PWACXiGDW5X7sY5eQKTSjyhUcgJ1GAj2K H+XWhBsQYmbfWsDiBGwnGbLr9L97PTWZmnVQ51418BQaWsgWKKA2cIU5UMigCslIQRNwX1Dzrcg d3VoBHFsHpmagqAXiGFTVX8HgqsMvwG2GlOVN8mHzNlHD2777TyeWIwTdutvyEIHbiQ/yupSuTC R59GbUGKb5WnU1rrvTn2t6bKfssI7obP3NKCfsOB849xcJJGipCa/D+Pa1D4/nFPh7zg== X-Received: by 2002:a05:600d:8444:20b0:48f:e230:2a21 with SMTP id 5b1f17b1804b1-490428ee28emr338403185e9.32.1779972246309; Thu, 28 May 2026 05:44:06 -0700 (PDT) Received: from [192.168.42.79] (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45edb5579b8sm13618311f8f.9.2026.05.28.05.44.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 May 2026 05:44:05 -0700 (PDT) Message-ID: Date: Thu, 28 May 2026 14:44:04 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ARM: module.lds: fix unwind metadata for merged .text sections To: Egg12138 Cc: Russell King , Josh Poimboeuf , Petr Mladek , linux-arm-kernel@lists.infradead.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Petr Pavlu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/21/26 5:57 PM, Egg12138 wrote: > Commit 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, > and related macros") made scripts/module.lds.S merge module input > .text.* sections into the output .text section. > > On ARM, the paired unwind input sections keep their original names. A > module can therefore contain .ARM.exidx.text.unlikely with sh_link > pointing at .text, while .text.unlikely no longer exists. > > This is a valid ELF relationship, but ARM module_finalize() does not use > sh_link when registering module unwind tables. It derives the target > text section from the exidx section name instead: > > .ARM.exidx.text.unlikely -> .text.unlikely > > The lookup fails and the unwind table is not registered for the actual > .text range. This can make module stack unwinding fail with: > > unwind: Index not found > > Keep the ARM module unwind output names in sync with the text sections > that scripts/module.lds.S now produces. Coalesce the .ARM.exidx/.ARM.extab > sections associated with .text.*, into the > stable output names expected by the existing ARM module unwind code. > > Fixes: 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and related macros") > Signed-off-by: Egg12138 A Signed-off-by tag should use a known identity, see Documentation/process/submitting-patches.rst, Developer's Certificate of Origin 1.1 [1]. > --- > arch/arm/include/asm/module.lds.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/include/asm/module.lds.h b/arch/arm/include/asm/module.lds.h > index 0e7cb4e314b4..dc9adf8fa50e 100644 > --- a/arch/arm/include/asm/module.lds.h > +++ b/arch/arm/include/asm/module.lds.h > @@ -1,4 +1,12 @@ > /* SPDX-License-Identifier: GPL-2.0 */ > + > +#ifndef CONFIG_ARCH_WANTS_MODULES_TEXT_SECTIONS The Arm architecture support doesn't select CONFIG_ARCH_WANTS_MODULES_TEXT_SECTIONS, so this #ifndef is not really necessary. I suggest leaving these linker definitions unconditional, or alternatively use '#ifdef CONFIG_ARM_UNWIND'. > +SECTIONS { > + .ARM.extab 0 : { *(.ARM.extab .ARM.extab.text .ARM.extab.text.[0-9a-zA-Z_]*) } > + .ARM.exidx 0 : { *(.ARM.exidx .ARM.exidx.text .ARM.exidx.text.[0-9a-zA-Z_]*) } > +} > +#endif > + > #ifdef CONFIG_ARM_MODULE_PLTS > SECTIONS { > .plt : { BYTE(0) } Besides the above nits, the patch looks ok to me. Please don't forget to put it in Russell's patch tracker [2]. [1] https://github.com/torvalds/linux/blob/v7.1-rc5/Documentation/process/submitting-patches.rst#developers-certificate-of-origin-11 [2] https://www.arm.linux.org.uk/developer/patches/ -- Thanks, Petr