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:   Thu, 9 May 2019 22:37:28 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "H. Peter Anvin" <hpa@...or.com>, Jiri Kosina <jikos@...nel.org>,
        Miroslav Benes <mbenes@...e.cz>,
        Petr Mladek <pmladek@...e.com>,
        Joe Lawrence <joe.lawrence@...hat.com>,
        live-patching@...r.kernel.org, x86@...nel.org,
        Borislav Petkov <bp@...en8.de>
Subject: Re: [RFC][PATCH] ftrace/x86: Remove mcount support

On Thu, 9 May 2019 15:49:02 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h
> index cf350639e76d..287f1f7b2e52 100644
> --- a/arch/x86/include/asm/ftrace.h
> +++ b/arch/x86/include/asm/ftrace.h
> @@ -3,12 +3,10 @@
>  #define _ASM_X86_FTRACE_H
>  
>  #ifdef CONFIG_FUNCTION_TRACER
> -#ifdef CC_USING_FENTRY
> -# define MCOUNT_ADDR		((unsigned long)(__fentry__))
> -#else
> -# define MCOUNT_ADDR		((unsigned long)(mcount))
> -# define HAVE_FUNCTION_GRAPH_FP_TEST
> +#ifndef CC_USING_FENTRY
> +# error Compiler does not support fentry?
>  #endif
> +# define MCOUNT_ADDR		((unsigned long)(__fentry__))
>  #define MCOUNT_INSN_SIZE	5 /* sizeof mcount call */
>  
>  #ifdef CONFIG_DYNAMIC_FTRACE

Failed my tests. :-(

In arch/x86/Kconfig ...

	select HAVE_FENTRY                      if X86_64 || DYNAMIC_FTRACE


Bah! I need to work a little on this patch.

I need to implement fentry in the !DYNAMIC_FTRACE code of x86_32 first.
Shouldn't be too hard, but still.

I could also just force DYNAMIC_FTRACE to be 'y' for x86_32 if
CONFIG_FUNCTION_TRACER is set. The only reason I still support static
FTRACE on x86 is because I use it to test !DYNAMIC_FTRACE generic code,
because there's still some archs that only support the !DYNAMIC_FTRACE
function tracer.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ