Re: Linux 2.6.27.27

From: Krzysztof Oledzki
Date: Tue Jul 21 2009 - 06:17:30 EST




On Tue, 21 Jul 2009, Krzysztof Oledzki wrote:



On Mon, 20 Jul 2009, Linus Torvalds wrote:



On Mon, 20 Jul 2009, Krzysztof Oledzki wrote:

No problem. Please let me know what should I do to help tracking this issue.

Can you build two kernels: one with -fwrapv, and one with
-fno-strict-overflow, and then verify that

- they are otherwise identical (ie exact same source code, same compiler
etc)

- verify that yes, the -fwrapv kernel works, the other does not. Just to
avoid the confusion that obviously exists with Debian/sid binutils
upgrades that _also_ happens result in nonbootable kernels.

- upload the 'vmlinux' images somewhere (I'm not sure what the limits for
binary attachments are at the kernel bugzilla, but that would be the
logical place)

In fact, it would be nice to have a third "identical" kernel build, except
with neither -fwrapv/-fno-strict-overflow.

OK. Right now I'm building the three kernels you asked for (fwrapv/fno-strict-overflow/none). I'll test them and upload vmlinux images.

OK, there are three kernels, exactly as you requested:

http://noc.axelspringer.pl/no-strict-overflow-vs-wrapv/vmlinux-fno-strict-overflow.bz2 (Hangs)
http://noc.axelspringer.pl/no-strict-overflow-vs-wrapv/vmlinux-fwrapv.bz2 (OK)
http://noc.axelspringer.pl/no-strict-overflow-vs-wrapv/vmlinux-fnone.bz2 (OK)

# grep -A1 "can't wrap" linux-2.6.27.27-*/Makefile
linux-2.6.27.27-fno-strict-overflow/Makefile:# disable invalid "can't wrap" optimzations for signed / pointers
linux-2.6.27.27-fno-strict-overflow/Makefile-KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
--
linux-2.6.27.27-fwrapv/Makefile:# disable invalid "can't wrap" optimzations for signed / pointers
linux-2.6.27.27-fwrapv/Makefile-KBUILD_CFLAGS += $(call cc-option,-fwrapv)
--
linux-2.6.27.27-fnone/Makefile:# disable invalid "can't wrap" optimzations for signed / pointers
linux-2.6.27.27-fnone/Makefile-#KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)

Plwase note the third one has the KBUILD_CFLAGS commented.

Kernels are identical and are compiled from the same config, on the same server with gcc-4.2.4, binutils-2.19. There is no ccache installed and the kernels are not patched with any additonal patches - just vanilla linux-2.6.27.27.

Screenshot from the hanging kernel (-fno-strict-overflow):
http://noc.axelspringer.pl/no-strict-overflow-vs-wrapv/2.6.27.27-hang.png

Dmesg from a bootable kernel:
http://noc.axelspringer.pl/no-strict-overflow-vs-wrapv/dmesg

Best regards,

Krzysztof Olędzki