History log of /freebsd-10.0-release/sys/i386/i386/bpf_jit_machdep.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 207081 22-Apr-2010 jkim

If a conditional jump instruction has the same jt and jf, do not perform
the test and jump unconditionally.


# 199721 23-Nov-2009 jkim

- Add more aggressive BPF JIT optimization. This is in more favor of i386
while the previous commit was more amd64-centric.
- Use calloc(3) instead of malloc(3)/memset(3) in user land[1].

Submitted by: ed[1]


# 199619 20-Nov-2009 jkim

Add an experimental and rudimentary JIT optimizer to reduce unncessary
overhead from short BPF filter programs such as "get the first 96 bytes".


# 199615 20-Nov-2009 jkim

General style cleanup, no functional change.


# 199603 20-Nov-2009 jkim

- Allocate scratch memory on stack instead of pre-allocating it with
the filter as we do from bpf_filter()[1].
- Revert experimental use of contigmalloc(9)/contigfree(9). It has no
performance benefit over malloc(9)/free(9)[2].

Requested by: rwatson[1]
Pointed out by: rwatson, jhb, alc[2]


# 199531 19-Nov-2009 jkim

Fix tinderbox build for i386 and sync amd64 with it.


# 199498 18-Nov-2009 jkim

- Change internal function bpf_jit_compile() to return allocated size of
the generated binary and remove page size limitation for userland.
- Use contigmalloc(9)/contigfree(9) instead of malloc(9)/free(9) to make
sure the generated binary aligns properly and make it physically contiguous.


# 199492 18-Nov-2009 jkim

- Make BPF JIT compiler working again in userland. We are limiting size of
generated native binary to page size for now.
- Update copyright date and fix some style nits.


# 182220 26-Aug-2008 jkim

Move empty filter handling to MI source.

MFC after: 3 days


# 182173 25-Aug-2008 jkim

Fix a typo in copyrights.


# 181853 18-Aug-2008 jkim

MFamd64: Correctly check unsignedness of all registers used
for load instructions with direct or indirect offsets.


# 181846 18-Aug-2008 jkim

- Make these files compilable on user land.
- Update copyrights and fix style(9).


# 181700 13-Aug-2008 jkim

Use int32_t/int16_t instead of int/short as sys/net/bpf_filter.c does.


# 181697 13-Aug-2008 jkim

- Remove unnecessary jump instruction(s) when offset(s) is/are zero(s).
- Constantly use conditional jumps for unsigned integers.


# 181648 12-Aug-2008 jkim

Update copyrights and fix style(9).


# 181645 12-Aug-2008 jkim

Reduce number of stack usages with unused %edi.


# 179978 24-Jun-2008 jkim

Emit opcodes closer to GNU as(1) generated codes and micro-optimize.


# 179968 23-Jun-2008 jkim

Rehash and clean up BPF JIT compiler macros to match AT&T notations.


# 153995 03-Jan-2006 jkim

- Explicitly validate an empty filter to match bpf_filter() comment[1].
- Do not use BPF JIT compiler for an empty filter.

[1] Pointed out by: darrenr


# 153157 06-Dec-2005 jkim

s/M_WAITOK/M_NOWAIT/ while mutex is held.

Pointed out by: csjp


# 153156 06-Dec-2005 jkim

- Micro-optimize `mov $0, %edx' -> `xor %edx, %edx'.
- Correct amd64 macro style (no functional change).


# 153151 06-Dec-2005 jkim

Add experimental BPF Just-In-Time compiler for amd64 and i386.

Use the following kernel configuration option to enable:

options BPF_JITTER

If you want to use bpf_filter() instead (e. g., debugging), do:

sysctl net.bpf.jitter.enable=0

to turn it off.

Currently BIOCSETWF and bpf_mtap2() are unsupported, and bpf_mtap() is
partially supported because 1) no need, 2) avoid expensive m_copydata(9).

Obtained from: WinPcap 3.1 (for i386)