linux-stable/include
Antony Antony 4e484b3e96 xfrm: rate limit SA mapping change message to user space
Kernel generates mapping change message, XFRM_MSG_MAPPING,
when a source port chage is detected on a input state with UDP
encapsulation set.  Kernel generates a message for each IPsec packet
with new source port.  For a high speed flow per packet mapping change
message can be excessive, and can overload the user space listener.

Introduce rate limiting for XFRM_MSG_MAPPING message to the user space.

The rate limiting is configurable via netlink, when adding a new SA or
updating it. Use the new attribute XFRMA_MTIMER_THRESH in seconds.

v1->v2 change:
	update xfrm_sa_len()

v2->v3 changes:
	use u32 insted unsigned long to reduce size of struct xfrm_state
	fix xfrm_ompat size Reported-by: kernel test robot <lkp@intel.com>
	accept XFRM_MSG_MAPPING only when XFRMA_ENCAP is present

Co-developed-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2021-12-23 09:32:51 +01:00
..
acpi Merge branches 'acpica', 'acpi-ec', 'acpi-pmic' and 'acpi-video' 2021-11-10 14:03:14 +01:00
asm-generic asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
clocksource
crypto
drm Removed the TTM Huge Page functionnality to address a crash, a timeout 2021-11-11 08:14:19 +10:00
dt-bindings - Remove Drivers 2021-11-08 12:07:52 -08:00
keys
kunit include/kunit/test.h: replace kernel.h with the necessary inclusions 2021-11-09 10:02:49 -08:00
kvm
linux tcp: add missing htmldocs for skb->ll_node and sk->defer_list 2021-11-18 11:54:01 +00:00
math-emu
media Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
memory
misc
net xfrm: rate limit SA mapping change message to user space 2021-12-23 09:32:51 +01:00
pcmcia
ras
rdma
scsi SCSI misc on 20211112 2021-11-12 12:25:50 -08:00
soc net: dsa: felix: restrict psfp rules on ingress port 2021-11-18 12:07:24 +00:00
sound
target
trace A slow cycle for nfsd: mainly cleanup, including Neil's patch dropping 2021-11-10 16:45:54 -08:00
uapi xfrm: rate limit SA mapping change message to user space 2021-12-23 09:32:51 +01:00
vdso
video
xen