Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel not booting with -march=core2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mortonP
n00b
n00b


Joined: 22 Dec 2015
Posts: 14

PostPosted: Sat Feb 10, 2018 8:25 am    Post subject: kernel not booting with -march=core2 Reply with quote

Hi all...

I have troubles getting one system with newer kernels to boot.
With the recent profile switch I rebuild multiple systems from scratch, with identical configurations.
All system work, except this one:
This one is compiled with CFLAGS"-O2 -pipe -march=core2" for max compatibility with some older systems.
All others are Haswell CPUs or newer hardware and compiled with "-march=native"
And whenever I try a rather newish kernel this image for old systems crashes at boot with:
https://i.imgur.com/DBv5mk7.png
Virtualbox shows the same error as on real hardware (and is easier to retry and reboot), so it points to a software/miscompile problem.

Observations:
I got kernel 4.14.8 to work, this one version builds and boots without problems.
Others kernel versions don't, I havn't yet found another working one.
The previous working one before the full profile rebuild/upgrade was a 4.9.x.
I have only tested a couple version in between.
Taking the identical 4.14.8 kernel config for 4.14.18 (make oldconfig and just the 2 new options of meltdown/spectre), building it, booting it, newest 4.14.18 fails - see screenshot.

I don't run hardened profile, just basic 17.0.
But the CFLAGS don't matter for the kernel anyway?
This is a LUKS encrypted root partition, but I never had any problem with that in multiple years time.
It boots with genkernel-next, but this bug is still kernel early boot?
If it is not kernel early boot, maybe the crypto tools in initrd are miscompiled and fail randomly in a data race?

Any ideas, pointers, experiences appreciated.
The simplest would be to accept Haswell as the new baseline and finally discard the older systems to run this image,
or stay with 4.14.8 forever, but I don't want to do that yet.

Thanks,
Morton
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5838

PostPosted: Sat Feb 10, 2018 8:50 am    Post subject: Reply with quote

your processor type gets set in "make menuconfig" under the processor section... just build with make, no cflags required.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sat Feb 10, 2018 5:51 pm    Post subject: Reply with quote

it crash after panic, showing you sda and sda1 are found, considering sda is name of first disk i doubt we miss upper message showing other disk.
the conclusion is simple: you don't boot with root=/dev/sda1 but something else, and that something else is not present and doesn't work, which gave the panic.
next to the panic you have a crash, well, i suppose virtualbox is not helping kernel recovering from the panic or whatever.
so crash because of panic because of bad root= value (or missing proper support to handle it).
you should fix the panic and it will probably "not" fix the crash, but avoid it.
Back to top
View user's profile Send private message
mortonP
n00b
n00b


Joined: 22 Dec 2015
Posts: 14

PostPosted: Sat Feb 10, 2018 8:16 pm    Post subject: Reply with quote

My observation is this:
4.14.8 works
4.14.18 (and others tried) do not

kernel config is identical
grub.cfg menuentry is identical copy, only kernel and initrd filename differs (naturally)
initrd for both are built with same genkernel-next configuration and contain the exact same count of files
one kernel finds passed root partition on boot, the other does not and panics

only difference is this system was bootstrapped on a full -core2 compiled system, only this one produces these faulty kernels, all other software works
system/kernel image tested booting on real hardware and in Virtualbox, fails on both
Same configs on Haswell and newer hardware with march=native bootstrapped have no problems

WTF?
Back to top
View user's profile Send private message
mortonP
n00b
n00b


Joined: 22 Dec 2015
Posts: 14

PostPosted: Tue Feb 13, 2018 7:24 pm    Post subject: Reply with quote

Tried building kernel with GCC 7.3 instead of 6.4 -> does not work.
Tried 4.15.2 instead of 4.14.x -> does not work.

I still see two options:
The linker is broken and links the kernel image somehow broken.
The kernel does have a real bug with a race hazard and with every kernel revision it is a game of luck - the image very rarely runs ok.
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5625
Location: Removed by Neddy

PostPosted: Wed Feb 14, 2018 12:17 am    Post subject: Reply with quote

Did you rebuild your toolchain after bumping gcc/glibc

Ha even you selected the most recent Binutils.



Kernel releases are not hit and miss, the local building is if the toolchain is compromised
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum