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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1302795951.3248.14.camel@edumazet-laptop>
Date:	Thu, 14 Apr 2011 17:45:51 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Avi Kivity <avi@...hat.com>
Cc:	Hagen Paul Pfeifer <hagen@...u.net>,
	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH v2] net: filter: Just In Time compiler

Le jeudi 14 avril 2011 à 18:41 +0300, Avi Kivity a écrit :

> I'm talking about optimizing the generated code.  For example, bpf has 
> just two registers so a complex program generates a lot of loads and 
> stores.  An optimizing compiler can use extra target registers to avoid 
> those spills, and doesn't need to keep A and X in fixed registers.
> 

Thats not exactly true.

A bpf filter also uses up to 16 mem[] 'registers'.

A risc cpu (with a lot of registers) could use registers to hold part of
the mem[] array.

> If you translate the bpf program to C and optimize that with gcc you'll 
> probably get much better machine code that the jit in the patch.
> 

Well, gcc wont optimize a lot a bpf program if you ask me.

You would better make tcpdump not generate bpf but direct C code.




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ