2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/fs/netfs
Kees Cook 58db1c3cd0
netfs: Mark __nonstring lookup tables
GCC 15's new -Wunterminated-string-initialization notices that the
character lookup tables "fscache_cache_states" and "fscache_cookie_states"
(which are not used as a C-String) need to be marked as "nonstring":

fs/netfs/fscache_cache.c:375:67: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Wunterminated-string-initialization]
  375 | static const char fscache_cache_states[NR__FSCACHE_CACHE_STATE] = "-PAEW";
      |                                                                   ^~~~~~~
fs/netfs/fscache_cookie.c:32:69: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (11 chars into 10 available) [-Wunterminated-string-initialization]
   32 | static const char fscache_cookie_states[FSCACHE_COOKIE_STATE__NR] = "-LCAIFUWRD";
      |                                                                     ^~~~~~~~~~~~

Annotate the arrays.

Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/20250416221654.work.028-kees@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-04-17 10:13:46 +02:00
..
buffered_read.c netfs: Fix setting NETFS_RREQ_ALL_QUEUED to be after all subreqs queued 2025-02-13 16:00:48 +01:00
buffered_write.c netfs: Remove unnecessary references to pages 2024-10-07 13:45:15 +02:00
direct_read.c netfs: Fix netfs_unbuffered_read() to return ssize_t rather than int 2025-03-19 10:04:23 +01:00
direct_write.c vfs-6.14-rc1.netfs 2025-01-20 09:29:11 -08:00
fscache_cache.c netfs: Mark __nonstring lookup tables 2025-04-17 10:13:46 +02:00
fscache_cookie.c netfs: Mark __nonstring lookup tables 2025-04-17 10:13:46 +02:00
fscache_internal.h netfs, fscache: Combine fscache with netfs 2023-12-24 15:08:46 +00:00
fscache_io.c fscache: Remove duplicate included header 2024-11-21 09:35:25 +01:00
fscache_main.c fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF 2024-09-01 10:30:25 +02:00
fscache_proc.c netfs: Fix proc/fs/fscache symlink to point to "netfs" not "../netfs" 2024-01-04 13:15:32 +00:00
fscache_stats.c netfs: Fix interaction between write-streaming and cachefiles culling 2024-01-05 15:42:25 +00:00
fscache_volume.c netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING 2024-11-11 14:39:38 +01:00
internal.h netfs: Add retry stat counters 2025-02-13 16:00:48 +01:00
iterator.c netfs: Speed up buffered reading 2024-09-12 12:20:41 +02:00
Kconfig netfs: clean up after renaming FSCACHE_DEBUG config 2024-08-12 22:03:26 +02:00
locking.c netfs: Downgrade i_rwsem for a buffered write 2024-10-17 15:33:42 +02:00
main.c netfs: Only create /proc/fs/netfs with CONFIG_PROC_FS 2025-04-11 15:58:18 +02:00
Makefile netfs: Add support for caching single monolithic objects such as AFS dirs 2024-12-20 22:34:06 +01:00
misc.c netfs: Add functions to build/clean a buffer in a folio_queue 2024-12-20 22:34:06 +01:00
objects.c netfs: Change the read result collector to only use one work item 2024-12-20 22:34:08 +01:00
read_collect.c netfs: Fix collection of results during pause when collection offloaded 2025-03-19 10:04:22 +01:00
read_pgpriv2.c netfs: Change the read result collector to only use one work item 2024-12-20 22:34:08 +01:00
read_retry.c netfs: Add retry stat counters 2025-02-13 16:00:48 +01:00
read_single.c afs: Locally initialise the contents of a new symlink on creation 2024-12-20 22:34:09 +01:00
rolling_buffer.c netfs: Fix rolling_buffer_load_from_ra() to not clear mark bits 2025-03-19 10:04:22 +01:00
stats.c netfs: Add retry stat counters 2025-02-13 16:00:48 +01:00
write_collect.c netfs: Call invalidate_cache only if implemented 2025-03-19 10:04:22 +01:00
write_issue.c netfs: Add retry stat counters 2025-02-13 16:00:48 +01:00
write_retry.c netfs: Add retry stat counters 2025-02-13 16:00:48 +01:00