The patch titled FLAT binaries: drop BINFMT_FLAT bad header magic warning has been added to the -mm tree. Its filename is flat-binaries-drop-binfmt_flat-bad-header-magic-warning.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: FLAT binaries: drop BINFMT_FLAT bad header magic warning From: Mike Frysinger <vapier.adi@xxxxxxxxx> The warning issued by fs/binfmt_flat.c when the format handler is given a non-FLAT and non-script executable is annoying to say the least when working with FDPIC ELF objects. If you build a kernel that supports both FLAT and FDPIC ELFs on no-mmu, every time you execute an FDPIC ELF, the kernel spits out this message. While I understand a lot of newcomers to the no-mmu world screw up generation of FLAT binaries, this warning is not usable for systems that support more than just FLAT. Signed-off-by: Jie Zhang <jie.zhang@xxxxxxxxxx> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> Cc: Bernd Schmidt <bernds_cb1@xxxxxxxxxxx> Acked-by: Greg Ungerer <gerg@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/binfmt_flat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -puN fs/binfmt_flat.c~flat-binaries-drop-binfmt_flat-bad-header-magic-warning fs/binfmt_flat.c --- a/fs/binfmt_flat.c~flat-binaries-drop-binfmt_flat-bad-header-magic-warning +++ a/fs/binfmt_flat.c @@ -443,12 +443,12 @@ static int load_flat_file(struct linux_b if (strncmp(hdr->magic, "bFLT", 4)) { /* + * Previously, here was a printk to tell people + * "BINFMT_FLAT: bad header magic". + * But for the kernel which also use ELF FD-PIC format, this + * error message is confusing. * because a lot of people do not manage to produce good - * flat binaries, we leave this printk to help them realise - * the problem. We only print the error if its not a script file */ - if (strncmp(hdr->magic, "#!", 2)) - printk("BINFMT_FLAT: bad header magic\n"); ret = -ENOEXEC; goto err; } _ Patches currently in -mm which might be from vapier.adi@xxxxxxxxx are flat-binaries-drop-binfmt_flat-bad-header-magic-warning.patch git-watchdog.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html