Created attachment 276207 [details] Initramfs unpacking failed: uncompression error Since 4.17-rc1 my Asus X205TA (baytrail platform) often hangs on boot, when this happens I need to hard reset the laptop. I've looked for similar bugtrackers and there are some: Black screen every 1/3 times on boot https://bugzilla.kernel.org/show_bug.cgi?id=199613 screen stays dark for long on bootup since kernel 4.17.0-rc2+ https://bugzilla.kernel.org/show_bug.cgi?id=199619 black screen irrespective of amdgpu.dc=1 or 0 at boot on kernels 4.17-rc2 and onwards caused by low entropy https://bugzilla.kernel.org/show_bug.cgi?id=199567 The first one being the most similar in describing the symptoms. But neither one of the recommended solutions (generating entropy on boot, enabling kasan memory debugger) helped for me. I noticed while on ubuntu with the mainline kernel 4.17-rc1 that sometimes instead of a black screen I got an actual screendump of what went wrong (I've attached pictures). The errors are always slightly different but all point to initramfs decompression issues. So I started looking at the diff between 4.16 and 4.17-rc1 and reverted the commits to head_64.S (and for the compilation to succeed also the commits to pgtable_64.c). This 'solves' or rather circumvents the boot hangs for me. This workaround still works on 4.17-rc6.
Created attachment 276209 [details] Initramfs unpacking failed: junk in compressed archive
Created attachment 276211 [details] Initramfs unpacking failed: broken padding
This does not seem to be related to KASAN/sanitizers.
Sorry, I couldn't find a suitable category. I must have missed 'other'. Thanks for amending.
Hm. Could you try to bisect which commit is first broken one?
Either the commit for head_64.S in 4.17-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/arch/x86/boot/compressed/head_64.S?id=v4.17-rc1&id2=v4.16 or the commit for pgtable_64.c in 4.17-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/arch/x86/boot/compressed/pgtable_64.c?id=v4.17-rc1&id2=v4.16 I can't successfully compile the kernel with only the first commit reverted.
That's not commits. That's just diffs between v4.16 and v4.17-rc1 for these files. It doesn't help much with isolating the problem. Could you find the first broken *commit*. This would give the list of commits to look at: git log --no-merges --oneline v4.16..v4.17-rc1 arch/x86/boot/compressed And have you checked that plain 4.17-rc6 or -rc7 are still broken? There was couple of fixes in v4.17-rc6 in this area.
Thanks for the pointers, sorry I'm not too savvy with git but I'm trying to learn. When head is at: d6289f36aa7d (HEAD) x86/build: Don't pass in -D__KERNEL__ multiple times loading the initramfs never freezes. When head is at: 07344b15a994 (HEAD) x86/boot: Fix SEV boot failure from change to __PHYSICAL_MASK_SHIFT loading the initramfs freezes regularly. I checked 07344b15a994 with git show, but there doesn't seem to be anything regarding head_64.S or pgtable_64.c in there. However the following commit (194a9749c73d) pertains arch/x86/boot/compressed/head_64.S Is this the commit that causes the random freezes during initramfs load ?
Forgot to add: I've tried 4.17-rc6 en 4.17-rc7 and 4.17.0-rc7-next-20180529 and they all exhibit the same freezing behaviour.
Could you also check if 547edaca247a works fine for you?
No the initramfs also fails to load sometimes when booting a kernel compiled with head at: 547edaca247a (HEAD) x86/mm: Update comment in detect_tme() regarding x86_phys_bits
Issue still occurs with 4.18-rc1