android_kernel_motorola_sm6375/fs/f2fs
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-10-30 10:02:25 +01:00
..
acl.c f2fs: Replace spaces with tab 2019-05-08 21:23:11 -07:00
acl.h f2fs: Use the correct style for SPDX License Identifier 2020-05-18 13:21:15 -07:00
checkpoint.c f2fs: don't return vmalloc() memory from f2fs_kmalloc() 2020-06-08 20:40:23 -07:00
compress.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-15 13:22:44 -07:00
data.c FROMLIST: f2fs: fix use-after-free when accessing bio->bi_crypt_context 2020-06-22 20:30:51 +00:00
debug.c UPSTREAM: Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 (v5.7-rc1) 2020-04-15 03:11:03 +00:00
dir.c f2fs: avoid utf8_strncasecmp() with unstable name 2020-06-08 20:40:23 -07:00
extent_cache.c f2fs: introduce f2fs_<level> macros to wrap f2fs_printk() 2019-07-02 15:40:40 -07:00
f2fs.h ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI 2020-10-30 10:02:25 +01:00
file.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-15 13:22:44 -07:00
gc.c f2fs: add compressed/gc data read IO stat 2020-05-18 13:21:19 -07:00
gc.h f2fs: Use the correct style for SPDX License Identifier 2020-05-18 13:21:15 -07:00
hash.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-05-27 13:35:01 -07:00
inline.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-05-27 13:35:01 -07:00
inode.c UPSTREAM: Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 (v5.7-rc1) 2020-04-15 03:11:03 +00:00
Kconfig f2fs: compress: support lzo-rle compress algorithm 2020-05-18 13:21:16 -07:00
Makefile f2fs: support data compression 2020-01-28 10:35:38 -08:00
namei.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-15 13:22:44 -07:00
node.c f2fs: don't return vmalloc() memory from f2fs_kmalloc() 2020-06-08 20:40:23 -07:00
node.h f2fs: shrink spinlock coverage 2020-05-18 13:21:16 -07:00
recovery.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-05-27 13:35:01 -07:00
segment.c f2fs: fix wrong discard space 2020-05-30 08:50:12 -07:00
segment.h f2fs: Use the correct style for SPDX License Identifier 2020-05-18 13:21:15 -07:00
shrinker.c UPSTREAM: Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4 (v5.7-rc1) 2020-04-15 03:11:03 +00:00
super.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-22 13:32:36 -07:00
sysfs.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-22 13:32:36 -07:00
trace.c f2fs: do not use mutex lock in atomic context 2019-03-05 19:58:06 -08:00
trace.h f2fs: Use the correct style for SPDX License Identifier 2020-05-18 13:21:15 -07:00
verity.c fs-verity: implement readahead of Merkle tree pages 2020-02-13 15:02:43 -08:00
xattr.c ANDROID: remove unused variable 2020-05-27 13:20:29 -07:00
xattr.h f2fs: code cleanup by removing ifdef macro surrounding 2020-05-30 08:50:10 -07:00