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]
Message-ID: <d20d5c15-3f5b-4ee3-5c77-3381eb8ba6dc@caviumnetworks.com>
Date:   Fri, 26 Jan 2018 14:39:52 -0800
From:   David Daney <ddaney@...iumnetworks.com>
To:     Daniel Borkmann <daniel@...earbox.net>, ast@...nel.org
Cc:     netdev@...r.kernel.org, David Daney <david.daney@...ium.com>
Subject: Re: [PATCH bpf-next 10/13] bpf, mips64: remove obsolete exception
 handling from div/mod

On 01/26/2018 02:33 PM, Daniel Borkmann wrote:
> Since we've changed div/mod exception handling for src_reg in
> eBPF verifier itself, remove the leftovers from mips64 JIT.
> 
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Cc: David Daney <david.daney@...ium.com>

I didn't test it, but this looks correct, so ...

Reviewed-by: David Daney <david.daney@...ium.com>

> ---
>   arch/mips/net/ebpf_jit.c | 10 ----------
>   1 file changed, 10 deletions(-)
> 
> diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c
> index 4e34703..296f1410 100644
> --- a/arch/mips/net/ebpf_jit.c
> +++ b/arch/mips/net/ebpf_jit.c
> @@ -860,11 +860,6 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
>   			break;
>   		case BPF_DIV:
>   		case BPF_MOD:
> -			b_off = b_imm(exit_idx, ctx);
> -			if (is_bad_offset(b_off))
> -				return -E2BIG;
> -			emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off);
> -			emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src);
>   			emit_instr(ctx, ddivu, dst, src);
>   			if (bpf_op == BPF_DIV)
>   				emit_instr(ctx, mflo, dst);
> @@ -943,11 +938,6 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
>   			break;
>   		case BPF_DIV:
>   		case BPF_MOD:
> -			b_off = b_imm(exit_idx, ctx);
> -			if (is_bad_offset(b_off))
> -				return -E2BIG;
> -			emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off);
> -			emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src);
>   			emit_instr(ctx, divu, dst, src);
>   			if (bpf_op == BPF_DIV)
>   				emit_instr(ctx, mflo, dst);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ