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:   Mon, 29 Jan 2018 15:33:57 +0100
From:   Michael Holzheu <holzheu@...ux.vnet.ibm.com>
To:     Daniel Borkmann <daniel@...earbox.net>
Cc:     ast@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next 07/13] bpf, s390x: remove obsolete exception
 handling from div/mod

Am Fri, 26 Jan 2018 23:33:42 +0100
schrieb Daniel Borkmann <daniel@...earbox.net>:

> Since we've changed div/mod exception handling for src_reg in
> eBPF verifier itself, 

Maybe add the commit that introduced that to the patch description?

> remove the leftovers from s390x JIT.
> 
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: Michael Holzheu <holzheu@...ux.vnet.ibm.com>
> ---
>  arch/s390/net/bpf_jit_comp.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
> index e501887..78a19c9 100644
> --- a/arch/s390/net/bpf_jit_comp.c
> +++ b/arch/s390/net/bpf_jit_comp.c
> @@ -610,11 +610,6 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
>  	{
>  		int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0;
> 
> -		jit->seen |= SEEN_RET0;
> -		/* ltr %src,%src (if src == 0 goto fail) */
> -		EMIT2(0x1200, src_reg, src_reg);
> -		/* jz <ret0> */
> -		EMIT4_PCREL(0xa7840000, jit->ret0_ip - jit->prg);
>  		/* lhi %w0,0 */
>  		EMIT4_IMM(0xa7080000, REG_W0, 0);
>  		/* lr %w1,%dst */
> @@ -630,11 +625,6 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
>  	{
>  		int rc_reg = BPF_OP(insn->code) == BPF_DIV ? REG_W1 : REG_W0;
> 
> -		jit->seen |= SEEN_RET0;
> -		/* ltgr %src,%src (if src == 0 goto fail) */
> -		EMIT4(0xb9020000, src_reg, src_reg);
> -		/* jz <ret0> */
> -		EMIT4_PCREL(0xa7840000, jit->ret0_ip - jit->prg);
>  		/* lghi %w0,0 */
>  		EMIT4_IMM(0xa7090000, REG_W0, 0);
>  		/* lgr %w1,%dst */

If the check is done in the verifier now, this looks good to me.

Reviewed-by: Michael Holzheu <holzheu@...ux.vnet.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ