War story time. File based encryption[1] (which used ext4 encryption) was supposed to have been released with Android M. It slipped by a full year because of this issue which Linus identified. At the time, we didn't have xfstests ported over so it could run in an Android/Bionic environment. So the only way I could test it was by taking the SOC kernel to which we had backported ext4 encryption, bashing it hard enough so it would compile on x86 again, all the while cursing the SOC vendor who had added "value added features" to their SOC kernel in a completely broken way such that the kernel would no longer build on x86, let alone boot on it, and then test the ext4 encryption feature backported to the Android kernel on x86 using kvm-xfstests (this was before gce-xfstests[2]). Unfortunately there was an ARM specific bug that we couldn't catch while testing on x86, and it showed up only when we were dogfooding the feature on two testers' phones. We couldn't reliable repro it on our development phones before the ZBB deadline. So we ultimately ended up having the pull the feature and wait a full calendar year for Android N because we could launch it.
As a result, a colleague developed android-xfstests[3] so we could actually do the necessary testing on an ARM platform. If we had this at the time when we were first trying to launch File Based Encryption for Android, it would have avoided a huge amount of hair pulling.
As a result, a colleague developed android-xfstests[3] so we could actually do the necessary testing on an ARM platform. If we had this at the time when we were first trying to launch File Based Encryption for Android, it would have avoided a huge amount of hair pulling.
[1] https://source.android.com/security/encryption/file-based [2] https://thunk.org/gce-xfstests [3] https://thunk.org/android-xfstests