Summary: | kernel sources compiled with gcc enabled PIE fail to enable framebuffer. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Xake <kanelxake> |
Component: | [OLD] Core system | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 2009_Kev_Gentoo, hardened, hkmaly, kfm, meyerm, tommy, zorry |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=c47efe5548abbf53c2f66e06dcb46183b11d6b22 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Make gcc not use hardened when checking for command options |
Description
Xake
2009-08-21 12:55:46 UTC
The "video mode number" issue is making me believe you have improper drivers selected or some improper kernel configuration, as I've used genkernel successfully since 2.6.24, and am currently running 2.6.30-r4. Did you read that I used the configuration from genkernel without changes? The way I did it was that I emptied /etc/kernels and ran 'genkernel all' which picks upp the kernel-config boundled with genkernel. 2.6.28 did not give the message, 2.6.29 did give the message. So in that case is the 'misconfiguration' in the default configuration for genkernel, thus a bug here. Funny part is that the weekly livecd boots without problems, but using that configuration for gentoo-sources-2.6.30* (which is what the cd uses) gives me the message. If you search the forums @ f.g.o you will find more people that seems to have this problem, one of them even suggested that it had to do with the introduction of Intel KMS which neither he or I uses. I have another gentoo-computer which does not have this problem, and I do not know why... The funny part is that I just took out grub2 for a spin, and doing no other change but to use grub2 the message disappered. So I think this seems to be that newer kernels fails to init the VGABIOS or something like that with genkernels default configuration (or any other configuration I tried) and thus got no modes unless the bootloader does something. SYSLINUX for the livecd seems to do the trick, grub2 seems to do the trick, grub-0.x does not do the trick for me. And if you were online over at #gentoo-hardened@irc.freenode.org you would see Anarchy complaining about what appeared to be the exact same problem. Hardened will be assignee until we can rule out a toolchain issue first. bringing in base-system, as I've been wondering something re grub1 and hardened kernels for a bit. If you explicitly recompile and reinstall (the MBR) grub1 with a your GCC profile changed to non-hardened, does the problem go away? Ok, efter som talking with Anarchy I realised the following (where /boot/kernel is a link to my current system kernel): With hardened gcc-specs: 'kvm -kernel /boot/kernel' gives the message. With "-vanilla" gcc-specs there is no message. Using kvm rules out that the bootloader got anything to do with this problem (even if it seems to be able to be used as a workaround). So this seems to be miscompilation with hardened. Next step: rule out SSP and/or PIE... *** Bug 257914 has been marked as a duplicate of this bug. *** This is defintely an issue when using PIE enabled gcc, disable PIE support in gcc will resolve the issue with framebuffers. This is a workaround until we find out what code is being generated that is causing such an issue. I'm experiencing the same problem and must confess to being somewhat puzzled; aren't the hardened specs disregarded in the -D__KERNEL__ case? For the record, I'm also using grub-static-0.97-r9. For reference the kernel commit that breaks this: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a1a00b58855ccdbedf556b4f5638d5208b454472 How this should be handled I leave to the one who wants to touch gcc-3.4.6-r2 and/or hardened gcc-4 and/or the kernel source. doesnt seem related to grub ... This issue seems to be due to video-vga.c being compiled incorrectly. video-vga.o is missing the section .videocards when compiled with hardened-specs while its there when compiled with hardenednopie Reverting the the commit shown in comment #9 and compiling shows the section in the objectfile even for hardenedspecs The funny part about it is that video-vga.c is compiled without hardened just like it should. The only thing in the kernel tree built with hardened (like it always have been) is the userspace tools (like kallsyms and other stuff compiled with HOSTCC) and since those are used to generate headers and asm-symbol-tables and so on I am unsure if they can somehow have an impact. Created attachment 202445 [details, diff]
Make gcc not use hardened when checking for command options
The arch/*/boot/Makefile use cc-options to check for GCC command options and
cc-options use the hardened specs when checking for GCC command options.
When -fPIE is pass to cc1 it can't use -ffreestanding or -fno-toplevel-reorder.
Then it fail to build stuff with -ffreestanding and -fno-toplevel-reorder.
Thanks Vinky
I've got the same messages, using kvm and a hardened profile. But I do not use genkernel. I'm using a self configured kernel. Also my system dies after some time (a few minutes - some hours). Kernel stack trace is the result. I don't know if it has something to do with this bug or is another one. (In reply to comment #14) > I've got the same messages, using kvm and a hardened profile. > But I do not use genkernel. I'm using a self configured kernel. > > Also my system dies after some time (a few minutes - some hours). Kernel stack > trace is the result. I don't know if it has something to do with this bug or is > another one. > Test the patch. ALl issues with framebuffer not working can be fixed with the simple inclusion of patch here on the bug report. I have to say congratulations to Zorry and anarchy for landing this patch! Now maybe it is time to reassign this bug to the gentoo kernel developers and maybe get this integrated into the genpatches-base since this hits all hardened gentoo-users currently, even them using gentoo-sources? Kernel team please add to genpatches-base for all supported .29,30,31 kernels please. InSVN for .30 and .31, the two currently supported gentoo-sources kernel. released in both 2.6.30 and 2.6.31 gentoo sources Will this get into hardened-sources as well? (In reply to comment #20) > Will this get into hardened-sources as well? > For hardened-sources this breaks currently only with 2.6.29, and that will probably never go stable and is currently not worked on. Instead the hardened team is working on 2.6.31, where this is fixed and it should enter the tree "when it is ready"(tm) which is hopefully soon. Great! Thank you very much. |