From: Eric Dumazet <eric.dumazet@gmail.com>
To: Phil Oester <kernel@linuxace.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] net: bpf_jit: fix divide by 0 generation
Date: Thu, 19 Jan 2012 09:07:44 +0100 [thread overview]
Message-ID: <1326960464.1113.28.camel@edumazet-laptop> (raw)
In-Reply-To: <1326902511.2316.29.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Le mercredi 18 janvier 2012 à 17:01 +0100, Eric Dumazet a écrit :
> Le mercredi 18 janvier 2012 à 07:57 -0800, Phil Oester a écrit :
>
> > Got the following output after applying this fix (no panic this time):
> >
> > proglen=231 != oldproglen=235
> > bpb_jit_compile fatal error
> >
> > Filter being used is 'not net a.b.x.112/28 and not net a.b.y.112/28'
>
By the way, libcap gives following code, not optimal
(000) ldh [12]
(001) jeq #0x800 jt 2 jf 14
(002) ld [26]
(003) and #0xfffffff0
(004) jeq #0x1020340 jt 28 jf 5
(005) ld [26]
(006) and #0xfffffff0
(007) jeq #0x1021480 jt 28 jf 8
(008) ld [30]
(009) and #0xfffffff0
(010) jeq #0x1020340 jt 28 jf 11
(011) ld [30]
(012) and #0xfffffff0
(013) jeq #0x1021480 jt 28 jf 29
...
could be :
(000) ldh [12]
(001) jeq #0x800 jt 2 jf 10
(002) ld [26]
(003) and #0xfffffff0
(004) jeq #0x1020340 jt ok jf 5
(005) jeq #0x1021480 jt ok jf 6
(006) ld [30]
(007) and #0xfffffff0
(008) jeq #0x1020340 jt ok jf 9
(009) jeq #0x1021480 jt ok jf ret0
...
prev parent reply other threads:[~2012-01-19 8:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 2:27 bpf_jit_compile issues on x86_64 Phil Oester
2012-01-18 6:17 ` Eric Dumazet
2012-01-18 7:30 ` Eric Dumazet
2012-01-18 7:58 ` [PATCH] net: bpf_jit: fix divide by 0 generation Eric Dumazet
2012-01-18 15:57 ` Phil Oester
2012-01-18 16:01 ` Eric Dumazet
2012-01-18 17:21 ` [PATCH v2] " Eric Dumazet
2012-01-18 17:48 ` Phil Oester
2012-01-18 21:04 ` David Miller
2012-01-19 8:07 ` Eric Dumazet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326960464.1113.28.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=kernel@linuxace.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox