[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180706162928.73jfqtdwdcwtagui@kshutemo-mobl1>
Date: Fri, 6 Jul 2018 19:29:28 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Gabriel C <nix.or.die@...il.com>,
Benjamin Gilbert <bgilbert@...hat.com>,
linux-x86_64@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
bero@...dev.ch, Andi Kleen <ak@...ux.intel.com>,
Michal Marek <michal.lkml@...kovi.net>
Subject: Re: 4.17.x won't boot due to "x86/boot/compressed/64: Handle 5-level
paging boot if kernel is above 4G"
On Fri, Jul 06, 2018 at 11:13:02PM +0900, Masahiro Yamada wrote:
> >> LDFLAGS is for internal-use.
> >> Please do not override it from the command line.
> >
> > Can we generate a build error if a user try to override LDFLAGS, CFLAGS or
> > other critical internal-use-only variables?
>
> Yes, Make can check where variables came from.
I think we should do this.
> >> make LDFLAGS_KERNEL=... LDFLAGS_MODULE=...
> >> will allow you to append linker flags.
> >
> > Okay. It makes me wounder if we should taint kernel in such cases?
> > Custom compiler/linker flags are risky and can lead to weird bugs.
>
> OK.
> So, what problem are we discussing?
Users set custom LDFLAGS/CFLAGS and break kernel. Then report bug that
hard to debug. See
https://bugzilla.kernel.org/show_bug.cgi?id=200385
and start of this thread:
https://lore.kernel.org/lkml/20180701213243.GA20180@trogon.sfo.coreos.systems/
It took me a while to track down the issue. I blamed linker for a while.
> > I've got it wrong. *Any* LDFLAGS option passed to make this way:
> >
> > make LDFLAGS="..."
>
> In your previous mail, I thought you were asking me how to pass
> custom linker flags.
>
> If not, we do not need to think about that case.
> Just say "Do not do that".
At least we need to make user aware about risk of setting custom flags.
--
Kirill A. Shutemov
Powered by blists - more mailing lists