[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2936291-b279-0b3f-94be-73cb1bbaa47e@fb.com>
Date: Wed, 17 May 2017 18:18:55 -0700
From: Alexei Starovoitov <ast@...com>
To: David Miller <davem@...emloft.net>, <ecree@...arflare.com>
CC: <daniel@...earbox.net>, <alexei.starovoitov@...il.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment
in verifier.
On 5/17/17 5:16 PM, David Miller wrote:
> BTW, we track something similar already in reg->imm which tracks how
> many high order bits are known to be cleared in the register. It is
> used to avoid potential overflow for packet pointer accesses. I bet
> we can subsume that into this facility as well.
yeah, reg->imm tracks zero upper bits in very simplistic way.
For alignment checking it seems we need to track lower zeros
and ones. If Edward's algorithm can be adopted to track both
that would be double win indeed.
Powered by blists - more mailing lists