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] [day] [month] [year] [list]
Message-ID: <20220713235605.k5gblq46okdyl6eg@treble>
Date:   Wed, 13 Jul 2022 16:56:05 -0700
From:   Josh Poimboeuf <jpoimboe@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Song Liu <song@...nel.org>, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH] x86/alternative: Report missing return thunk details

On Wed, Jul 13, 2022 at 02:38:19PM -0700, Kees Cook wrote:
> Debugging missing return thunks is easier if we can see where they're
> happening.
> 
> Suggested-by: Peter Zijlstra <peterz@...radead.org>
> Link: https://lore.kernel.org/lkml/Ys66hwtFcGbYmoiZ@hirez.programming.kicks-ass.net/
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: x86@...nel.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>  arch/x86/kernel/alternative.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index d6858533e6e5..62f6b8b7c4a5 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -555,7 +555,9 @@ void __init_or_module noinline apply_returns(s32 *start, s32 *end)
>  			dest = addr + insn.length + insn.immediate.value;
>  
>  		if (__static_call_fixup(addr, op, dest) ||
> -		    WARN_ON_ONCE(dest != &__x86_return_thunk))
> +		    WARN_ONCE(dest != &__x86_return_thunk,
> +			      "missing return thunk: %pS-%pS: %*ph",
> +			      addr, dest, 5, addr))

String needs a newline?

-- 
Josh

Powered by blists - more mailing lists