On Fri, Jan 15, 2021 at 08:04:06AM -0800, Alexei Starovoitov wrote:
> On Fri, Jan 15, 2021 at 1:41 AM Gary Lin wrote:
> >
> > On Thu, Jan 14, 2021 at 10:37:33PM -0800, Alexei Starovoitov wrote:
> > > On Thu, Jan 14, 2021 at 1:54 AM Gary Lin wrote:
> > > > * pass to emit the final image.
On Fri, Jan 15, 2021 at 1:41 AM Gary Lin wrote:
>
> On Thu, Jan 14, 2021 at 10:37:33PM -0800, Alexei Starovoitov wrote:
> > On Thu, Jan 14, 2021 at 1:54 AM Gary Lin wrote:
> > > * pass to emit the final image.
> > > */
> > > - for (pass = 0; pass < 20 || image; pass++) {
>
On Thu, Jan 14, 2021 at 10:37:33PM -0800, Alexei Starovoitov wrote:
> On Thu, Jan 14, 2021 at 1:54 AM Gary Lin wrote:
> > * pass to emit the final image.
> > */
> > - for (pass = 0; pass < 20 || image; pass++) {
> > - proglen = do_jit(prog, addrs, image, oldpr
On Thu, Jan 14, 2021 at 1:54 AM Gary Lin wrote:
> * pass to emit the final image.
> */
> - for (pass = 0; pass < 20 || image; pass++) {
> - proglen = do_jit(prog, addrs, image, oldproglen, &ctx);
> + for (pass = 0; pass < MAX_PASSES || image; pass++) {
>
The x64 bpf jit expects bpf images converge within the given passes, but
it could fail to do so with some corner cases. For example:
l0: ja 40
l1: ja 40
[... repeated ja 40 ]
l39:ja 40
l40:ret #0
This bpf program contains 40 "ja 40" instructions w