android_kernel_asus_sm8350/fs/ext4
Eric Biggers aa445f97a0 ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI
'struct fscrypt_operations' is only used by fs/crypto/ (which is always
built-in) and by three filesystems (which are either built-in to GKI, in
the case of ext4 and f2fs, or aren't supported by Android, in the case
of ubifs).  The only way a loadable module could use fscrypt_operations
is if the module were a filesystem that used fs/crypto/, which isn't
possible since KMI symbol list doesn't include anything in fs/crypto/.

However, any change to struct fscrypt_operations changes the symbol CRC
of most of the KMI functions exported by any files fs/*.c that include
<linux/fscrypt.h>.  This is because the definition of fscrypt_operations
is visible to them, and in principle it's possible to get to
fscrypt_operations from most VFS structs (e.g. inode->i_sb->s_cop), even
though there's no reason to do so outside the crypto code.

Work around this by putting the definition of struct fscrypt_operations
behind #ifdef FSCRYPT_NEED_OPS, and only defining this in the files that
actually need the definition.  (It could be moved into a separate header
instead, but this way keeps the diff from upstream smaller.)

This will cause a one-time CRC change of all the affected KMI functions,
but afterwards any changes to fscrypt_operations won't "break the KMI".

Bug: 170265596
Test: re-generated the ABI, changed struct fscrypt_operations (and
      struct fscrypt_info as well, just in case), re-generated the ABI
      again, and verified it didn't change.
Change-Id: Ib5dd49550aec81a64b3d6077a0aeb5747be908ff
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-10-30 10:02:25 +01:00
..
acl.c ext4: compare old and new mode before setting update_mode flag 2018-12-10 00:22:38 -05:00
acl.h
balloc.c ext4: fix potential race between online resizing and write operations 2020-02-28 17:22:22 +01:00
bitmap.c
block_validity.c ext4: don't allow overlapping system zones 2020-08-26 10:40:58 +02:00
dir.c ANDROID: ext4: Handle casefolding with encryption 2020-06-24 22:38:51 +00:00
ext4_extents.h ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max 2020-06-22 09:31:15 +02:00
ext4_jbd2.c
ext4_jbd2.h ext4: use jbd2_inode dirty range scoping 2019-06-20 17:26:26 -04:00
ext4.h ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI 2020-10-30 10:02:25 +01:00
extents_status.c ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
extents_status.h ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
extents.c ext4: fix partial cluster initialization when splitting extent 2020-06-24 17:50:47 +02:00
file.c ext4: fix ext4_dax_read/write inode locking sequence for IOCB_NOWAIT 2020-02-24 08:36:24 +01:00
fsmap.c ext4: fix miscellaneous sparse warnings 2019-05-12 04:49:47 -04:00
fsmap.h
fsync.c ext4: fix race between ext4_sync_parent() and rename() 2020-06-22 09:31:16 +02:00
hash.c ANDROID: ext4: Handle casefolding with encryption 2020-06-24 22:38:51 +00:00
ialloc.c ANDROID: ext4: Handle casefolding with encryption 2020-06-24 22:38:51 +00:00
indirect.c ext4: clean up kerneldoc warnigns when building with W=1 2019-06-19 16:30:03 -04:00
inline.c ANDROID: ext4: Handle casefolding with encryption 2020-06-24 22:38:51 +00:00
inode.c This is the 5.4.57 stable release 2020-08-07 10:07:58 +02:00
ioctl.c ext4: wire up FS_IOC_GET_ENCRYPTION_NONCE 2020-04-08 15:18:24 -07:00
Kconfig fscrypt: Allow modular crypto algorithms 2020-02-13 15:02:40 -08:00
Makefile ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
mballoc.c ext4: convert BUG_ON's to WARN_ON's in mballoc.c 2020-05-02 08:48:59 +02:00
mballoc.h
migrate.c ext4: fix race between writepages and enabling EXT4_EXTENTS_FL 2020-02-28 17:22:23 +01:00
mmp.c ext4: don't assume that mmp_nodename/bdevname have NUL 2020-02-19 19:52:58 +01:00
move_extent.c ext4: use jbd2_inode dirty range scoping 2019-06-20 17:26:26 -04:00
namei.c This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
page-io.c This is the 5.4.19 stable release 2020-02-11 14:09:41 -08:00
readpage.c This is the 5.4.22 stable release 2020-02-24 09:16:10 +01:00
resize.c ext4: fix potential race between s_flex_groups online resizing and access 2020-02-28 17:22:22 +01:00
super.c This is the 5.4.49 stable release 2020-06-25 07:49:21 +02:00
symlink.c
sysfs.c fscrypt: support test_dummy_encryption=v2 2020-06-16 14:06:41 -07:00
truncate.h ext4: handle layout changes to pinned DAX mappings 2018-07-29 17:00:22 -04:00
verity.c fs-verity: implement readahead of Merkle tree pages 2020-02-13 15:02:43 -08:00
xattr_security.c FROMLIST: Add flags option to get xattr method paired to __vfs_getxattr 2019-11-05 13:50:57 -08:00
xattr_trusted.c FROMLIST: Add flags option to get xattr method paired to __vfs_getxattr 2019-11-05 13:50:57 -08:00
xattr_user.c FROMLIST: Add flags option to get xattr method paired to __vfs_getxattr 2019-11-05 13:50:57 -08:00
xattr.c ext4: fix error pointer dereference 2020-06-22 09:31:15 +02:00
xattr.h ext4: add extra checks to ext4_xattr_block_get() 2018-03-30 20:04:11 -04:00