Thread (23 messages) 23 messages, 3 authors, 2023-07-26

Re: [PATCH v2 05/11] firewall: introduce stm32_firewall framework

From: Simon Horman <hidden>
Date: 2023-07-26 11:42:04
Also in: alsa-devel, dmaengine, linux-crypto, linux-devicetree, linux-i2c, linux-iio, linux-media, linux-mmc, linux-phy, linux-serial, linux-spi, linux-usb, lkml

On Wed, Jul 26, 2023 at 12:38:00PM +0200, Gatien CHEVALLIER wrote:

On 7/26/23 12:19, Simon Horman wrote:
quoted
On Tue, Jul 25, 2023 at 06:40:58PM +0200, Gatien Chevallier wrote:
quoted
Introduce a STM32 firewall framework that offers to firewall consumers
different firewall services such as the ability to check their access
rights against their firewall controller(s).

The STM32 firewall framework offers a generic API for STM32 firewall
controllers that is defined in their drivers to best fit the
specificity of each firewall.

There are various types of firewalls:
-Peripheral firewalls that filter accesses to peripherals
-Memory firewalls that filter accesses to memories or memory regions
-No type for undefined type of firewall

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
...
quoted
diff --git a/drivers/bus/stm32_firewall.c b/drivers/bus/stm32_firewall.c
...
quoted
+int stm32_firewall_populate_bus(struct stm32_firewall_controller *firewall_controller)
+{
+	struct stm32_firewall *firewalls;
+	struct device_node *child;
+	struct device *parent;
+	unsigned int i;
+	int len;
+	int err;
+
+	parent = firewall_controller->dev;
+
+	dev_dbg(parent, "Populating %s system bus\n", dev_name(firewall_controller->dev));
+
+	for_each_available_child_of_node(dev_of_node(parent), child) {
+		/* The feature-domains property is mandatory for firewall bus devices */
+		len = of_count_phandle_with_args(child, "feature-domains", "#feature-domain-cells");
+		if (len <= 0)
Coccinelle says that, due to breaking out of a
for_each_available_child_of_node() loop, a call to of_node_put()
is needed here
Hi Simon,

Thank you, I already sent a V3 correcting the patch ordering issue. I
will implement this for V4.
Hi Gatien,

Thanks and sorry for not noticing v3 - I think it arrived while
I was in the middle of reviewing v2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help