BootloadersIncompatibleWithLinux » History » Revision 5
Revision 4 (Denis 'GNUtoo' Carikli, 03/18/2020 03:43 PM) → Revision 5/17 (Denis 'GNUtoo' Carikli, 03/18/2020 03:44 PM)
h1. MidasBootloaderIncompatibleWithLinux h2. Introduction The bootloader of the following devices is incompatible with upstream Linux: * Galaxy SIII (GT-I9300) * Galaxy SIII 4G (GT-I9305) * Galaxy Note II (GT-N7100) * Galaxy Note II 4G (GT-N7105) When jumping to Linux, the booloader still has: * the instruction cache on * the data cache on * the MMU on "Documentation/arm/booting.rst":https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/arm/booting.rst which is there "since 2003":https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?h=v2.6.0&id=c90594cab75e043c6651f4c3d7218bd67dc4005f states that: * "The MMU must be off." * "Data cache must be off." And upstream Linux "won't accept patches":https://www.openwall.com/lists/kernel-hardening/2019/06/14/9 to disable the MMU, or the data cache in Linux as they have very good reasons to do that, and they are supposed to be already disabled. h2. Supporting s-boot To workaround that: * "to disable the caches":https://git.replicant.us/contrib/replicant-9/kernel_replicant_linux/commit/?id=85006537f34367710e7c9ae4aa0791ca5101ef46 * "to disable CONFIG_GCC_PLUGINS":https://www.openwall.com/lists/kernel-hardening/2019/06/14/4 or "CONFIG_STACKPROTECTOR_PER_TASK":https://www.openwall.com/lists/kernel-hardening/2019/06/14/6 However as the kernel evolved we need to patch it more and more: * The patch disabling the caches "was not necessary on Linux 3.4":lkml.iu.edu/hypermail/linux/kernel/1212.1/02099.html * Disabling CONFIG_GCC_PLUGINS was also not necessary on older kernel where the option was not even present