<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/netfs/fscache_main.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-09-01T08:30:25Z</updated>
<entry>
<title>fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF</title>
<updated>2024-09-01T08:30:25Z</updated>
<author>
<name>Baokun Li</name>
</author>
<published>2024-08-26T11:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72a6e22c604c95ddb3b10b5d3bb85b6ff4dbc34f'/>
<id>urn:sha1:72a6e22c604c95ddb3b10b5d3bb85b6ff4dbc34f</id>
<content type='text'>
The fscache_cookie_lru_timer is initialized when the fscache module
is inserted, but is not deleted when the fscache module is removed.
If timer_reduce() is called before removing the fscache module,
the fscache_cookie_lru_timer will be added to the timer list of
the current cpu. Afterwards, a use-after-free will be triggered
in the softIRQ after removing the fscache module, as follows:

==================================================================
BUG: unable to handle page fault for address: fffffbfff803c9e9
 PF: supervisor read access in kernel mode
 PF: error_code(0x0000) - not-present page
PGD 21ffea067 P4D 21ffea067 PUD 21ffe6067 PMD 110a7c067 PTE 0
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G W 6.11.0-rc3 #855
Tainted: [W]=WARN
RIP: 0010:__run_timer_base.part.0+0x254/0x8a0
Call Trace:
 &lt;IRQ&gt;
 tmigr_handle_remote_up+0x627/0x810
 __walk_groups.isra.0+0x47/0x140
 tmigr_handle_remote+0x1fa/0x2f0
 handle_softirqs+0x180/0x590
 irq_exit_rcu+0x84/0xb0
 sysvec_apic_timer_interrupt+0x6e/0x90
 &lt;/IRQ&gt;
 &lt;TASK&gt;
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:default_idle+0xf/0x20
 default_idle_call+0x38/0x60
 do_idle+0x2b5/0x300
 cpu_startup_entry+0x54/0x60
 start_secondary+0x20d/0x280
 common_startup_64+0x13e/0x148
 &lt;/TASK&gt;
Modules linked in: [last unloaded: netfs]
==================================================================

Therefore delete fscache_cookie_lru_timer when removing the fscahe module.

Fixes: 12bb21a29c19 ("fscache: Implement cookie user counting and resource pinning")
Cc: stable@kernel.org
Signed-off-by: Baokun Li &lt;libaokun1@huawei.com&gt;
Link: https://lore.kernel.org/r/20240826112056.2458299-1-libaokun@huaweicloud.com
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>netfs: Revert "netfs: Switch debug logging to pr_debug()"</title>
<updated>2024-07-24T08:15:37Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2024-07-18T20:07:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9d47a50cf257ff1019a4e30d573777882fd785c'/>
<id>urn:sha1:a9d47a50cf257ff1019a4e30d573777882fd785c</id>
<content type='text'>
Revert commit 163eae0fb0d4c610c59a8de38040f8e12f89fd43 to get back the
original operation of the debugging macros.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Link: https://lore.kernel.org/r/20240608151352.22860-2-ukleinek@kernel.org
Link: https://lore.kernel.org/r/1410685.1721333252@warthog.procyon.org.uk
cc: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
cc: Christian Brauner &lt;brauner@kernel.org&gt;
cc: Jeff Layton &lt;jlayton@kernel.org&gt;
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>netfs: Switch debug logging to pr_debug()</title>
<updated>2024-06-12T12:25:41Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2024-06-08T15:13:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=163eae0fb0d4c610c59a8de38040f8e12f89fd43'/>
<id>urn:sha1:163eae0fb0d4c610c59a8de38040f8e12f89fd43</id>
<content type='text'>
Instead of inventing a custom way to conditionally enable debugging,
just make use of pr_debug(), which also has dynamic debugging facilities
and is more likely known to someone who hunts a problem in the netfs
code. Also drop the module parameter netfs_debug which didn't have any
effect without further source changes. (The variable netfs_debug was
only used in #ifdef blocks for cpp vars that don't exist; Note that
CONFIG_NETFS_DEBUG isn't settable via kconfig, a variable with that name
never existed in the mainline and is probably just taken over (and
renamed) from similar custom debug logging implementations.)

Signed-off-by: Uwe Kleine-König &lt;ukleinek@kernel.org&gt;
Link: https://lore.kernel.org/r/20240608151352.22860-2-ukleinek@kernel.org
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>netfs, fscache: Move /proc/fs/fscache to /proc/fs/netfs and put in a symlink</title>
<updated>2023-12-24T15:08:48Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2023-11-21T15:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab'/>
<id>urn:sha1:7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab</id>
<content type='text'>
Rename /proc/fs/fscache to "netfs" and make a symlink from fscache to that.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
cc: Christian Brauner &lt;christian@brauner.io&gt;
cc: linux-fsdevel@vger.kernel.org
cc: linux-cachefs@redhat.com
</content>
</entry>
<entry>
<title>netfs, fscache: Combine fscache with netfs</title>
<updated>2023-12-24T15:08:46Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2023-11-20T15:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=915cd30cdea8811cddd8f59e57dd9dd0a814b76c'/>
<id>urn:sha1:915cd30cdea8811cddd8f59e57dd9dd0a814b76c</id>
<content type='text'>
Now that the fscache code is moved to be colocated with the netfslib code
so that they combined into one module, do the combining.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
cc: Christian Brauner &lt;christian@brauner.io&gt;
cc: linux-fsdevel@vger.kernel.org
cc: linux-cachefs@redhat.com
cc: linux-nfs@vger.kernel.org,
cc: linux-erofs@lists.ozlabs.org
</content>
</entry>
<entry>
<title>netfs, fscache: Move fs/fscache/* into fs/netfs/</title>
<updated>2023-12-24T11:36:00Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2023-11-20T15:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47757ea83a545536cdd418fec84b7a970710e48b'/>
<id>urn:sha1:47757ea83a545536cdd418fec84b7a970710e48b</id>
<content type='text'>
There's a problem with dependencies between netfslib and fscache as each
wants to access some functions of the other.  Deal with this by moving
fs/fscache/* into fs/netfs/ and renaming those files to begin with
"fscache-".

For the moment, the moved files are changed as little as possible and an
fscache module is still built.  A subsequent patch will integrate them.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
cc: Christian Brauner &lt;christian@brauner.io&gt;
cc: linux-fsdevel@vger.kernel.org
cc: linux-cachefs@redhat.com
</content>
</entry>
</feed>
