lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 25 Apr 2018 09:48:42 +0200 From: Daniel Borkmann <daniel@...earbox.net> To: Gianluca Borello <g.borello@...il.com>, netdev@...r.kernel.org Cc: ast@...nel.org Subject: Re: [RFC bpf] bpf, x64: fix JIT emission for dead code On 04/25/2018 07:42 AM, Gianluca Borello wrote: > Commit 2a5418a13fcf ("bpf: improve dead code sanitizing") replaced dead > code with a series of ja-1 instructions, for safety. That made JIT > compilation much more complex for some BPF programs. One instance of such > programs is, for example: [...] > A possible approach to mitigate this behavior consists into noticing that > for ja-1 instructions we don't really need to rely on the estimated size > of the previous and current instructions, we know that a -1 BPF jump > offset can be safely translated into a 0xEB instruction with a jump offset > of -2. > > Such fix brings the BPF program in the previous example to complete again > in ~9 passes. > > Fixes: 2a5418a13fcf ("bpf: improve dead code sanitizing") > Signed-off-by: Gianluca Borello <g.borello@...il.com> Thanks for reporting, Gianluca. The approach your fix takes looks good to me!
Powered by blists - more mailing lists