[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling Linux with "bdver2" gcc optimization option



Franco Martelli, on 2019-08-20:
> mm/memory.o: warning: objtool: remap_pfn_range()+0xd5: unsupported intra-function call
>
> that it's part of linux-kbuild-4.19 package maybe I should submit a bug
> report to this package or is another one a better choice?

Hi Franco,

Should you submit a bug report, it might be a good target.  The
end result would be something like a bug against the kernel,
although it has more to do with the toolbox around its building
procedure.  Please make sure to include the context of your
build, the optimization with -march=bdver2, if you proceed.

But before doing that, may I suggest to have a look at the
"Compile-time stack metadata validation", available in
tools/objtool/Documentation/stack-validation.txt?  It is very
interesting, I only stumbled upon it recently, it describes the
purpose of objtool.  You can read it from Linux source code, or
online here:

	https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/objtool/Documentation/stack-validation.txt

Furthermore, it answers accurately to your original question
from the 13th of August:
> compiling the kernel up to Debian 9.x stretch all worked fine but with
> Debian 10 buster I get a lot of warning messages:
>
> <snip>
> mm/memory.o: warning: objtool: remap_pfn_range()+0xd5: unsupported intra-function call
[...]
> arch/x86/kernel/tsc.o: warning: objtool: tsc_refine_calibration_work()+0xd8: stack state mismatch: cfa1=7+48 cfa2=7+40
> </snip>
>
> what does it means?

Short answer, it means that the -march=bdver2 optimization flag
is interfering with the static stack frame analyser at kernel
build time, probably by adjunction of unrecognised CPU
instructions, at least unrecognised by objtool, inside the
object code.

Kind regards,
-- 
Étienne Mollier <etienne.mollier@mailoo.org>
              5ab1 4edf 63bb ccff 8b54  2fa9 59da 56fe fff3 882d
                Note to myself: RTWM, Reread The Warning Message


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: