<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/pstore/inode.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-22T01:09:51Z</updated>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2026-02-22T00:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:28Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>convert pstore</title>
<updated>2025-11-16T06:35:03Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2024-05-09T07:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eec876df5e7647bca03b72e0bcecb2e8bf0390a5'/>
<id>urn:sha1:eec876df5e7647bca03b72e0bcecb2e8bf0390a5</id>
<content type='text'>
object creation by d_alloc_name()+d_add() in pstore_mkfile(), removal -
via normal VFS codepaths (with -&gt;unlink() using simple_unlink()) or
in pstore_put_backend_records() via locked_recursive_removal()

Replace d_add() with d_make_persistent()+dput() - that's what really
happens there.  The reference that goes into record-&gt;dentry is valid
only until the unlink (and explicitly cleared by pstore_unlink()).

Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fs: rename generic_delete_inode() and generic_drop_inode()</title>
<updated>2025-09-15T14:09:42Z</updated>
<author>
<name>Mateusz Guzik</name>
</author>
<published>2025-09-15T12:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f99b3917789d83ea89b24b722d784956f8289f45'/>
<id>urn:sha1:f99b3917789d83ea89b24b722d784956f8289f45</id>
<content type='text'>
generic_delete_inode() is rather misleading for what the routine is
doing. inode_just_drop() should be much clearer.

The new naming is inconsistent with generic_drop_inode(), so rename that
one as well with inode_ as the suffix.

No functional changes.

Signed-off-by: Mateusz Guzik &lt;mjguzik@gmail.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>pstore: switch to locked_recursive_removal()</title>
<updated>2025-07-03T02:36:51Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2025-03-10T04:34:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b7a8ca43fcf027f8aabd7c0629c2d39bfd97300'/>
<id>urn:sha1:7b7a8ca43fcf027f8aabd7c0629c2d39bfd97300</id>
<content type='text'>
rather than playing with manual d_invalidate()

Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pstore-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2025-03-24T22:43:28Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2025-03-24T22:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95c61e1a9c924481c0828fbd7b9e0432741b7472'/>
<id>urn:sha1:95c61e1a9c924481c0828fbd7b9e0432741b7472</id>
<content type='text'>
Pull tiny pstore update from Kees Cook:

 - pstore: Change kmsg_bytes storage size to u32

* tag 'pstore-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  pstore: Change kmsg_bytes storage size to u32
</content>
</entry>
<entry>
<title>pstore: Change kmsg_bytes storage size to u32</title>
<updated>2025-02-10T17:02:14Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2025-02-06T19:16:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5674609535bafa834ab014d90d9bbe8e89223a0b'/>
<id>urn:sha1:5674609535bafa834ab014d90d9bbe8e89223a0b</id>
<content type='text'>
The types around kmsg_bytes were inconsistent. The global was unsigned
long, the argument to pstore_set_kmsg_bytes() was int, and the filesystem
option was u32. Given other internal limits, there's not much sense
in making a single pstore record larger than INT_MAX and it can't be
negative, so use u32 everywhere. Additionally, use READ/WRITE_ONCE and a
local variable in pstore_dump() to avoid kmsg_bytes changing during a
dump.

Link: https://lore.kernel.org/r/20250206191655.work.798-kees@kernel.org
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>pstore: convert to the new mount API</title>
<updated>2025-02-06T10:50:43Z</updated>
<author>
<name>Eric Sandeen</name>
</author>
<published>2025-02-05T21:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f584714cffb9f7b3f1ae1d27bd57f099642fcfe8'/>
<id>urn:sha1:f584714cffb9f7b3f1ae1d27bd57f099642fcfe8</id>
<content type='text'>
Convert the pstore filesystem to the new mount API.

Cc: Kees Cook &lt;kees@kernel.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Link: https://lore.kernel.org/r/20250205213931.74614-2-sandeen@redhat.com
Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>pstore: inode: Only d_invalidate() is needed</title>
<updated>2024-02-22T18:37:21Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2024-02-22T17:48:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a43e0fc5e9134a46515de2f2f8d4100b74e50de3'/>
<id>urn:sha1:a43e0fc5e9134a46515de2f2f8d4100b74e50de3</id>
<content type='text'>
Unloading a modular pstore backend with records in pstorefs would
trigger the dput() double-drop warning:

  WARNING: CPU: 0 PID: 2569 at fs/dcache.c:762 dput.part.0+0x3f3/0x410

Using the combo of d_drop()/dput() (as mentioned in
Documentation/filesystems/vfs.rst) isn't the right approach here, and
leads to the reference counting problem seen above. Use d_invalidate()
and update the code to not bother checking for error codes that can
never happen.

Suggested-by: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Fixes: 609e28bb139e ("pstore: Remove filesystem records when backend is unregistered")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
---
Cc: "Guilherme G. Piccoli" &lt;gpiccoli@igalia.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: linux-hardening@vger.kernel.org
</content>
</entry>
<entry>
<title>pstore: inode: Use cleanup.h for struct pstore_private</title>
<updated>2023-12-08T22:15:44Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2023-12-05T18:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24a0b5e196cf70ccff97bc0add6fa7178ad50cc4'/>
<id>urn:sha1:24a0b5e196cf70ccff97bc0add6fa7178ad50cc4</id>
<content type='text'>
Simplify error path when "private" needs to be freed.

Cc: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc:  &lt;linux-hardening@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20231205182622.1329923-4-keescook@chromium.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
</feed>
