linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	Gabriel de Perthuis <g2p.code@gmail.com>,
	Haiyue Wang <haiyuewa@163.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-trace-kernel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ftrace: x86: Fix a compile error about get_kernel_nofault()
Date: Thu, 13 Feb 2025 11:26:34 +0100	[thread overview]
Message-ID: <20250213102634.GA30841@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250213100836.GC28068@noisy.programming.kicks-ass.net>

On Thu, Feb 13, 2025 at 11:08:36AM +0100, Peter Zijlstra wrote:
> On Wed, Feb 12, 2025 at 08:52:27AM -0800, Sami Tolvanen wrote:
> > On Tue, Feb 11, 2025 at 7:49 AM Steven Rostedt <rostedt@goodmis.org> wrote:
> > >
> > > On Tue, 11 Feb 2025 11:09:14 +0100
> > > Peter Zijlstra <peterz@infradead.org> wrote:
> > >
> > > > I was aiming my patch for x86/core, but if there's a reason to expedite
> > > > them, I can stick it in x86/urgent I suppose.
> > > >
> > > > Just need a reason -- what's this compile error nonsense about, my
> > > > kernels build just fine?
> > >
> > > Masami,
> > >
> > > Do you have a config that fails to build without this fix? If so, can you
> > > please reply with it, and then this can go in as a quick fix.
> > 
> > x86 builds with both CONFIG_GENDWARFKSYMS and CONFIG_FUNCTION_TRACER
> > are broken without this fix. Here's how to reproduce:
> > 
> > $ make defconfig
> > $ ./scripts/config -e DEBUG_INFO -e DEBUG_INFO_DWARF5 -e MODVERSIONS
> > -e GENDWARFKSYMS -e FUNCTION_TRACER
> > $ make olddefconfig && make -j
> > ...
> > In file included from ./arch/x86/include/asm/asm-prototypes.h:2,
> >                  from <stdin>:3:
> > ./arch/x86/include/asm/ftrace.h: In function ‘arch_ftrace_get_symaddr’:
> > ./arch/x86/include/asm/ftrace.h:46:21: error: implicit declaration of
> > function ‘get_kernel_nofault’ [-Wimplicit-function-declaration]
> >    46 |                 if (get_kernel_nofault(instr, (u32
> > *)(fentry_ip - ENDBR_INSN_SIZE)))
> > ...
> 
> It breaks much sooner, complaining about not having dwarf.h.. let me go
> figure out what package provides that :/

Bah, ofcourse there's libdwarf-dev and libdw-dev, both providing
dwarf.h. Obviously I installed libdwarf-dev and instead I need libdw-dev
*hate*

Anyway, yes, compile now fails as advertised.

And patch fixes it -- now I need to figure out what to do about urgent,
because applying it on top of Linus' tree will create conflicts with
patches already in tip/x86/mm *sigh*.



  parent reply	other threads:[~2025-02-13 10:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06  3:12 [PATCH] ftrace: x86: Fix a compile error about get_kernel_nofault() Masami Hiramatsu (Google)
2025-02-06  8:12 ` Peter Zijlstra
2025-02-06 11:54   ` Masami Hiramatsu
2025-02-06 12:13     ` Peter Zijlstra
2025-02-06 12:33       ` Peter Zijlstra
2025-02-06 13:25         ` Haiyue Wang
2025-02-07 10:09           ` Peter Zijlstra
2025-02-06 23:59         ` Masami Hiramatsu
2025-02-10 22:30           ` Steven Rostedt
2025-02-11 10:09             ` Peter Zijlstra
2025-02-11 15:50               ` Steven Rostedt
2025-02-12 16:52                 ` Sami Tolvanen
2025-02-13 10:08                   ` Peter Zijlstra
2025-02-13 10:25                     ` Haiyue Wang
2025-02-13 10:40                       ` Peter Zijlstra
2025-02-13 10:50                         ` Haiyue Wang
2025-02-13 10:26                     ` Peter Zijlstra [this message]
2025-02-13 13:35                       ` Masami Hiramatsu
2025-02-13  0:03                 ` Masami Hiramatsu
2025-02-06 18:19 ` Gabriel de Perthuis

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=20250213102634.GA30841@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=g2p.code@gmail.com \
    --cc=haiyuewa@163.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=samitolvanen@google.com \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).