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-next>] [day] [month] [year] [list]
Date:   Tue,  7 Dec 2021 16:03:34 +0200
From:   Sam Protsenko <semen.protsenko@...aro.org>
To:     Rob Herring <robh+dt@...nel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>
Cc:     Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        devicetree@...r.kernel.org, linux-samsung-soc@...r.kernel.org
Subject: [PATCH] kbuild: Report enabled nodes with duplicated address

Duplicated unit address is a normal case, as long as no more than one
node using that address is enabled. Having duplicated addresses is
already allowed by '-Wno-unique_unit_address' in DTC_FLAGS. But two
simultaneously enabled nodes sharing the same address is usually
incorrect. Add '-Wunique_unit_address_if_enabled' flag to report
warnings for such case when doing "make dtbs_check".

Signed-off-by: Sam Protsenko <semen.protsenko@...aro.org>
Reported-by: Rob Herring <robh@...nel.org>
Suggested-by: Rob Herring <robh@...nel.org>
---
NOTE: After applying this patch, a lot of warnings appear on "make
dtbs_check". I'm not completely sure if it's ok, so feel free to Nack.

 scripts/Makefile.lib | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ce6142238835..2f00c996d2e3 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -315,7 +315,8 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
 	-Wno-alias_paths \
 	-Wno-graph_child_address \
 	-Wno-simple_bus_reg \
-	-Wno-unique_unit_address
+	-Wno-unique_unit_address \
+	-Wunique_unit_address_if_enabled
 endif
 
 ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ