lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Mar 2024 16:13:13 -0400
From: Sasha Levin <sashal@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH 5.15 45/76] modpost: Add '.ltext' and '.ltext.*' to
 TEXT_SECTIONS

On Wed, Mar 13, 2024 at 10:12:29AM -0700, Nathan Chancellor wrote:
>Hi Sasha,
>
>On Wed, Mar 13, 2024 at 12:41:52PM -0400, Sasha Levin wrote:
>> From: Nathan Chancellor <nathan@...nel.org>
>>
>> [ 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@...r.kernel.org
>> Closes: https://github.com/ClangBuiltLinux/linux/issues/1981
>> Link: https://github.com/llvm/llvm-project/commit/4bf8a688956a759b7b6b8d94f42d25c13c7af130
>> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
>> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>> Signed-off-by: Sasha Levin <sashal@...nel.org>
>
>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.

Dropped, thanks!

-- 
Thanks,
Sasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ