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: <172607595481.1006814.4998124247259811209.robh@kernel.org>
Date: Wed, 11 Sep 2024 12:32:35 -0500
From: "Rob Herring (Arm)" <robh@...nel.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-arch@...r.kernel.org, linux-kbuild@...r.kernel.org,
	Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] modpost: check section mismatch in reference to
 .dtb.init.rodata


On Tue, 10 Sep 2024 18:44:52 +0900, Masahiro Yamada wrote:
> Built-in DTB files are discarded because KERNEL_DTB() is a part of
> INIT_DATA, as defined in include/asm-generic/vmlinux.lds.h.
> 
> Currently, modpost warns about mismatched section references to init
> data only when the destination section is prefixed with ".init.".
> However, ".dtb.init.rodata" is also discarded.
> 
> This commit has revealed some missing annotations.
> 
> overlays[] references builtin DTBs, which become dangling pointers
> after early boot.
> 
> testdrv_probe() is not an __init function, yet it holds a reference to
> overlays[]. The assumption is that this function is executed only at
> the boot time even though it remains in memory. I annotated it as __ref
> because otherwise I do not know how to suppress the modpost warning.
> 
> I marked the dtb_start as __initdata in the Xtensa boot code, although
> modpost does not warn about it because __dtb_start is not yet defined
> at the time of modpost.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
> Changes in v2:
>   - New patch
> 
>  arch/xtensa/kernel/setup.c | 2 +-
>  drivers/of/unittest.c      | 5 +++--
>  scripts/mod/modpost.c      | 2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)
> 

Acked-by: Rob Herring (Arm) <robh@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ