[LTP] sockets/xfrm03: Add skb_segment SKBFL_SHARED_FRAG stripping test

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Mon May 18 10:17:55 CEST 2026


Hi Andrea,

On Mon, 18 May 2026 09:27:53 +0200, Andrea Cervesato wrote:
> sockets/xfrm03: Add skb_segment SKBFL_SHARED_FRAG stripping test

> +	/* Let the espintcp strparser process buffered ESP data */
> +	usleep(30000);

Sleep-based synchronisation is not allowed (G2). Replace with a
polling loop on the accepted socket or TST_CHECKPOINT_WAIT between
the child sender and the parent receiver.

[...]

> +		/*
> +		 * Splice pipe into TCP socket. On the forwarding
> +		 * path, skb_segment() may strip SKBFL_SHARED_FRAG,
> +		 * allowing in-place ESP decrypt on page cache pages.
> +		 * May fail on patched kernels.
> +		 */
> +		splice(pipefd[0], NULL, cli_fd, NULL, DATA_SIZE, 0);

SAFE_SPLICE is available in lapi/splice.h and is already used
earlier in this file. Since failure is intentionally ignored on
patched kernels, wrap with TEST() so the result is recorded without
aborting and the SAFE_* rule is satisfied.

---
Note:

Our agent completed the review of the patch.

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list