Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1910450lql; Wed, 13 Mar 2024 11:32:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBgB1njTgwhvvhPedvwjytLAuvJTvVXfGVfjwNfX1WF7cQfbaEVRtOdlbWmK+nO4kybrP6ZT3fpwseEauK1Seq+faBq3pycQjkYCNcAA== X-Google-Smtp-Source: AGHT+IGknkElWsCaynX958D/hoOwrezQzvmDIX8BA0VHoDvHTX0ko+00IP2Q4BbaaVjDWJG6bVqL X-Received: by 2002:a17:907:c241:b0:a46:127a:60e2 with SMTP id tj1-20020a170907c24100b00a46127a60e2mr10033033ejc.33.1710354770701; Wed, 13 Mar 2024 11:32:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710354770; cv=pass; d=google.com; s=arc-20160816; b=UeSgsazE+ex54hsENVUWP+TFwvSu9beAXATGghTbetgIQQFGre4Aijtx5JA8cvPw6P 3Djxg2YHndMAXtq1K/q0jjapSesZBmeCCfr2bP9qKnudf4+H0YTRLyL4IshFMvWtpx8z IYW01LAwLx8O86dt2j1I2LDWQpcOzU9Hjo2FOCrQRjZwPHwTbnAsfBjKUuERWuR9CHHR IzLELQwC7kmJ1151oXW0RSjZpZz1XUpydQRatKvImgb82lihC2jN7newt68Lhl0Kcehr onPIdOH85ehPYhEHpOOjNnL8gJLXJw/Lt0ugy+rPasvCNeET0k6+D9TAG6IC6pyKCVPv xRcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=X2Exc3LRhNDuijp01O614ZKU9wgoqdt8rvpCDPDKxDA=; fh=wBAwoATbk4KuOOeLBH9eb33ngyeYjz+bX1qg91pTH8I=; b=MJVXBBN6WhYeoP+qlfflWX3tXE4o52ANDL2s70ee/GC79irlBbY2YLKMy3n4rSsCRK ughoyc4uJLc7SvMiHP+jF/9W7fGPb1UISkXOhZZ0v/uscO+qm9a5reTweUdwPUvBvF10 GbSuo4EgSsU78C+8kSpR0W6yWZWIryMLGot8YsqOuoR8s5O2FyVXGqGPHbChCo5uqh9u COSNygf2xNItRprqiVO3v78fcaLVwz7ovFjolF2LS7VHqlqaEJmDNIcXbh6LKdGZNMTj nNVoDgzm9P/GeN5tjU7oqZ3weDcKMZC1TdyVkGVfVGdxqj124goW3L2Yl68AVhoqPNPI hJmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R7ZV37c+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-102239-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c10-20020a170906154a00b00a465365db57si933719ejd.1047.2024.03.13.11.32.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 11:32:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102239-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R7ZV37c+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-102239-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6C5131F2D5C9 for ; Wed, 13 Mar 2024 18:32:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85BF07AE5C; Wed, 13 Mar 2024 17:12:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R7ZV37c+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9786A60DDD; Wed, 13 Mar 2024 17:12:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710349952; cv=none; b=aiJJY7HzC9coNsmMLVyTss9Kw4ftXNdqAiroO1SXWf1qFF6IQVfrt0KL+TZIITOAyuI4HPjv5n+Zt2I+NsfbDFulHTs0yn0KkIOTI/SOfEdmJLp6VinGIhZfZ7bNGsHILSYUtR4a8WDkOn0rriYFZdixUWuOawaIkzOD/EolEWE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710349952; c=relaxed/simple; bh=P6edbYcrI8nT1RQqI4ia/s7CJ831ZSWH4YbGScmu1xI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ODhmx/NyQzQXXHuGLxgEQaLpyHyN6VWEZnwe6Bibgo7U6xQ96VYSQpFDV1bvM9HnqdJtj/VVHyEKhSRVwD3BSAv+FGcwXoagKLHqnEY0kS2DKzLRQAZKvP3StOaCOR+BYYA3CMq/a6TtLAEMR9gN25xmsjh4Ou7X2iKhMHC2gEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R7ZV37c+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3778CC433F1; Wed, 13 Mar 2024 17:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710349951; bh=P6edbYcrI8nT1RQqI4ia/s7CJ831ZSWH4YbGScmu1xI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R7ZV37c+CXO3OTsdcEETlOHei6+cF1IAnNh4K6RQEz59QPShKdUKIBN192k2mSvnx NK+98Vf3gfKKj3MzzTFFfpbyOW/LHP9vX3omJ9/z2mEgvXEd+3e9p5LrOII/wDk6T0 jcAz3B1TcNFlZEF4UbaA/AR0XFhZkhFBY3ZFwEYU79TXYyjTFPkhfXfVkJmIVEW8FE 5FjonMBI38PT2w9Ix5WmWf1lWIHfhDA4Xq/m7ObEDyYtbmc5zyhrdtD7SObDk767LL niCvs6S4y8MhsHAnxtnwzJTZduSr3Du7MrCJ6viNV6PH66oUUzyJPYRb2kF/7f9Alr jH8uUPQY7NUnw== Date: Wed, 13 Mar 2024 10:12:29 -0700 From: Nathan Chancellor To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Masahiro Yamada Subject: Re: [PATCH 5.15 45/76] modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS Message-ID: <20240313171229.GA3064248@dev-arch.thelio-3990X> References: <20240313164223.615640-1-sashal@kernel.org> <20240313164223.615640-46-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240313164223.615640-46-sashal@kernel.org> Hi Sasha, On Wed, Mar 13, 2024 at 12:41:52PM -0400, Sasha Levin wrote: > From: Nathan Chancellor > > [ Upstream commit 397586506c3da005b9333ce5947ad01e8018a3be ] > > After the linked LLVM change, building ARCH=um defconfig results in a > segmentation fault in modpost. Prior to commit a23e7584ecf3 ("modpost: > unify 'sym' and 'to' in default_mismatch_handler()"), there was a > warning: > > WARNING: modpost: vmlinux.o(__ex_table+0x88): Section mismatch in reference to the .ltext:(unknown) > WARNING: modpost: The relocation at __ex_table+0x88 references > section ".ltext" which is not in the list of > authorized sections. If you're adding a new section > and/or if this reference is valid, add ".ltext" to the > list of authorized sections to jump to on fault. > This can be achieved by adding ".ltext" to > OTHER_TEXT_SECTIONS in scripts/mod/modpost.c. > > The linked LLVM change moves global objects to the '.ltext' (and > '.ltext.*' with '-ffunction-sections') sections with '-mcmodel=large', > which ARCH=um uses. These sections should be handled just as '.text' > and '.text.*' are, so add them to TEXT_SECTIONS. > > Cc: stable@vger.kernel.org > Closes: https://github.com/ClangBuiltLinux/linux/issues/1981 > Link: https://github.com/llvm/llvm-project/commit/4bf8a688956a759b7b6b8d94f42d25c13c7af130 > Signed-off-by: Nathan Chancellor > Signed-off-by: Masahiro Yamada > Signed-off-by: Sasha Levin This causes a warning when building with HOSTCC=clang: scripts/mod/modpost.c:1123:37: warning: excess elements in array initializer [-Wexcess-initializers] 1123 | .good_tosec = {ALL_TEXT_SECTIONS , NULL}, | ^~~~ .../lib/clang/17/include/stddef.h:89:16: note: expanded from macro 'NULL' 89 | # define NULL ((void*)0) | ^~~~~~~~~~ 1 warning generated. Same comment as on the other UML clang-18 patch, I do not think this is necessary right now in 5.15 and earlier. The other modpost patch can go as well, as it is only a prerequisite change. Cheers, Nathan