freebsd-skq/sys
Gleb Smirnoff 1d6139c0e4 Make ruleset anchors in pf(4) reentrant. We've got two problems here:
1) Ruleset parser uses a global variable for anchor stack.
2) When processing a wildcard anchor, matching anchors are marked.

To fix the first one:

o Allocate anchor processing stack on stack. To make this allocation
  as small as possible, following measures taken:
  - Maximum stack size reduced from 64 to 32.
  - The struct pf_anchor_stackframe trimmed by one pointer - parent.
    We can always obtain the parent via the rule pointer.
  - When pf_test_rule() calls pf_get_translation(), the former lends
    its stack to the latter, to avoid recursive allocation 32 entries.

The second one appeared more tricky. The code, that marks anchors was
added in OpenBSD rev. 1.516 of pf.c. According to commit log, the idea
is to enable the "quick" keyword on an anchor rule. The feature isn't
documented anywhere. The most obscure part of the 1.516 was that code
examines the "match" mark on a just processed child, which couldn't be
put here by current frame. Since this wasn't documented even in the
commit message and functionality of this is not clear to me, I decided
to drop this examination for now. The rest of 1.516 is redone in a
thread safe manner - the mark isn't put on the anchor itself, but on
current stack frame. To avoid growing stack frame, we utilize LSB
from the rule pointer, relying on kernel malloc(9) returning pointer
aligned addresses.

Discussed with:		dhartmei
2012-09-18 10:54:56 +00:00
..
amd64 Integrate nvme(4) and nvd(4) into the amd64 and i386 builds. 2012-09-17 19:26:33 +00:00
arm Add a kernel config for the Toshiba AC100. The AC100 is an ARM laptop with 2012-09-17 09:22:59 +00:00
boot loader/i386: replace ugly inb/outb re-implementations with cpufunc.h 2012-09-18 08:53:11 +00:00
bsm
cam s/ is is / is /g 2012-09-14 22:00:03 +00:00
cddl zfs: correctly calculate dn_bonuslen for saving SAs to disk 2012-09-18 08:02:54 +00:00
compat Remove redundant check 2012-09-12 10:12:03 +00:00
conf Integrate nvme(4) and nvd(4) into the amd64 and i386 builds. 2012-09-17 19:26:33 +00:00
contrib o Create directory sys/netpfil, where all packet filters should 2012-09-14 11:51:49 +00:00
crypto
ddb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
dev Implement my first cut at filtered frames in aggregation sessions. 2012-09-18 10:14:17 +00:00
fs Prefer __containerof() above member2struct(). 2012-09-15 19:28:54 +00:00
gdb Update the ddb and gdb backends for the new 'trace_thread' hook. 2012-04-12 21:34:58 +00:00
geom g_disk_flushcache definitely should not be traced under G_T_TOPOLOGY 2012-09-18 07:57:34 +00:00
gnu/fs Add VFCF_READONLY flag that indicates ntfs and xfs file systems are 2012-09-12 03:42:52 +00:00
i386 Integrate nvme(4) and nvd(4) into the amd64 and i386 builds. 2012-09-17 19:26:33 +00:00
ia64 userret() already checks for td_locks when INVARIANTS is enabled, so 2012-09-08 18:27:11 +00:00
isa
kern Correct double "the the" 2012-09-14 21:28:56 +00:00
kgssapi
libkern s/ is is / is /g 2012-09-14 22:00:03 +00:00
mips Prefer __containerof() above member2struct(). 2012-09-15 19:28:54 +00:00
modules Add nvme(4) and nvd(4) Makefiles to the tree. 2012-09-17 19:58:02 +00:00
net Make ruleset anchors in pf(4) reentrant. We've got two problems here: 2012-09-18 10:54:56 +00:00
net80211 Fix a crash bug introduced in the iterate node work recently done. 2012-09-16 22:45:00 +00:00
netatalk
netgraph o Create directory sys/netpfil, where all packet filters should 2012-09-14 11:51:49 +00:00
netinet s/teh/the/g 2012-09-14 21:59:55 +00:00
netinet6 Merge the projects/pf/head branch, that was worked on for last six months, 2012-09-08 06:41:54 +00:00
netipsec Add missing break 2012-09-18 08:00:43 +00:00
netipx
netnatm
netncp Add characters mapping for codepages used in Germany. 2012-06-01 03:59:08 +00:00
netpfil Make ruleset anchors in pf(4) reentrant. We've got two problems here: 2012-09-18 10:54:56 +00:00
netsmb Change a duplicated check to clarify that we really want to set a 2012-07-10 21:02:59 +00:00
nfs - Typo fix 2012-08-16 19:22:34 +00:00
nfsclient Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
nfsserver
nlm Fix grammar. 2012-08-16 13:01:56 +00:00
ofed Remove unneeded ipfw headers introduced in r213447 from Infiniband code. 2012-09-04 10:56:30 +00:00
opencrypto
pc98 Grammar fix: s/NIC's/NICs/ 2012-08-26 01:21:02 +00:00
pci intpm: add ATI IXP400 pci id 2012-04-16 10:33:46 +00:00
powerpc userret() already checks for td_locks when INVARIANTS is enabled, so 2012-09-08 18:27:11 +00:00
rpc Fix RPC headers for C++ 2012-09-02 21:04:40 +00:00
security Check vplabel for NULL before dereferencing it. Fixes a panic 2012-05-03 15:51:34 +00:00
sparc64 Correct double "the the" 2012-09-14 21:28:56 +00:00
sys Remove namespace pollution in _rmlock.h by defining rm_queue structure 2012-09-18 00:43:15 +00:00
teken
tools
ufs Remove unused member of struct indir (in_exists) from UFS and EXT2 code. 2012-08-17 17:45:27 +00:00
vm Correct double "the the" 2012-09-14 21:28:56 +00:00
x86 Allow static DMA allocations that allow for enough segments to do page-sized 2012-08-17 14:14:25 +00:00
xdr
xen
Makefile Add sys/ofed to the 'make cscope' target. 2012-03-20 18:05:15 +00:00