All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sami Tolvanen <samitolvanen@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: kernel test robot <oliver.sang@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, kernel test robot <lkp@intel.com>
Subject: Re: [x86, build] 6dafca9780: WARNING:at_arch/x86/kernel/ftrace.c:#ftrace_verify_code
Date: Mon, 1 Mar 2021 19:23:03 -0800	[thread overview]
Message-ID: <CABCJKufOTubpoJyWQ5aMzgeiNsTRuO61T5FMEG=jFwnO0XZ-pQ@mail.gmail.com> (raw)
In-Reply-To: <20210301214702.1119c732@oasis.local.home>

On Mon, Mar 1, 2021 at 6:47 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon, 1 Mar 2021 18:40:32 -0800
> Sami Tolvanen <samitolvanen@google.com> wrote:
>
> > On Mon, Mar 01, 2021 at 08:15:26PM -0500, Steven Rostedt wrote:
> > > On Mon, 1 Mar 2021 16:03:51 -0800
> > > Sami Tolvanen <samitolvanen@google.com> wrote:
> > > >
> > > > >                 ret = ftrace_verify_code(rec->ip, old);
> > > > > +
> > > > > +               if (__is_defined(CC_USING_NOP_MCOUNT) && ret && old_nop) {
> > > > > +                       /* Compiler could have put in P6_NOP5 */
> > > > > +                       old = P6_NOP5;
> > > > > +                       ret = ftrace_verify_code(rec->ip, old);
> > > > > +               }
> > > > > +
> > > >
> > > > Wouldn't that still hit WARN(1) in the initial ftrace_verify_code()
> > > > call if ideal_nops doesn't match?
> > >
> > > That was too quickly written ;-)
> > >
> > > Take 2:
> > >
> > > [ with fixes for setting p6_nop ]
> >
> > Thanks, I tested this with the config from the build bot, and I can
> > confirm that it fixes the issue for me.
> >
> > I also tested a quick patch to disable the __fentry__ conversion in
> > objtool, and it seems to work too, but it's probably a good idea to
> > fix the issue with CC_USING_NOP_MCOUNT in any case.
>
> Thanks for testing, I'll make this into a proper patch and start
> testing it internally. I'm assuming you want this to go into the -rc
> release and possibly stable?

Sounds good, thank you. Yes, getting the fix to -rc would be great.
I'm not sure if it's necessary in -stable though, the objtool patch is
only in -rc1.

Sami

WARNING: multiple messages have this Message-ID (diff)
From: Sami Tolvanen <samitolvanen@google.com>
To: lkp@lists.01.org
Subject: Re: [x86, build] 6dafca9780: WARNING:at_arch/x86/kernel/ftrace.c:#ftrace_verify_code
Date: Mon, 01 Mar 2021 19:23:03 -0800	[thread overview]
Message-ID: <CABCJKufOTubpoJyWQ5aMzgeiNsTRuO61T5FMEG=jFwnO0XZ-pQ@mail.gmail.com> (raw)
In-Reply-To: <20210301214702.1119c732@oasis.local.home>

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

On Mon, Mar 1, 2021 at 6:47 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon, 1 Mar 2021 18:40:32 -0800
> Sami Tolvanen <samitolvanen@google.com> wrote:
>
> > On Mon, Mar 01, 2021 at 08:15:26PM -0500, Steven Rostedt wrote:
> > > On Mon, 1 Mar 2021 16:03:51 -0800
> > > Sami Tolvanen <samitolvanen@google.com> wrote:
> > > >
> > > > >                 ret = ftrace_verify_code(rec->ip, old);
> > > > > +
> > > > > +               if (__is_defined(CC_USING_NOP_MCOUNT) && ret && old_nop) {
> > > > > +                       /* Compiler could have put in P6_NOP5 */
> > > > > +                       old = P6_NOP5;
> > > > > +                       ret = ftrace_verify_code(rec->ip, old);
> > > > > +               }
> > > > > +
> > > >
> > > > Wouldn't that still hit WARN(1) in the initial ftrace_verify_code()
> > > > call if ideal_nops doesn't match?
> > >
> > > That was too quickly written ;-)
> > >
> > > Take 2:
> > >
> > > [ with fixes for setting p6_nop ]
> >
> > Thanks, I tested this with the config from the build bot, and I can
> > confirm that it fixes the issue for me.
> >
> > I also tested a quick patch to disable the __fentry__ conversion in
> > objtool, and it seems to work too, but it's probably a good idea to
> > fix the issue with CC_USING_NOP_MCOUNT in any case.
>
> Thanks for testing, I'll make this into a proper patch and start
> testing it internally. I'm assuming you want this to go into the -rc
> release and possibly stable?

Sounds good, thank you. Yes, getting the fix to -rc would be great.
I'm not sure if it's necessary in -stable though, the objtool patch is
only in -rc1.

Sami

  reply	other threads:[~2021-03-02  8:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  7:40 [x86, build] 6dafca9780: WARNING:at_arch/x86/kernel/ftrace.c:#ftrace_verify_code kernel test robot
2021-03-01  7:40 ` kernel test robot
2021-03-01 22:14 ` Sami Tolvanen
2021-03-01 22:14   ` Sami Tolvanen
2021-03-01 23:45   ` Steven Rostedt
2021-03-01 23:45     ` Steven Rostedt
2021-03-02  0:03     ` Sami Tolvanen
2021-03-02  0:03       ` Sami Tolvanen
2021-03-02  1:15       ` Steven Rostedt
2021-03-02  1:15         ` Steven Rostedt
2021-03-02  2:40         ` Sami Tolvanen
2021-03-02  2:40           ` Sami Tolvanen
2021-03-02  2:47           ` Steven Rostedt
2021-03-02  2:47             ` Steven Rostedt
2021-03-02  3:23             ` Sami Tolvanen [this message]
2021-03-02  3:23               ` Sami Tolvanen
2021-03-02  9:19         ` Peter Zijlstra
2021-03-02  9:19           ` Peter Zijlstra
2021-03-02 15:58           ` Steven Rostedt
2021-03-02 15:58             ` Steven Rostedt

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='CABCJKufOTubpoJyWQ5aMzgeiNsTRuO61T5FMEG=jFwnO0XZ-pQ@mail.gmail.com' \
    --to=samitolvanen@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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.