1
0
Fork 0
alistair23-linux/include
Willem de Bruijn 97550f6fa5 net: compound page support in skb_seq_read
skb_seq_read iterates over an skb, returning pointer and length of
the next data range with each call.

It relies on kmap_atomic to access highmem pages when needed.

An skb frag may be backed by a compound page, but kmap_atomic maps
only a single page. There are not enough kmap slots to always map all
pages concurrently.

Instead, if kmap_atomic is needed, iterate over each page.

As this increases the number of calls, avoid this unless needed.
The necessary condition is captured in skb_frag_must_loop.

I tried to make the change as obvious as possible. It should be easy
to verify that nothing changes if skb_frag_must_loop returns false.

Tested:
  On an x86 platform with
    CONFIG_HIGHMEM=y
    CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y
    CONFIG_NETFILTER_XT_MATCH_STRING=y

  Run
    ip link set dev lo mtu 1500
    iptables -A OUTPUT -m string --string 'badstring' -algo bm -j ACCEPT
    dd if=/dev/urandom of=in bs=1M count=20
    nc -l -p 8000 > /dev/null &
    nc -w 1 -q 0 localhost 8000 < in

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11 18:20:09 -08:00
..
acpi More power management updates for 5.11-rc1 2020-12-22 14:12:10 -08:00
asm-generic local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
clocksource
crypto crypto: lib/blake2s - Move selftest prototype into header file 2020-12-04 18:13:14 +11:00
drm drm-misc-next for 5.11: 2020-12-15 10:21:48 +01:00
dt-bindings The core framework got some nice improvements this time around. We gained the 2020-12-21 10:39:37 -08:00
keys
kunit kunit: Support for Parameterized Testing 2020-12-02 16:06:49 -07:00
kvm Merge remote-tracking branch 'origin/kvm-arm64/misc-5.11' into kvmarm-master/queue 2020-12-04 10:12:55 +00:00
linux net: compound page support in skb_seq_read 2021-01-11 18:20:09 -08:00
math-emu
media media: rc: add keymap for pine64 remote 2020-12-07 13:51:59 +01:00
memory memory: renesas-rpc-if: Make rpcif_enable/disable_rpm() as static inline 2020-11-28 12:37:18 +01:00
misc ocxl: Update the Process Element Entry 2020-12-04 01:01:30 +11:00
net Networking fixes for 5.11-rc3, including fixes from netfilter, wireless 2021-01-05 12:38:56 -08:00
pcmcia
ras
rdma RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
scsi SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
soc ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
sound ASoC: Updates for v5.11 2020-12-14 15:57:14 +01:00
target
trace AFS fixes 2021-01-05 11:55:46 -08:00
uapi net: suggest L2 discards be counted towards rx_dropped 2021-01-05 16:23:57 -08:00
vdso
video
xen xen/xenbus: Count pending messages for each watch 2020-12-14 10:07:13 +01:00