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: <7b344f05-70b6-4c59-9b5f-611dde59c09b@kernel.org>
Date: Wed, 7 May 2025 11:22:49 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Patrice Chotard <patrice.chotard@...s.st.com>,
 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, stable@...r.kernel.org
Subject: Re: [PATCH v13 1/4] firewall: Always expose firewall prototype

On 07/05/2025 09:25, Patrice Chotard wrote:
> 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);

That's duplicated with earlier declaration. If you need to duplicate
declarations means your code is not correct. That's not a fix at all and
you are again masking the real problem which I asked to understand and
learn.

This is something solved already in all other common interfaces (ones
with stubs) and it confuses me why here it takes so much time. I'll just
fix it myself and I will apply v11.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ