<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/net/sunrpc/cache.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/net/sunrpc/cache.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/net/sunrpc/cache.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-19T16:25:38Z</updated>
<entry>
<title>SUNRPC: Cache deferral injection</title>
<updated>2022-05-19T16:25:38Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2022-03-31T19:30:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=37324e6bb120bc3cb7cbaa87512ff3a93dbcf5c4'/>
<id>urn:sha1:37324e6bb120bc3cb7cbaa87512ff3a93dbcf5c4</id>
<content type='text'>
Cache deferral injection stress-tests the cache deferral logic as
well as upper layer protocol deferred request handlers. This
facility is for developers and professional testers to ensure
coverage of the rqst deferral code paths. To date, we haven't
had an adequate way to ensure these code paths are covered
during testing, short of temporary code changes to force their
use.

A file called /sys/kernel/debug/fail_sunrpc/ignore-cache-wait
enables administrators to disable cache deferral injection while
allowing other types of sunrpc errors to be injected. The default
setting is that cache deferral injection is enabled (ignore=false).

To enable support for cache deferral injection,
CONFIG_FAULT_INJECTION, CONFIG_FAULT_INJECTION_DEBUG_FS, and
CONFIG_SUNRPC_DEBUG must all be set to "Y".

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>proc: remove PDE_DATA() completely</title>
<updated>2022-01-22T06:33:37Z</updated>
<author>
<name>Muchun Song</name>
<email>songmuchun@bytedance.com</email>
</author>
<published>2022-01-22T06:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=359745d78351c6f5442435f81549f0207ece28aa'/>
<id>urn:sha1:359745d78351c6f5442435f81549f0207ece28aa</id>
<content type='text'>
Remove PDE_DATA() completely and replace it with pde_data().

[akpm@linux-foundation.org: fix naming clash in drivers/nubus/proc.c]
[akpm@linux-foundation.org: now fix it properly]

Link: https://lkml.kernel.org/r/20211124081956.87711-2-songmuchun@bytedance.com
Signed-off-by: Muchun Song &lt;songmuchun@bytedance.com&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Alexey Gladkov &lt;gladkov.alexey@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>SUNRPC: improve error response to over-size gss credential</title>
<updated>2021-09-03T17:38:11Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2021-09-01T23:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0c217d5066c84f67cd672cf03ec8f682e5d013c2'/>
<id>urn:sha1:0c217d5066c84f67cd672cf03ec8f682e5d013c2</id>
<content type='text'>
When the NFS server receives a large gss (kerberos) credential and tries
to pass it up to rpc.svcgssd (which is deprecated), it triggers an
infinite loop in cache_read().

cache_request() always returns -EAGAIN, and this causes a "goto again".

This patch:
 - changes the error to -E2BIG to avoid the infinite loop, and
 - generates a WARN_ONCE when rsi_request first sees an over-sized
   credential.  The warning suggests switching to gssproxy.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196583
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: clean-up cache downcall</title>
<updated>2020-12-09T14:38:34Z</updated>
<author>
<name>Roberto Bergantinos Corpas</name>
<email>rbergant@redhat.com</email>
</author>
<published>2020-11-27T18:38:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4b5cff7ed8afcdd35bfff39ab503342900ec80c6'/>
<id>urn:sha1:4b5cff7ed8afcdd35bfff39ab503342900ec80c6</id>
<content type='text'>
We can simplify code around cache_downcall unifying memory
allocations using kvmalloc. This has the benefit of getting rid of
cache_slow_downcall (and queue_io_mutex), and also matches userland
allocation size and limits.

Signed-off-by: Roberto Bergantinos Corpas &lt;rbergant@redhat.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: raise kernel RPC channel buffer size</title>
<updated>2020-10-20T17:21:30Z</updated>
<author>
<name>Roberto Bergantinos Corpas</name>
<email>rbergant@redhat.com</email>
</author>
<published>2020-10-19T09:33:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=27a1e8a0f79e643d4dedb46f71e76bdee3801877'/>
<id>urn:sha1:27a1e8a0f79e643d4dedb46f71e76bdee3801877</id>
<content type='text'>
Its possible that using AUTH_SYS and mountd manage-gids option a
user may hit the 8k RPC channel buffer limit. This have been observed
on field, causing unanswered RPCs on clients after mountd fails to
write on channel :

rpc.mountd[11231]: auth_unix_gid: error writing reply

Userland nfs-utils uses a buffer size of 32k (RPC_CHAN_BUF_SIZE), so
lets match those two.

Signed-off-by: Roberto Bergantinos Corpas &lt;rbergant@redhat.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: simplify do_cache_clean</title>
<updated>2020-09-25T22:02:02Z</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2020-09-21T13:45:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0aa99c4d1f216318b1c4f4e4fe321868294a1d9f'/>
<id>urn:sha1:0aa99c4d1f216318b1c4f4e4fe321868294a1d9f</id>
<content type='text'>
Is it just me, or is the logic written in a slightly convoluted way?

I find it a little easier to read this way.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: cache : Replace seq_printf with seq_puts</title>
<updated>2020-09-25T22:01:28Z</updated>
<author>
<name>Xu Wang</name>
<email>vulab@iscas.ac.cn</email>
</author>
<published>2020-09-16T05:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9dbc1f45d512f3a90c1df8ac35bcb7a4db548286'/>
<id>urn:sha1:9dbc1f45d512f3a90c1df8ac35bcb7a4db548286</id>
<content type='text'>
seq_puts is a lot cheaper than seq_printf, so use that to print
literal strings.

Signed-off-by: Xu Wang &lt;vulab@iscas.ac.cn&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC/cache: Fix unsafe traverse caused double-free in cache_purge</title>
<updated>2020-04-13T14:28:21Z</updated>
<author>
<name>Yihao Wu</name>
<email>wuyihao@linux.alibaba.com</email>
</author>
<published>2020-04-05T17:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=43e33924c38e8faeb0c12035481cb150e602e39d'/>
<id>urn:sha1:43e33924c38e8faeb0c12035481cb150e602e39d</id>
<content type='text'>
Deleting list entry within hlist_for_each_entry_safe is not safe unless
next pointer (tmp) is protected too. It's not, because once hash_lock
is released, cache_clean may delete the entry that tmp points to. Then
cache_purge can walk to a deleted entry and tries to double free it.

Fix this bug by holding only the deleted entry's reference.

Suggested-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Yihao Wu &lt;wuyihao@linux.alibaba.com&gt;
Reviewed-by: NeilBrown &lt;neilb@suse.de&gt;
[ cel: removed unused variable ]
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: Add tracing for cache events</title>
<updated>2020-03-16T16:04:34Z</updated>
<author>
<name>Trond Myklebust</name>
<email>trondmy@gmail.com</email>
</author>
<published>2020-03-01T23:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=78a947f50aaabd8d49e634a84f451c0933af853a'/>
<id>urn:sha1:78a947f50aaabd8d49e634a84f451c0933af853a</id>
<content type='text'>
Add basic tracing for debugging the sunrpc cache events.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC/cache: Allow garbage collection of invalid cache entries</title>
<updated>2020-03-16T16:04:34Z</updated>
<author>
<name>Trond Myklebust</name>
<email>trondmy@gmail.com</email>
</author>
<published>2020-03-01T23:21:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=277f27e2f27752cd1a7901443d72e908ddea8a2e'/>
<id>urn:sha1:277f27e2f27752cd1a7901443d72e908ddea8a2e</id>
<content type='text'>
If the cache entry never gets initialised, we want the garbage
collector to be able to evict it. Otherwise if the upcall daemon
fails to initialise the entry, we end up never expiring it.

Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
[ cel: resolved a merge conflict ]
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
</feed>
