lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Sep 2022 11:45:40 -0700
From:   Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
        x86@...nel.org, Linus Torvalds <torvalds@...ux-foundation.org>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        Josh Poimboeuf <jpoimboe@...nel.org>,
        Andrew Cooper <Andrew.Cooper3@...rix.com>,
        Johannes Wikner <kwikner@...z.ch>,
        Alyssa Milburn <alyssa.milburn@...ux.intel.com>,
        Jann Horn <jannh@...gle.com>, "H.J. Lu" <hjl.tools@...il.com>,
        Joao Moreira <joao.moreira@...el.com>,
        Joseph Nuzman <joseph.nuzman@...el.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Juergen Gross <jgross@...e.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        K Prateek Nayak <kprateek.nayak@....com>,
        Eric Dumazet <edumazet@...gle.com>,
        Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
        antonio.gomez.iglesias@...ux.intel.com
Subject: Re: [PATCH v3.1 58/59] x86/ftrace: Make it call depth tracking aware

On Wed, Sep 21, 2022 at 12:19:07PM +0200, Peter Zijlstra wrote:
[...]
> --- a/kernel/trace/trace_selftest.c
> +++ b/kernel/trace/trace_selftest.c
> @@ -785,7 +785,14 @@ static struct fgraph_ops fgraph_ops __in
>  };
>  
>  #ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
> -noinline __noclone static void trace_direct_tramp(void) { }
> +#ifndef CALL_DEPTH_ACCOUNT
> +#define CALL_DEPTH_ACCOUNT ""
> +#endif
> +
> +noinline __noclone static void trace_direct_tramp(void)
> +{
> +	asm(CALL_DEPTH_ACCOUNT);
> +}
>  #endif

I am seeing this build error (with the attached .config):

    CC      kernel/trace/trace.o
    AR      drivers/built-in.a
  kernel/trace/trace_selftest.c: Assembler messages:
  kernel/trace/trace_selftest.c:811: Error: invalid operands (*UND* and *UND* sections) for `+'
  make[2]: *** [scripts/Makefile.build:249: kernel/trace/trace.o] Error 1
  make[1]: *** [scripts/Makefile.build:465: kernel/trace] Error 2
  make: *** [Makefile:1852: kernel] Error 2

Below patch fixed the error for me:

---
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index ff0536cea968..f7ad4153d985 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -7,6 +7,8 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 
+#include <asm/asm-offsets.h>
+
 static inline int trace_valid_entry(struct trace_entry *entry)
 {
 	switch (entry->type) {

View attachment ".config" of type "text/plain" (137873 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ