All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: x86@kernel.org, Andy Lutomirski <luto@amacapital.net>,
	Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Lutomirski <luto@kernel.org>,
	Borislav Petkov <bp@alien8.de>, Brian Gerst <brgerst@gmail.com>,
	Denys Vlasenko <dvlasenk@redhat.com>, Peter Anvin <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] x86: mostly disable '-maccumulate-outgoing-args'
Date: Thu, 16 Mar 2017 13:36:35 -0500	[thread overview]
Message-ID: <20170316183635.wlwavbwsgkyjyjcw@treble> (raw)
In-Reply-To: <20170316133201.16b9a73a@gandalf.local.home>

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

  reply	other threads:[~2017-03-16 18:36 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 22:14 v4.10: kernel stack frame pointer .. has bad value (null) Pavel Machek
2017-02-21 23:12 ` Josh Poimboeuf
2017-02-21 23:15   ` H. Peter Anvin
2017-02-22 16:45     ` Josh Poimboeuf
2017-02-22 20:51       ` H. Peter Anvin
2017-02-22 21:15         ` Josh Poimboeuf
2017-02-22 21:05   ` Pavel Machek
2017-02-22 21:21     ` Josh Poimboeuf
2017-02-22 22:47       ` Pavel Machek
2017-02-22 22:56         ` Josh Poimboeuf
2017-02-22 23:18           ` Josh Poimboeuf
2017-02-23 20:10             ` Pavel Machek
2017-02-25  5:04               ` Josh Poimboeuf
2017-03-02 23:45                 ` Josh Poimboeuf
2017-03-06 16:38                   ` Pavel Machek
2017-03-07 17:38                     ` Josh Poimboeuf
2017-03-07 17:52                       ` Linus Torvalds
2017-03-07 17:59                         ` Andy Lutomirski
2017-03-07 18:28                           ` Josh Poimboeuf
2017-03-07 18:30                             ` Josh Poimboeuf
2017-03-07 18:40                             ` Linus Torvalds
2017-03-08 17:37                               ` Josh Poimboeuf
2017-03-08 18:25                                 ` Linus Torvalds
2017-03-08 18:54                                   ` Andy Lutomirski
2017-03-08 21:22                                   ` Pavel Machek
2017-03-09  9:38                                     ` Geert Uytterhoeven
2017-03-09 10:56                                       ` Pavel Machek
2017-03-09 12:16                                         ` Geert Uytterhoeven
2017-03-10 13:17                                           ` Compiling kernels faster (was Re: v4.10: kernel stack frame pointer .. has bad value (null)) Pavel Machek
2017-03-10 13:28                                             ` Geert Uytterhoeven
2017-03-10 14:15                                             ` Willy Tarreau
2017-03-09 10:49                                     ` Old compiler versions " Pavel Machek
2017-03-09 18:05                                       ` Linus Torvalds
2017-03-09 15:29                                     ` v4.10: kernel stack frame pointer .. has bad value (null) Peter Zijlstra
2017-03-09 21:12                                       ` Pavel Machek
2017-03-08 21:29                                   ` Josh Poimboeuf
2017-03-09 14:14                                     ` Steven Rostedt
2017-03-09 18:31                                       ` Josh Poimboeuf
2017-03-16 15:42                                     ` [PATCH] x86: mostly disable '-maccumulate-outgoing-args' Josh Poimboeuf
2017-03-16 17:32                                       ` Steven Rostedt
2017-03-16 18:36                                         ` Josh Poimboeuf [this message]
2017-03-16 18:53                                           ` Josh Poimboeuf
2017-03-16 19:04                                             ` Josh Poimboeuf
2017-03-16 19:07                                               ` Steven Rostedt
2017-03-16 19:06                                           ` Steven Rostedt
2017-03-16 19:31                                       ` [PATCH v2] " Josh Poimboeuf
2017-03-22  7:51                                         ` Ingo Molnar
2017-03-22 15:48                                           ` Josh Poimboeuf
2017-03-28  8:13                                         ` [tip:x86/urgent] x86/build: Mostly " tip-bot for Josh Poimboeuf
2017-03-28 16:17                                           ` Josh Poimboeuf
2017-03-30  9:58                                         ` tip-bot for Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170316183635.wlwavbwsgkyjyjcw@treble \
    --to=jpoimboe@redhat.com \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.