Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #213068

Re: Compiling Linux with "bdver2" gcc optimization option

From Étienne Mollier <etienne.mollier@mailoo.org>
Newsgroups linux.debian.user
Subject Re: Compiling Linux with "bdver2" gcc optimization option
Date 2019-08-21 11:00 +0200
Message-ID <yxuDf-6cJ-1@gated-at.bofh.it> (permalink)
References (4 earlier) <yvQeS-7Hl-27@gated-at.bofh.it> <ywV2N-mP-11@gated-at.bofh.it> <ywV2N-mP-9@gated-at.bofh.it> <yxhPH-6yD-5@gated-at.bofh.it> <yxhPH-6yD-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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


Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Compiling Linux with "bdver2" gcc optimization option Franco Martelli <martellif67@gmail.com> - 2019-08-13 17:20 +0200
  Re: Compiling Linux with "bdver2" gcc optimization option Franco Martelli <martellif67@gmail.com> - 2019-08-14 18:10 +0200
    Re: Compiling Linux with "bdver2" gcc optimization option Franco Martelli <martellif67@gmail.com> - 2019-08-16 21:40 +0200
      Re: Compiling Linux with "bdver2" gcc optimization option Franco Martelli <martellif67@gmail.com> - 2019-08-19 21:00 +0200
        Re: Compiling Linux with "bdver2" gcc optimization option Franco Martelli <martellif67@gmail.com> - 2019-08-20 21:20 +0200
          Re: Compiling Linux with "bdver2" gcc optimization option Étienne Mollier <etienne.mollier@mailoo.org> - 2019-08-21 11:00 +0200

csiph-web