Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1602768
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' |
| Date | 2017-03-16 19:40 +0100 |
| Message-ID | <tlItB-2iT-37@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <tiNSN-1nX-1@gated-at.bofh.it> <tiOYy-25e-9@gated-at.bofh.it> <tiRtn-3QL-11@gated-at.bofh.it> <tlFYJ-td-3@gated-at.bofh.it> <tlHxv-1ET-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Mar 16, 2017 at 01:32:01PM -0400, Steven Rostedt wrote: > On Thu, 16 Mar 2017 10:42:08 -0500 > Josh Poimboeuf <jpoimboe@redhat.com> wrote: > > > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> > > --- > > arch/x86/Makefile | 29 +++++++++++++++++++++++++---- > > arch/x86/Makefile_32.cpu | 18 ------------------ > > arch/x86/kernel/ftrace.c | 6 ++++++ > > scripts/Kbuild.include | 4 ++++ > > 4 files changed, 35 insertions(+), 22 deletions(-) > > > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile > > index 2d44933..fa45989b 100644 > > --- a/arch/x86/Makefile > > +++ b/arch/x86/Makefile > > @@ -120,10 +120,6 @@ else > > # -funit-at-a-time shrinks the kernel .text considerably > > # unfortunately it makes reading oopses harder. > > KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) > > - > > - # this works around some issues with generating unwind tables in older gccs > > - # newer gccs do it by default > > - KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args) > > endif > > > > ifdef CONFIG_X86_X32 > > @@ -147,6 +143,31 @@ ifeq ($(CONFIG_KMEMCHECK),y) > > KBUILD_CFLAGS += $(call cc-option,-fno-builtin-memcpy) > > endif > > > > +# If the function graph tracer is used with mcount instead of fentry, > > +# '-maccumulate-outgoing-args' is needed to prevent gcc bug > > "to prevent a gcc bug" It was "to prevent gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109" where "gcc bug" was an adjective and the URL was a noun. But yeah, that's kind of confusing, and the line wrap made it more so. Maybe I'll change it to "to prevent a gcc bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109)" and a similar change for the jump label bug comment. > > +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42109 > > +ifdef CONFIG_FUNCTION_GRAPH_TRACER > > + ifndef CONFIG_HAVE_FENTRY > > + ACCUMULATE_OUTGOING_ARGS := 1 > > + else > > + ifeq ($(call cc-option, -mfentry),) > > Hmm, the blank entry makes me nervous. I wonder if it would be better > if we had ifneq ($(call cc-option-yn, -mfentry),y) > > Unfortunately, there's one of each in the existing kernel, so there is > really no precedence. Either way seems fine. I'll go with your suggested change. > > + ACCUMULATE_OUTGOING_ARGS := 1 > > + endif > > + endif > > +endif > > + > > +# Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent > > Can we make a test instead? I hate testing versions, and things get > backported all the time. We usually like to have a test case instead of > relying on versions. Not to mention, a newer gcc may one day break. Tests are generally better, but I'm not sure how to test for this cleanly. The test is rather big for embedding in a makefile: https://gcc.gnu.org/bugzilla/attachment.cgi?id=22199 Any ideas? -- Josh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-16 17:00 +0100
Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Steven Rostedt <rostedt@goodmis.org> - 2017-03-16 18:40 +0100
Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-16 19:40 +0100
Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-16 20:00 +0100
Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Steven Rostedt <rostedt@goodmis.org> - 2017-03-16 20:10 +0100
Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-16 20:20 +0100
Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Steven Rostedt <rostedt@goodmis.org> - 2017-03-16 20:10 +0100
[PATCH v2] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-16 20:40 +0100
Re: [PATCH v2] x86: mostly disable '-maccumulate-outgoing-args' Ingo Molnar <mingo@kernel.org> - 2017-03-22 09:00 +0100
Re: [PATCH v2] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-22 17:00 +0100
csiph-web