From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 E7A5743F4B5 for ; Thu, 6 Aug 2026 09:34:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786008879; cv=none; b=e2cyT90q1PPgAFOrwsv3cAj78em6Ycw27eNo1EuCtXNRAZPF8cMd3I/uGWef5u8g2OwejfXWZFWCrbDEKjk/DvSiDdjS+B7MNgcGMkjkDB5Zb92fR+gXydSle2xZHflwsyhpuaAb1xiK4X8wb5m0cyEezla1t8ZZoUR3iG5h5i4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786008879; c=relaxed/simple; bh=BVvh5bpXUpmJCHSXdK3SA8ETnDjL1yp5ou0b+WDbmqQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=C0fZHn9poZw6BfBeutiLsbCZxOvDjrfyoCaCpBKH3ckhd801zUTNEIenJu0tIsUeYEbA+oBotX4NbcK5ELwI5XQfPhscvhuBVgFVzgHmcCQ5BpXsY5fzuwF9gVv4UOzKR59GML6i/hzdTxpUSGWDkMTI6rXmQN8YfYDsAbY9v+Y= 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=dOCqpj5G; arc=none smtp.client-ip=209.85.128.47 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="dOCqpj5G" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4953de5be0aso14382315e9.0 for ; Thu, 06 Aug 2026 02:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1786008872; x=1786613672; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=0/gwO/ZBSh5wmPvY7qO834jSNpwf/Xm7SGaDdfmoSmQ=; b=dOCqpj5Gn26Ah6sUpFNRwdDMRTG1/18S3Zx7hMqg5JvShBer6d8DHDBOjkdhsw0Ra0 DMHBUrqMkWTSCzIvXaSJrfIShLbSyHnzaFakfJ51wjH73iUyfCoB/7mPCT6CEg+JLYLC hc5I48rjMC8yALgJHdfch0MsHurPnR+pmb3Qq6mXdCQJR7FItfBJd98z0E9SseGFb952 zLbJVkwzIyAF6SAW05eyrpxazY+z7NxHIx5EvjRb30jT1EA6Ya1JKxIjQMxljU1xoS14 h15ETVP+tI/+XDAR94IJ9VWmjKgTksDJuA9TW10lW7gRG0SLyDa1bx3n3JVWIdM11rTZ tqmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786008872; x=1786613672; h=content-transfer-encoding:content-type: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:content-type; bh=0/gwO/ZBSh5wmPvY7qO834jSNpwf/Xm7SGaDdfmoSmQ=; b=GLoyhD0lyVKUOZg+DJA1GPM0ITKye7XAmprmVlnJCH6cuegi0p6SBzPU3lCkg/ZJgh 3kzjSjlYiEbis6wQTzTThEQge11m96EWolRripxgMYGp/SzVFzVChqIoFuuPgWCYxSQb D+1sBqGmnCqtsJ4cMbBeEGNiNxQs5kyRlSIQksF0KicCTIuGTdcWvwue9lMqzE3gbVVm 3B/4IhkL6VAcw/M3xLmFZjgK4hU8QnvaONfBm34auB5PPj2MEskXt5ZuQLuC+NZh0V7J W4L7wtGaweTx94ssuY0bglu5ue93yzuEZcKGEubPHIyt8x2IwLz8W53+Yf5hc8NUTkSi IxIg== X-Forwarded-Encrypted: i=1; AHgh+RqqLKDlviwTgDSBNUuWujLG5zYRnfqqsWgi0MMHprr4tAfi7Smzk3sY1d6X8qjwTpL01g3kPnjosANDn4E=@vger.kernel.org X-Gm-Message-State: AOJu0YzT0A9Ow7gXNFNyMcNhtX7j+S1NpRVjHFoUUIIXroBCtx5qRh14 hKaupL/rU6/uYVch1g66T9q51d41RiCHvm16TJGujkvZppQDRZalf8egCZ4hV5Gpz20UmshwBaI VOfUJphM= X-Gm-Gg: AR+sD13JHfgbaJmtDQXTs/ZC2BD/pENPndnISi+borouClROYzopKhi8C06jSAHfOPb ddNjF0PDSULTEYncezFphbxuVoUo97C7jKU+oAuRmM367S1iKhJFeCtGs06FoAhvMYLyTsZuU9y alVc9SqxvZ4Vo6iwQjaOpbKxh4HqL6Nh0UWlLqUKf9aN7p/ImPvkUsJjJjSFXKj8lKIli5xFmHJ WP+Msv4ZxswdC1vYYijKn6OK2bn5lqXSoVsO3hDlGv2IRvhVgCrJjv8gc64/q/j7MkcSqqe/d/k h2tWMa3GuwcU17mEtT+iEsiGNY82mWl0++57CuyAN+S7VNTnqKx4r9emUFDtjgaEcRlx16uezA0 2nMk99g/70J4cNXZfg77SKjsy5e5knvAcfCMOdI3hJySgtXLoVVjJxbA9KfXuAtYb3biOB/OQNz ef5qSTTs7H9xd2PEziTEMr5gPnKCUQRvg1wFt+c0WE3hfBH0y0TjlVJwHXXoSRoPNZ2WSEmwOT6 eFba4Urdih8sqxRLOblUHrBCw== X-Received: by 2002:a05:600c:c4aa:b0:498:261:dd93 with SMTP id 5b1f17b1804b1-4994e7daa7fmr128489865e9.18.1786008872144; Thu, 06 Aug 2026 02:34:32 -0700 (PDT) Received: from ?IPV6:2a07:de40:8100:0:fc6c:f9a2:4a0a:6354? ([2001:af0:8000:1409:193:86:92:181]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4995919df87sm11415265e9.6.2026.08.06.02.34.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Aug 2026 02:34:31 -0700 (PDT) Message-ID: Date: Thu, 6 Aug 2026 11:34:31 +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 v3] 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/30/26 5:46 PM, Egg12138 wrote: > From: Xiao Junzhe > > 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 > section 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: Xiao Junzhe Reviewed-by: Petr Pavlu As mentioned previously, please don't forget to put the fix in Russell's patch tracker [1]. [1] https://www.arm.linux.org.uk/developer/patches/ -- Thanks, Petr > --- > Changes in v3: > - Apply the ARM unwind section coalescing under CONFIG_ARM_UNWIND. > - Remove quotes around linker-script wildcard patterns so GNU ld expands > them correctly. > - Use conventional linker-script wildcard syntax, i.e. *(...) without a > space after the wildcard. > > arch/arm/include/asm/module.lds.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/arm/include/asm/module.lds.h b/arch/arm/include/asm/module.lds.h > index 0e7cb4e314b4..1d56c0375c18 100644 > --- a/arch/arm/include/asm/module.lds.h > +++ b/arch/arm/include/asm/module.lds.h > @@ -1,4 +1,16 @@ > /* SPDX-License-Identifier: GPL-2.0 */ > + > +#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) }