<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/bus/stm32_firewall.c, branch v7.2-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>bus: stm32_firewall: add stm32_firewall_get_grant_all_access() API</title>
<updated>2026-03-25T16:40:22+00:00</updated>
<author>
<name>Gatien Chevallier</name>
<email>gatien.chevallier@foss.st.com</email>
</author>
<published>2026-02-26T10:30:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ea96cfc728bbc7c1c3051cce9209bf9a6eeb23e'/>
<id>4ea96cfc728bbc7c1c3051cce9209bf9a6eeb23e</id>
<content type='text'>
Add the stm32_firewall_get_grant_all_access() API to be able to fetch
all firewall references in an access-controllers property and try to grant
access to all of them.

Signed-off-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Reviewed-by: Linus Walleij &lt;linusw@kernel.org&gt;
Link: https://lore.kernel.org/r/20260226-debug_bus-v6-5-5d794697798d@foss.st.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the stm32_firewall_get_grant_all_access() API to be able to fetch
all firewall references in an access-controllers property and try to grant
access to all of them.

Signed-off-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Reviewed-by: Linus Walleij &lt;linusw@kernel.org&gt;
Link: https://lore.kernel.org/r/20260226-debug_bus-v6-5-5d794697798d@foss.st.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bus: stm32_firewall: allow check on different firewall controllers</title>
<updated>2026-03-25T16:40:22+00:00</updated>
<author>
<name>Gatien Chevallier</name>
<email>gatien.chevallier@foss.st.com</email>
</author>
<published>2026-02-26T10:30:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=892320d20362b7d567b759aec2bbe9c26b404e00'/>
<id>892320d20362b7d567b759aec2bbe9c26b404e00</id>
<content type='text'>
Current implementation restricts the check on the firewall controller
being the bus parent. Change this by using the controller referenced
in each firewall queries.

Signed-off-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20260226-debug_bus-v6-4-5d794697798d@foss.st.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current implementation restricts the check on the firewall controller
being the bus parent. Change this by using the controller referenced
in each firewall queries.

Signed-off-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20260226-debug_bus-v6-4-5d794697798d@foss.st.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bus: stm32_firewall: Simplify with scoped for each OF child loop</title>
<updated>2026-03-25T16:40:21+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@oss.qualcomm.com</email>
</author>
<published>2026-01-05T14:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=256b4efd98b1dcbe80e817a67b17c07becb80969'/>
<id>256b4efd98b1dcbe80e817a67b17c07becb80969</id>
<content type='text'>
Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@oss.qualcomm.com&gt;
Tested-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20260105143657.383621-5-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@oss.qualcomm.com&gt;
Tested-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20260105143657.383621-5-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bus: firewall: move stm32_firewall header file in include folder</title>
<updated>2026-03-25T16:40:21+00:00</updated>
<author>
<name>Clément Le Goffic</name>
<email>clement.legoffic@foss.st.com</email>
</author>
<published>2026-02-10T19:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=698753e4a51a5a6670d527a3db084c3616253abc'/>
<id>698753e4a51a5a6670d527a3db084c3616253abc</id>
<content type='text'>
Other driver than RIFSC and ETZPC can implement firewall ops, such as
RCC.
In order for them to have access to the ops and type of this framework,
we need to get the `stm32_firewall.h` file in the include/ folder.

Signed-off-by: Clément Le Goffic &lt;clement.legoffic@foss.st.com&gt;
Signed-off-by: Clément Le Goffic &lt;legoffic.clement@gmail.com&gt;
Acked-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20260210-b4-firewall-upstream-v8-1-097c1e47af82@gmail.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Other driver than RIFSC and ETZPC can implement firewall ops, such as
RCC.
In order for them to have access to the ops and type of this framework,
we need to get the `stm32_firewall.h` file in the include/ folder.

Signed-off-by: Clément Le Goffic &lt;clement.legoffic@foss.st.com&gt;
Signed-off-by: Clément Le Goffic &lt;legoffic.clement@gmail.com&gt;
Acked-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Link: https://lore.kernel.org/r/20260210-b4-firewall-upstream-v8-1-097c1e47af82@gmail.com
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bus: stm32_firewall: fix off by one in stm32_firewall_get_firewall()</title>
<updated>2024-04-25T12:44:39+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-04-12T08:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e4500d7525f9223a0a46431caa6d0f2d165f05ce'/>
<id>e4500d7525f9223a0a46431caa6d0f2d165f05ce</id>
<content type='text'>
The "nb_firewall" variable is the number of elements in the firewall[]
array, which is allocated in stm32_firewall_populate_bus().  So change
this &gt; comparison to &gt;= to prevent an out of bound access.

Fixes: 5c9668cfc6d7 ("firewall: introduce stm32_firewall framework")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "nb_firewall" variable is the number of elements in the firewall[]
array, which is allocated in stm32_firewall_populate_bus().  So change
this &gt; comparison to &gt;= to prevent an out of bound access.

Fixes: 5c9668cfc6d7 ("firewall: introduce stm32_firewall framework")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Gatien Chevallier &lt;gatien.chevallier@foss.st.com&gt;
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>firewall: introduce stm32_firewall framework</title>
<updated>2024-04-05T14:49:14+00:00</updated>
<author>
<name>Gatien Chevallier</name>
<email>gatien.chevallier@foss.st.com</email>
</author>
<published>2024-01-05T13:03:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5c9668cfc6d7c7de30fa57fa0a6c0ddc93462969'/>
<id>5c9668cfc6d7c7de30fa57fa0a6c0ddc93462969</id>
<content type='text'>
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 &lt;gatien.chevallier@foss.st.com&gt;
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;gatien.chevallier@foss.st.com&gt;
Signed-off-by: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
