[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181210172654.46xiqo7bxpfagwkn@ast-mbp.dhcp.thefacebook.com>
Date: Mon, 10 Dec 2018 09:26:56 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Jiong Wang <jiong.wang@...ronome.com>
Cc: ast@...nel.org, daniel@...earbox.net, ecree@...arflare.com,
netdev@...r.kernel.org, oss-drivers@...ronome.com
Subject: Re: [PATCH v2 bpf-next] bpf: relax verifier restriction on BPF_MOV |
BPF_ALU
On Mon, Dec 10, 2018 at 09:45:30AM +0000, Jiong Wang wrote:
> > > return -EACCES;
> > > + } else if (src_reg->type == SCALAR_VALUE) {
> > > + *dst_reg = *src_reg;
> > > + dst_reg->live |= REG_LIVE_WRITTEN;
> > > + } else {
> > > + mark_reg_unknown(env, regs,
> > > + insn->dst_reg);
> > shouldn't we do dst_reg->live |= REG_LIVE_WRITTEN here as well ?
> > Not a new issue, but probably should fix in the same patch?
>
> check_reg_arg(env, insn->dst_reg, DST_OP_NO_MARK) is called before this
> chunk of code, it has set REG_LIVE_WRITTEN in dst_reg->live, it just
> doesn't update range info. So, if we don't do full register copy, then
> I think there is no need to re-set REG_LIVE_WRITTEN, make sense?
ahh. right. Applied to bpf-next. Thanks!
Powered by blists - more mailing lists