<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/soc/apple/rtkit.c, branch v7.0.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-22T01:09:51+00:00</updated>
<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.radix-linux.su/kernel/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1: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>
</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.radix-linux.su/kernel/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>soc: apple: rtkit: Add function to poweroff</title>
<updated>2026-01-18T19:32:57+00:00</updated>
<author>
<name>Sven Peter</name>
<email>sven@kernel.org</email>
</author>
<published>2026-01-17T17:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba99035bf16ef0d4a7f6acd56fc9292c0bd0d42e'/>
<id>urn:sha1:ba99035bf16ef0d4a7f6acd56fc9292c0bd0d42e</id>
<content type='text'>
Add a function to put a co-processor into the lowest possible power
state from which recovery usually isn't possible without a full SoC
reset. This is required for the USB4/Thunderbolt co-processors which
can be restarted since the entire USB4 root complex can be completely
reset independently of the rest of the SoC.

Reviewed-by: Janne Grunau &lt;j@jannau.net&gt;
Link: https://patch.msgid.link/20260117-apple-rtkit-poweroff-v2-1-b882a180e44d@kernel.org
Signed-off-by: Sven Peter &lt;sven@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Make shmem_destroy optional</title>
<updated>2025-07-24T08:47:33+00:00</updated>
<author>
<name>Sven Peter</name>
<email>sven@kernel.org</email>
</author>
<published>2025-06-10T15:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba9ae011e8373b1ff34aa4175c79288013de7fc8'/>
<id>urn:sha1:ba9ae011e8373b1ff34aa4175c79288013de7fc8</id>
<content type='text'>
shmem_destroy isn't always required for coprocessor-managed buffers but we
still enforce that it exists. Just relax the check.

Reviewed-by: Alyssa Rosenzweig &lt;alyssa@rosenzweig.io&gt;
Reviewed-by: Neal Gompa &lt;neal@gompa.dev&gt;
Signed-off-by: Sven Peter &lt;sven@kernel.org&gt;
Link: https://lore.kernel.org/r/20250610-smc-6-15-v7-4-556cafd771d3@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Cut syslog messages after the first '\0'</title>
<updated>2025-02-28T21:36:45+00:00</updated>
<author>
<name>Janne Grunau</name>
<email>j@jannau.net</email>
</author>
<published>2025-02-26T19:00:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e210227f0259d2666cc41b28ed1b7b0b0a99ed4d'/>
<id>urn:sha1:e210227f0259d2666cc41b28ed1b7b0b0a99ed4d</id>
<content type='text'>
Certain messages from DCP contain NUL bytes in the random data after the
NUL terminated syslog message. Since the syslog message ends with '\n'
this results in a dev_info() message terminated with two newlines and an
empty printed line in the kernel log.

Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
Reviewed-by: Alyssa Rosenzweig &lt;alyssa@rosenzweig.io&gt;
Link: https://lore.kernel.org/r/20250226-apple-soc-misc-v2-4-c3ec37f9021b@svenpeter.dev
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Use high prio work queue</title>
<updated>2025-02-28T21:36:45+00:00</updated>
<author>
<name>Janne Grunau</name>
<email>j@jannau.net</email>
</author>
<published>2025-02-26T19:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=22af2fac88fa5dbc310bfe7d0b66d4de3ac47305'/>
<id>urn:sha1:22af2fac88fa5dbc310bfe7d0b66d4de3ac47305</id>
<content type='text'>
rtkit messages as communication with the DCP firmware for framebuffer
swaps or input events are time critical so use WQ_HIGHPRI to prevent
user space CPU load to increase latency.
With kwin_wayland 6's explicit sync mode user space load was able to
delay the IOMFB rtkit communication enough to miss vsync for surface
swaps. Minimal test scenario is constantly resizing a glxgears
Xwayland window.

Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
Reviewed-by: Alyssa Rosenzweig &lt;alyssa@rosenzweig.io&gt;
Link: https://lore.kernel.org/r/20250226-apple-soc-misc-v2-3-c3ec37f9021b@svenpeter.dev
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Implement OSLog buffers properly</title>
<updated>2025-02-28T21:36:45+00:00</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2025-02-26T19:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a06398687065e0c334dc5fc4d2778b5b87292e43'/>
<id>urn:sha1:a06398687065e0c334dc5fc4d2778b5b87292e43</id>
<content type='text'>
Apparently nobody can figure out where the old logic came from, but it
seems like it has never been actually used on any supported firmware to
this day. OSLog buffers were apparently never requested.

But starting with 13.3, we actually need this implemented properly for
MTP (and later AOP) to work, so let's actually do that.

Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Reviewed-by: Alyssa Rosenzweig &lt;alyssa@rosenzweig.io&gt;
Link: https://lore.kernel.org/r/20250226-apple-soc-misc-v2-2-c3ec37f9021b@svenpeter.dev
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Add and use PWR_STATE_INIT instead of _ON</title>
<updated>2025-02-28T21:36:45+00:00</updated>
<author>
<name>Janne Grunau</name>
<email>j@jannau.net</email>
</author>
<published>2025-02-26T19:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e46b6df8465e7a1c0d8e87a0966ecfb753ae84b'/>
<id>urn:sha1:3e46b6df8465e7a1c0d8e87a0966ecfb753ae84b</id>
<content type='text'>
This state is needed to wake the dcp IOP after m1n1 shut it down
and works for all other co-processors as well.

Signed-off-by: Janne Grunau &lt;j@jannau.net&gt;
Reviewed-by: Alyssa Rosenzweig &lt;alyssa@rosenzweig.io&gt;
Link: https://lore.kernel.org/r/20250226-apple-soc-misc-v2-1-c3ec37f9021b@svenpeter.dev
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()</title>
<updated>2025-02-18T17:01:20+00:00</updated>
<author>
<name>Harshit Mogalapalli</name>
<email>harshit.m.mogalapalli@oracle.com</email>
</author>
<published>2025-02-12T08:58:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00834971f0d9e38beae37e92055b1432782827d0'/>
<id>urn:sha1:00834971f0d9e38beae37e92055b1432782827d0</id>
<content type='text'>
This code calls kfree(bfr); and then passes "bfr" to rtk-&gt;ops-&gt;crashed()
which is a use after free.  The -&gt;crashed function pointer is implemented
by apple_nvme_rtkit_crashed() and it doesn't use the "bfr" pointer so
this doesn't cause a problem.  But it still looks sketchy as can be.

Fix this by moving kfree() after the last usage of bfr.

Fixes: bf8b4e49777d ("soc: apple: rtkit: Pass the crashlog to the crashed() callback")
Signed-off-by: Harshit Mogalapalli &lt;harshit.m.mogalapalli@oracle.com&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Link: https://lore.kernel.org/r/20250212085853.1357906-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Pass the crashlog to the crashed() callback</title>
<updated>2025-02-18T16:59:11+00:00</updated>
<author>
<name>Asahi Lina</name>
<email>lina@asahilina.net</email>
</author>
<published>2025-02-02T13:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf8b4e49777d944f84cf7d47360fe80dd3f69d96'/>
<id>urn:sha1:bf8b4e49777d944f84cf7d47360fe80dd3f69d96</id>
<content type='text'>
Client drivers might want a copy of the crashlog to stash into a
devcoredump blob. Since device memory management can be very variable,
the actual devcoredump implementation is left to client drivers. Pass
the raw crashlog buffer to the client callback so it can use it if
desired.

Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Reviewed-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Link: https://lore.kernel.org/r/20250202-rtkit-crashdump-v1-1-9d38615b4e12@asahilina.net
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
</entry>
</feed>
