android_system_core/fs_mgr
Eric Biggers e9811f36e5 fs_mgr: set ext4 encryption flag with tune2fs when needed
Upstream kernels (v4.9+, v4.4.67+) have started to enforce that
encryption policies cannot be set on ext4 directories unless
EXT4_FEATURE_INCOMPAT_ENCRYPT is set in the filesystem superblock, as
was the original design.  Since Android's userspace was not setting this
flag, it was not possible to use "file-based encryption" (FBE) on
devices whose kernels enforce this constraint.  Fix this by updating
fs_mgr to set the flag if needed, similar to how it enables the quota
feature if needed.

Note that it would, eventually, be simpler to set this flag at mkfs
time.  But that seems infeasible for now, given the many different ways
the userdata filesystem can be formatted --- including via 'fastboot',
which I believe is expected to still be compatible with old devices
whose kernel and/or e2fsprogs don't support the 'encrypt' flag.

Bug: 36231741
Change-Id: Ibafb9a7116fc853b62f8ee074a78499399f290a6
2017-07-06 13:31:30 -07:00
..
include fs_mgr: add libfstab for vendor 2017-06-28 11:24:25 +09:00
include_fstab/fstab fs_mgr: refactor pre-mount logic into prepare_fs_for_mount() 2017-07-06 13:31:30 -07:00
.clang-format Fix-up coding style 2017-02-18 12:33:36 +08:00
Android.bp fs_mgr: add libfstab for vendor 2017-06-28 11:24:25 +09:00
Android.mk fs_mgr: convert libfs_mgr to Android.bp 2017-05-12 17:06:55 -07:00
fs_mgr.cpp fs_mgr: set ext4 encryption flag with tune2fs when needed 2017-07-06 13:31:30 -07:00
fs_mgr_avb.cpp AVB: allow no metadata in the generic system.img for project Treble 2017-06-24 09:20:15 +08:00
fs_mgr_avb_ops.cpp AVB: allow no metadata in the generic system.img for project Treble 2017-06-24 09:20:15 +08:00
fs_mgr_boot_config.cpp fs_mgr: remove the repetitive and annoying bootconfig error print 2017-04-20 14:41:23 -07:00
fs_mgr_dm_ioctl.cpp Fix-up coding style 2017-02-18 12:33:36 +08:00
fs_mgr_format.cpp fs_mgr: Switch to LOG()/PLOG() defined in <android-base/logging.h> 2017-01-26 21:47:55 +08:00
fs_mgr_fstab.cpp fs_mgr: refactor pre-mount logic into prepare_fs_for_mount() 2017-07-06 13:31:30 -07:00
fs_mgr_main.cpp fs_mgr: Switch to LOG()/PLOG() defined in <android-base/logging.h> 2017-01-26 21:47:55 +08:00
fs_mgr_priv.h fs_mgr: support AVB in fs_mgr_update_verity_state() 2017-04-14 12:10:49 +08:00
fs_mgr_priv_avb_ops.h fs_mgr: Update for new libavb API. 2017-05-10 15:45:12 -04:00
fs_mgr_priv_boot_config.h early_mount: fs_mgr: move all fstab logic into fs_mgr 2017-02-23 16:48:43 -08:00
fs_mgr_priv_dm_ioctl.h Fix-up coding style 2017-02-18 12:33:36 +08:00
fs_mgr_priv_sha.h fs_mgr_avb: refactors how vbmeta is loaded 2017-04-13 18:28:53 +08:00
fs_mgr_slotselect.cpp fs_mgr: adding fs_mgr_get_slot_suffix() public API 2017-04-13 18:28:48 +08:00
fs_mgr_verity.cpp fs_mgr: check console-ramoops-0 2017-06-27 09:10:16 -07:00