Skip to content

const xattr tables

Wedson Almeida Filho ceph-devel cluster-devel ecryptfs linux-btrfs linux-cifs linux-erofs linux-ext4 linux-f2fs-devel linux-fsdevel linux-mm linux-mtd linux-nfs linux-unionfs linux-xfs lkml netdev ntfs3 ocfs2-devel oe-kbuild-all reiserfs-devel v9fs 1 version Applied

Status from this message: Applied to the vfs.xattr branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest29 patches 22 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/29xattr: make the xattr array itself constfs/xattr.c include/linux/fs.h+4 -41 reply
2/29ext4: move ext4_xattr_handlers to .rodatafs/ext4/xattr.c fs/ext4/xattr.h+2 -20 replies
3/299p: move xattr-related structs to .rodatafs/9p/xattr.c fs/9p/xattr.h+5 -54 replies
4/29afs: move afs_xattr_handlers to .rodatafs/afs/internal.h fs/afs/xattr.c+2 -20 replies
5/29btrfs: move btrfs_xattr_handlers to .rodatafs/btrfs/xattr.c fs/btrfs/xattr.h+2 -23 replies
6/29ceph: move ceph_xattr_handlers to .rodatafs/ceph/super.h fs/ceph/xattr.c+2 -21 reply
7/29ecryptfs: move ecryptfs_xattr_handlers to .rodatafs/ecryptfs/ecryptfs_kernel.h fs/ecryptfs/inode.c+2 -20 replies
8/29erofs: move erofs_xattr_handlers and xattr_handler_map to .rodatafs/erofs/xattr.c fs/erofs/xattr.h+3 -31 reply
9/29ext2: move ext2_xattr_handlers and ext2_xattr_handler_map to .rodatafs/ext2/xattr.c fs/ext2/xattr.h+3 -31 reply
10/29f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map to .rodatafs/f2fs/xattr.c fs/f2fs/xattr.h+3 -31 reply
11/29fuse: move fuse_xattr_handlers to .rodatafs/fuse/fuse_i.h fs/fuse/xattr.c+2 -20 replies
12/29gfs2: move gfs2_xattr_handlers_max to .rodatafs/gfs2/super.h fs/gfs2/xattr.c+4 -40 replies
13/29hfs: move hfs_xattr_handlers to .rodatafs/hfs/attr.c fs/hfs/hfs_fs.h+2 -20 replies
14/29hfsplus: move hfsplus_xattr_handlers to .rodatafs/hfsplus/xattr.c fs/hfsplus/xattr.h+2 -20 replies
15/29jffs2: move jffs2_xattr_handlers to .rodatafs/jffs2/xattr.c fs/jffs2/xattr.h+2 -21 reply
16/29jfs: move jfs_xattr_handlers to .rodatafs/jfs/jfs_xattr.h fs/jfs/xattr.c+2 -21 reply
17/29kernfs: move kernfs_xattr_handlers to .rodatafs/kernfs/inode.c fs/kernfs/kernfs-internal.h+2 -21 reply
18/29nfs: move nfs4_xattr_handlers to .rodatafs/nfs/nfs.h fs/nfs/nfs4_fs.h fs/nfs/nfs4proc.c+3 -30 replies
19/29ntfs3: move ntfs_xattr_handlers to .rodatafs/ntfs3/ntfs_fs.h fs/ntfs3/xattr.c+2 -20 replies
20/29ocfs2: move ocfs2_xattr_handlers and ocfs2_xattr_handler_map to .rodatafs/ocfs2/xattr.c fs/ocfs2/xattr.h+3 -30 replies
21/29orangefs: move orangefs_xattr_handlers to .rodatafs/orangefs/orangefs-kernel.h fs/orangefs/xattr.c+2 -20 replies
22/29reiserfs: move reiserfs_xattr_handlers to .rodatafs/reiserfs/reiserfs.h fs/reiserfs/xattr.c+2 -20 replies
23/29smb: move cifs_xattr_handlers to .rodatafs/smb/client/cifsfs.h fs/smb/client/xattr.c+2 -21 reply
24/29squashfs: move squashfs_xattr_handlers to .rodatafs/squashfs/squashfs.h fs/squashfs/xattr.c+2 -20 replies
25/29ubifs: move ubifs_xattr_handlers to .rodatafs/ubifs/ubifs.h fs/ubifs/xattr.c+2 -21 reply
26/29xfs: move xfs_xattr_handlers to .rodatafs/xfs/xfs_xattr.c fs/xfs/xfs_xattr.h+2 -21 reply
27/29overlayfs: move xattr tables to .rodatafs/overlayfs/super.c+2 -21 reply
28/29shmem: move shmem_xattr_handlers to .rodatamm/shmem.c+1 -10 replies
29/29net: move sockfs_xattr_handlers to .rodatainclude/linux/pseudo_fs.h net/socket.c+2 -21 reply

Reviews trailers per patch

13 of 29 patches have a Reviewed-by or Acked-by.

PatchChristian SchoenebeckDarrick J. WongSteve FrenchJan KaraIlya DryomovDave KleikampAmir GoldsteinDominique MartinetJakub KicinskiGreg Kroah-HartmanZhihao ChengGao XiangChao Yu
1/29
2/29
3/29R-b A-b
4/29
5/29
6/29A-b
7/29
8/29A-b
9/29A-b
10/29R-b
11/29
12/29
13/29
14/29
15/29R-b
16/29R-b
17/29A-b
18/29
19/29
20/29
21/29
22/29
23/29R-b
24/29
25/29R-b
26/29R-b
27/29A-b
28/29
29/29A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 13 reviewers.

Read the v1 thread

Cover letter [PATCH 00/29] const xattr tables

From: Wedson Almeida Filho <[email protected]>

The 's_xattr' field of 'struct super_block' currently requires a mutable table of 'struct xattr_handler' entries (although each handler itself is const). However, no code in vfs actually modifies the tables.

So this series changes the type of 's_xattr' to allow const tables, and modifies existing file system to move their tables to .rodata. This is desirable because these tables contain entries with function pointers in them; moving them to .rodata makes it considerably less likely to be modified accidentally or maliciously at runtime.

I found this while writing Rust abstractions for vfs.

Wedson Almeida Filho (29):
xattr: make the xattr array itself const
ext4: move ext4_xattr_handlers to .rodata
9p: move xattr-related structs to .rodata
afs: move afs_xattr_handlers to .rodata
btrfs: move btrfs_xattr_handlers to .rodata
ceph: move ceph_xattr_handlers to .rodata
ecryptfs: move ecryptfs_xattr_handlers to .rodata
erofs: move erofs_xattr_handlers and xattr_handler_map to .rodata
ext2: move ext2_xattr_handlers and ext2_xattr_handler_map to .rodata
f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map to .rodata
fuse: move fuse_xattr_handlers to .rodata
gfs2: move gfs2_xattr_handlers_max to .rodata
hfs: move hfs_xattr_handlers to .rodata
hfsplus: move hfsplus_xattr_handlers to .rodata
jffs2: move jffs2_xattr_handlers to .rodata
jfs: move jfs_xattr_handlers to .rodata
kernfs: move kernfs_xattr_handlers to .rodata
nfs: move nfs4_xattr_handlers to .rodata
ntfs3: move ntfs_xattr_handlers to .rodata
ocfs2: move ocfs2_xattr_handlers and ocfs2_xattr_handler_map to
.rodata
orangefs: move orangefs_xattr_handlers to .rodata
reiserfs: move reiserfs_xattr_handlers to .rodata
smb: move cifs_xattr_handlers to .rodata
squashfs: move squashfs_xattr_handlers to .rodata
ubifs: move ubifs_xattr_handlers to .rodata
xfs: move xfs_xattr_handlers to .rodata
overlayfs: move xattr tables to .rodata
shmem: move shmem_xattr_handlers to .rodata
net: move sockfs_xattr_handlers to .rodata

 fs/9p/xattr.c                 | 8 ++++----
 fs/9p/xattr.h                 | 2 +-
 fs/afs/internal.h             | 2 +-
 fs/afs/xattr.c                | 2 +-
 fs/btrfs/xattr.c              | 2 +-
 fs/btrfs/xattr.h              | 2 +-
 fs/ceph/super.h               | 2 +-
 fs/ceph/xattr.c               | 2 +-
 fs/ecryptfs/ecryptfs_kernel.h | 2 +-
 fs/ecryptfs/inode.c           | 2 +-
 fs/erofs/xattr.c              | 2 +-
 fs/erofs/xattr.h              | 4 ++--
 fs/ext2/xattr.c               | 4 ++--
 fs/ext2/xattr.h               | 2 +-
 fs/ext4/xattr.c               | 2 +-
 fs/ext4/xattr.h               | 2 +-
 fs/f2fs/xattr.c               | 4 ++--
 fs/f2fs/xattr.h               | 2 +-
 fs/fuse/fuse_i.h              | 2 +-
 fs/fuse/xattr.c               | 2 +-
 fs/gfs2/super.h               | 4 ++--
 fs/gfs2/xattr.c               | 4 ++--
 fs/hfs/attr.c                 | 2 +-
 fs/hfs/hfs_fs.h               | 2 +-
 fs/hfsplus/xattr.c            | 2 +-
 fs/hfsplus/xattr.h            | 2 +-
 fs/jffs2/xattr.c              | 2 +-
 fs/jffs2/xattr.h              | 2 +-
 fs/jfs/jfs_xattr.h            | 2 +-
 fs/jfs/xattr.c                | 2 +-
 fs/kernfs/inode.c             | 2 +-
 fs/kernfs/kernfs-internal.h   | 2 +-
 fs/nfs/nfs.h                  | 2 +-
 fs/nfs/nfs4_fs.h              | 2 +-
 fs/nfs/nfs4proc.c             | 2 +-
 fs/ntfs3/ntfs_fs.h            | 2 +-
 fs/ntfs3/xattr.c              | 2 +-
 fs/ocfs2/xattr.c              | 4 ++--
 fs/ocfs2/xattr.h              | 2 +-
 fs/orangefs/orangefs-kernel.h | 2 +-
 fs/orangefs/xattr.c           | 2 +-
 fs/overlayfs/super.c          | 4 ++--
 fs/reiserfs/reiserfs.h        | 2 +-
 fs/reiserfs/xattr.c           | 2 +-
 fs/smb/client/cifsfs.h        | 2 +-
 fs/smb/client/xattr.c         | 2 +-
 fs/squashfs/squashfs.h        | 2 +-
 fs/squashfs/xattr.c           | 2 +-
 fs/ubifs/ubifs.h              | 2 +-
 fs/ubifs/xattr.c              | 2 +-
 fs/xattr.c                    | 6 +++---
 fs/xfs/xfs_xattr.c            | 2 +-
 fs/xfs/xfs_xattr.h            | 2 +-
 include/linux/fs.h            | 2 +-
 include/linux/pseudo_fs.h     | 2 +-
 mm/shmem.c                    | 2 +-
 net/socket.c                  | 2 +-
 57 files changed, 69 insertions(+), 69 deletions(-)

base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c

Signature · 1 line
2.34.1