android_kernel_motorola_sm6375/fs/ext4
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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
acl.h
balloc.c
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.h ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI 2020-10-30 10:02:25 +01: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
extents.c ext4: fix partial cluster initialization when splitting extent 2020-06-24 17:50:47 +02:00
extents_status.c
extents_status.h
file.c
fsmap.c
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
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
Makefile
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
mmp.c
move_extent.c
namei.c This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
page-io.c
readpage.c
resize.c
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
verity.c
xattr.c ext4: fix error pointer dereference 2020-06-22 09:31:15 +02:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c