Instead of always emitting BPF_REG_X, let's emit BPF_REG_X only when the
source actually is BPF_X. This causes programs generated by the classic
converter to not be importable via bpf(), as the eBPF verifier checks that
the src_reg is correct or 0. While not a problem yet, this will be a
problem wh
On 09/11/2015 02:25 AM, Tycho Andersen wrote:
Instead of always emitting BPF_REG_X, let's emit BPF_REG_X only when the
source actually is BPF_X. This causes programs generated by the classic
converter to not be importable via bpf(), as the eBPF verifier checks that
the src_reg is correct or 0. Wh
On 09/11/2015 10:45 AM, Daniel Borkmann wrote:
On 09/11/2015 02:25 AM, Tycho Andersen wrote:
Instead of always emitting BPF_REG_X, let's emit BPF_REG_X only when the
source actually is BPF_X. This causes programs generated by the classic
converter to not be importable via bpf(), as the eBPF veri
On Fri, Sep 11, 2015 at 11:28:24AM +0200, Daniel Borkmann wrote:
> [off topic for this patch]
>
> ... this requirement also breaks down for cases where you have a single
> classic BPF instruction that maps into 2 or more eBPF instructions, hitting
> BPF_MAXINSNS early at the time when you try to c
On Fri, Sep 11, 2015 at 08:40:43AM -0700, Alexei Starovoitov wrote:
> On Fri, Sep 11, 2015 at 11:28:24AM +0200, Daniel Borkmann wrote:
> > [off topic for this patch]
> >
> > ... this requirement also breaks down for cases where you have a single
> > classic BPF instruction that maps into 2 or more
On 09/11/2015 05:50 PM, Tycho Andersen wrote:
On Fri, Sep 11, 2015 at 08:40:43AM -0700, Alexei Starovoitov wrote:
On Fri, Sep 11, 2015 at 11:28:24AM +0200, Daniel Borkmann wrote:
[off topic for this patch]
... this requirement also breaks down for cases where you have a single
classic BPF inst
From: Tycho Andersen
Date: Thu, 10 Sep 2015 18:25:07 -0600
> Instead of always emitting BPF_REG_X, let's emit BPF_REG_X only when the
> source actually is BPF_X. This causes programs generated by the classic
> converter to not be importable via bpf(), as the eBPF verifier checks that
> the src_re