Go to file
mengensun 7a2ee8ca8f virtio-net: check copy length in xdp_linearize_page
at swithing from no-xdp-attached to xdp-attached, some ring elem
may be added to vring before we attach xdp prog, thoes ring elem
length is variable according to EWMA

while xdp_linearize_page assume ring elem length was aways shorter
then PAGE_SIZE - VIRTIO_XDP_HEADROOM, EWMA may giving a ring elem
bigger then PAGE_SIZE - VIRTIO_XDP_HEADROOM, which make the memory
dirty after the page allocated by xdp_linearize_page

fix it by checking length before really copy, and dropped the current
frame if checking failed, because length of ring elem which is add to
ring buffer after xdp attached is aways shorter
then PAGE_SIZE - VIRTIO_XDP_HEADROOM so here we dropped frame as most
as vring length.

upstream kernel have not repaired this, got it by code review,so, here
repair this by Conservativly dropped frame but not let the system dump

Signed-off-by: mengensun<mengensun@tencent.com>
Reviewed-by: mungerjiang<mungerjiang@tencent.com>
Reviewed-by: imagedong<imagedong@tencent.com>
2021-12-20 11:46:29 +08:00
Documentation locking/qspinlock: Introduce starvation avoidance into CNA 2021-12-20 11:43:06 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch locking/qspinlock: Introduce llc aware spinlock 2021-12-20 11:43:06 +08:00
block cgroupfs: support for proc and sys 2021-11-01 15:00:06 +08:00
certs certs: Fix blacklist flag type confusion 2021-04-12 12:52:25 +08:00
crypto crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS 2021-05-20 16:07:34 +08:00
drivers virtio-net: check copy length in xdp_linearize_page 2021-12-20 11:46:29 +08:00
fs xfs: fix an ABBA deadlock in xfs_rename 2021-12-10 16:25:39 +08:00
include locking/qspinlock: Rename mcs lock/unlock macros and make them more generic 2021-12-20 11:43:06 +08:00
init tqos/rqm: Tencent Quality Monitor Buffer 2021-10-29 06:51:52 +00:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel locking/qspinlock: Introduce llc aware spinlock 2021-12-20 11:43:06 +08:00
lib bug: Remove redundant condition check in report_bug 2021-05-20 16:07:55 +08:00
mm cgroupfs: support for proc and sys 2021-11-01 15:00:06 +08:00
net netfilter: conntrack: Increase the limit of NF_CT_EXT_NUM to 10 2021-12-10 15:53:24 +08:00
package config: enable CONFIG_NUMA_AWARE_SPINLOCKS default 2021-12-20 11:43:06 +08:00
samples kfifo: fix ternary sign extension bugs 2021-05-20 16:08:01 +08:00
scripts kabi: kabi check support 2021-06-23 07:24:18 +00:00
security security: commoncap: fix -Wstringop-overread warning 2021-05-20 16:07:35 +08:00
sound ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails 2021-05-20 16:07:59 +08:00
tools selftests/x86: Add a syscall_arg_fault_64 test for negative GSBASE 2021-08-17 06:29:11 +00:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: Stop looking for coalesced MMIO zones if the bus is destroyed 2021-05-20 16:07:44 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS x86/sgx: Update MAINTAINERS 2021-07-12 08:56:46 +00:00
Makefile Rebase to linux long term 5.4.119 2021-05-20 16:08:02 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0