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:   Sat, 22 Apr 2017 08:32:35 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     David Miller <davem@...emloft.net>
Cc:     sparclinux@...r.kernel.org, netdev@...r.kernel.org, ast@...nel.org,
        daniel@...earbox.net
Subject: Re: [PATCH 2/2] sparc64: Add eBPF JIT.

On Fri, Apr 21, 2017 at 08:17:11PM -0700, David Miller wrote:
> 
> This is an eBPF JIT for sparc64.  All major features are supported.
> 
> All tests under tools/testing/selftests/bpf/ pass.
> 
> Signed-off-by: David S. Miller <davem@...emloft.net>
...
> +	/* tail call */
> +	case BPF_JMP | BPF_CALL |BPF_X:
> +		emit_tail_call(ctx);
> +

I think 'break;' is missing here.
When tail_call's target program is null the current program should
continue instead of aborting.
Like in our current ddos+lb setup the program looks like:
 bpf_tail_call(ctx, &prog_array, 1);
 bpf_tail_call(ctx, &prog_array, 2);
 bpf_tail_call(ctx, &prog_array, 3);
 return XDP_DROP;

this way it will jump into the program that is installed in slot 1.
If it's empty, it will try slot 2...
If no programs installed it will drop the packet.

> +	/* function return */
> +	case BPF_JMP | BPF_EXIT:
> +		/* Optimization: when last instruction is EXIT,
> +		   simply fallthrough to epilogue. */
> +		if (i == ctx->prog->len - 1)
> +			break;
> +		emit_branch(BA, ctx->idx, ctx->epilogue_offset, ctx);
> +		emit_nop(ctx);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ