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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+qDAzjyRuN6sdpw8RjB4XQ1EyyMJ_uYXeDspbW58fC3A@mail.gmail.com>
Date: Sun, 29 Sep 2024 10:38:58 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>, 
	alyssa.milburn@...el.com, scott.d.constable@...el.com, 
	Joao Moreira <joao@...rdrivepizza.com>, Andrew Cooper <andrew.cooper3@...rix.com>, 
	Josh Poimboeuf <jpoimboe@...nel.org>, "Jose E. Marchesi" <jose.marchesi@...cle.com>, 
	"H.J. Lu" <hjl.tools@...il.com>, Nick Desaulniers <ndesaulniers@...gle.com>, 
	Sami Tolvanen <samitolvanen@...gle.com>, Nathan Chancellor <nathan@...nel.org>, ojeda@...nel.org, 
	Kees Cook <kees@...nel.org>
Subject: Re: [PATCH 09/14] x86/ibt: Implement IBT+

On Fri, Sep 27, 2024 at 12:50 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> --- a/arch/x86/net/bpf_jit_comp.c
> +++ b/arch/x86/net/bpf_jit_comp.c
> @@ -555,6 +555,8 @@ static int emit_patch(u8 **pprog, void *
>
>  static int emit_call(u8 **pprog, void *func, void *ip)
>  {
> +       if (is_endbr(func))
> +               func += ENDBR_INSN_SIZE;
>         return emit_patch(pprog, func, ip, 0xE8);
>  }
>
> @@ -562,11 +564,13 @@ static int emit_rsb_call(u8 **pprog, voi
>  {
>         OPTIMIZER_HIDE_VAR(func);
>         ip += x86_call_depth_emit_accounting(pprog, func, ip);
> -       return emit_patch(pprog, func, ip, 0xE8);
> +       return emit_call(pprog, func, ip);
>  }
>
>  static int emit_jump(u8 **pprog, void *func, void *ip)
>  {
> +       if (is_endbr(func))
> +               func += ENDBR_INSN_SIZE;
>         return emit_patch(pprog, func, ip, 0xE9);
>  }

Makes sense, but it feels like it's fixing the existing bug
that we somehow didn't notice earlier?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ