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]
Message-ID: <20250507-upstream_ospi_v6-v13-1-32290b21419a@foss.st.com>
Date: Wed, 7 May 2025 09:25:14 +0200
From: Patrice Chotard <patrice.chotard@...s.st.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, Rob Herring <robh@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Maxime Coquelin
	<mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Krzysztof Kozlowski
	<krzk+dt@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon
	<will@...nel.org>,
        Gatien Chevallier <gatien.chevallier@...s.st.com>
CC: <christophe.kerello@...s.st.com>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        Patrice Chotard
	<patrice.chotard@...s.st.com>,
        <stable@...r.kernel.org>
Subject: [PATCH v13 1/4] firewall: Always expose firewall prototype

In case CONFIG_STM32_FIREWALL is not set, prototype are not visible
which leads to following errors when enabling, for example, COMPILE_TEST
and STM32_OMM:

stm32_firewall_device.h:117:5: error: no previous prototype for
‘stm32_firewall_get_firewall’ [-Werror=missing-prototypes]
  117 | int stm32_firewall_get_firewall(struct device_node *np, struct
stm32_firewall *firewall,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bus/stm32_firewall_device.h:123:5:
error: no previous prototype for ‘stm32_firewall_grant_access’
[-Werror=missing-prototypes]
  123 | int stm32_firewall_grant_access(struct stm32_firewall *firewall)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bus/stm32_firewall_device.h:128:6:
error: no previous prototype for ‘stm32_firewall_release_access’
[-Werror=missing-prototypes]
  128 | void stm32_firewall_release_access(struct stm32_firewall *firewall)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bus/stm32_firewall_device.h:132:5:
error: no previous prototype for ‘stm32_firewall_grant_access_by_id’
[-Werror=missing-prototypes]
  132 | int stm32_firewall_grant_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bus/stm32_firewall_device.h:137:6:
error: no previous prototype for ‘stm32_firewall_release_access_by_id’
[-Werror=missing-prototypes]
  137 | void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Make prototypes always exposed to fix this issue.

Cc: <stable@...r.kernel.org>
Fixes: 5c9668cfc6d7 ("firewall: introduce stm32_firewall framework")

Signed-off-by: Patrice Chotard <patrice.chotard@...s.st.com>
---
 include/linux/bus/stm32_firewall_device.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/linux/bus/stm32_firewall_device.h b/include/linux/bus/stm32_firewall_device.h
index 5178b72bc920986bb6c55887453d146f382a8e77..ba6ef4468a0a8dfeb3e146ec90502e2f35172edc 100644
--- a/include/linux/bus/stm32_firewall_device.h
+++ b/include/linux/bus/stm32_firewall_device.h
@@ -35,7 +35,6 @@ struct stm32_firewall {
 	u32 firewall_id;
 };
 
-#if IS_ENABLED(CONFIG_STM32_FIREWALL)
 /**
  * stm32_firewall_get_firewall - Get the firewall(s) associated to given device.
  *				 The firewall controller reference is always the first argument
@@ -112,6 +111,15 @@ int stm32_firewall_grant_access_by_id(struct stm32_firewall *firewall, u32 subsy
  */
 void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id);
 
+#if IS_ENABLED(CONFIG_STM32_FIREWALL)
+
+extern int stm32_firewall_get_firewall(struct device_node *np, struct stm32_firewall *firewall,
+				unsigned int nb_firewall);
+extern int stm32_firewall_grant_access(struct stm32_firewall *firewall);
+extern void stm32_firewall_release_access(struct stm32_firewall *firewall);
+extern int stm32_firewall_grant_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id);
+extern void stm32_firewall_release_access_by_id(struct stm32_firewall *firewall, u32 subsystem_id);
+
 #else /* CONFIG_STM32_FIREWALL */
 
 int stm32_firewall_get_firewall(struct device_node *np, struct stm32_firewall *firewall,

-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ