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] [day] [month] [year] [list]
Message-ID: <20250306090906.06efe934.ddiss@suse.de>
Date: Thu, 6 Mar 2025 09:09:06 +1100
From: David Disseldorp <ddiss@...e.de>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Christian Brauner <brauner@...nel.org>, Arnd Bergmann <arnd@...db.de>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] initramfs_test: mark testcases as __refdata

Hi Arnd, 

Thanks for the patch. A fix for this was already submitted via:
https://lore.kernel.org/linux-fsdevel/20250305130955.24658-2-ddiss@suse.de/T/#u

On Wed,  5 Mar 2025 18:27:01 +0100, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@...db.de>
> 
> The testcase calls an __init function, so it must have a corresponding
> annotation:
> 
> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
> 
> As with other kunit tests, using __refdata suppresses the warning without
> annotating the structure itself as __initdata.
> 
> Fixes: b6736cfccb58 ("initramfs_test: kunit tests for initramfs unpacking")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  init/initramfs_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/initramfs_test.c b/init/initramfs_test.c
> index 6231fe012583..3539891ae081 100644
> --- a/init/initramfs_test.c
> +++ b/init/initramfs_test.c
> @@ -387,7 +387,7 @@ static void __init initramfs_test_many(struct kunit *test)
>   * The kunit_case/_suite struct cannot be marked as __initdata as this will be
>   * used in debugfs to retrieve results after test has run.
>   */
> -static struct kunit_case initramfs_test_cases[] = {
> +static struct kunit_case initramfs_test_cases[] __refdata = {
>  	KUNIT_CASE(initramfs_test_extract),
>  	KUNIT_CASE(initramfs_test_fname_overrun),
>  	KUNIT_CASE(initramfs_test_data),


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ