Article View: linux.kernel.netdev
Article #12063Re: [PATCH net 1/1] xfrm: ipcomp: account full fragment pages in truesize
From: Steffen Klassert
Date: Fri, 06 Nov 2026 07:47
Date: Fri, 06 Nov 2026 07:47
21 lines
10181 bytes
10181 bytes
On Fri, Oct 23, 2026 at 02:32:17AM +0800, Zhiling Zou wrote:
> ipcomp_post_acomp() allocates order-0 pages for decompressed skb
> fragments, but on input charges truesize by the decompressed byte count.
> When the output ends partway through a page, the unused tail of its final
> page is not accounted to the receiving socket. Repeated IPComp packets
> can therefore retain more memory than the socket receive-memory limits
> charge.
>
> Round the decompressed length up to page size when charging input skb
> truesize, matching the pages attached to the skb. Leave output accounting
> unchanged.
>
> Fixes: 7d7e5a60c62e ("ipsec: ipcomp - Decompress into frags if necessary")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Link: https://bugtracker.nebusec.ai/f/13830
> Assisted-by: LLM
> Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai>
Applied to the ipsec tree, thanks a lot!
Technical Details
Message-ID:
<au2GILb3-9bN1i7G@gauss4>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357821-linux-kernel-netdev=dewy.ruReferences:
<cover.1792692779.git.zhilinz@nebusec.ai> <7f2686a7d3d393a0ef9eb7a2a2abe82caa7874b2.1792692779.git.zhilinz@nebusec.ai>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357821-linux-kernel-netdev=dewy.ru From: steffen.klassert@secunet.com (Steffen Klassert) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 1/1] xfrm: ipcomp: account full fragment pages in truesize Date: Fri, 6 Nov 2026 08:47:44 +0100 Organization: Usenet Network Message-ID: <au2GILb3-9bN1i7G@gauss4> References: <cover.1792692779.git.zhilinz@nebusec.ai> <7f2686a7d3d393a0ef9eb7a2a2abe82caa7874b2.1792692779.git.zhilinz@nebusec.ai> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: usenet.network; logging-data="3822654"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:1t1JFCFB4tGpBZuJDWUtkdbwK1s= sha256:ino/YOQJeXwPa/pNB+S+gg5e6APJSUJytFfzjWuezUg= sha1:iMf4GryjYPORBDzQm6bS6XN9lO4= sha256:x+D9rq7VFNxPd3eKbA3mIvXNFyodDZ6viuqeSKQlgfs= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id B7D701131A6; Fri, 6 Nov 2026 10:52:21 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=secunet.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XV3Jv47GKZtx; Fri, 6 Nov 2026 10:52:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-357821-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=secunet.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A7F4111319C; Fri, 6 Nov 2026 10:52:07 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 55297223A9; Fri, 6 Nov 2026 07:47:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793951277; b=XHKG3E1YypXuFKyDvdGUv3Zd9nGwb7UQAezZuUxJlXh4w5q3ooKu3vl/ayPL4ny1Cdc0 3UNJ1cBH+2y6OAUSO8SSKtOu6OYyiCGiLpvXpg7Ih5Lc4nvQi/PWVNsPQbfGBNDiPqvSC 550no7AwOw6plke+ldv7xIchIAsPtptgZmmmwipR5T0vV9wTm1lEukI8lxx6AfHr6P/a/ 8UhbZSM4s3VGJOFY3Psrbj1BIbd0l4BPBY4QHH8HAp6Bd3ZbWf1oseAKFW3cif7O6w62A 3f78fw/VVS1+uf38bgSJzoQRo3LYgwLO3gpryzTsgcJ3vpRshGoKBlAWs18DmY9rPbw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793951277; h=X-Original-To:Received:DMARC-Filter:Received:X-Virus-Scanned: Received:Received:DKIM-Filter:DKIM-Signature:Received:Received:Date: From:To:CC:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy; bh=M7E3LRbotPWKmmFgsX76tB+mPSLjTY42TzuESKJJn4I=; b=TaB+dhTAy02paW3pV5BfNCLjRaTGkZ98O7edbz+VekODWebyE1ZBSpoTJ+vWymax9IIo 0QOKUcRcmGWlv65yG6lPxsDcJmbUlxNw1c/hYKHrp6CAer5zYULSzu4YBLPVuSVu/+b7W ZC1dLKbvKs6nQnDDp3lBp25H+TTpg1hPEchFeeMcsQesIU8cyCNvSKASWdj+XjKw3h5Zc R0n2Aug6n6fC98hVNgdr7X+9TDVR5B9bmwPrCsRSwjVy4gzj/gKp9TB+lNL227I1PU5c+ wXmuWYJD6v+RK1+Gi9VCeQx0UAbuN7/JxJGI40F/bawwY0fUZ73t6kl4NyymdmmCu7w== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=Z6ijFVVn; dmarc=pass header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B6EF606A330; Fri, 6 Nov 2026 07:47:57 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=Z6ijFVVn X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=62.96.220.36 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793951275; b=qKVKbPBBhu0Ve28x6EaTr5RMAqVIj54zwrkEfL/GGpVPDSeYH//WcH/tZqAjB/LBWrhm 9ARjdO5TmSgUxJgF93vxvTu+VMKKt5+D9zAvzhtLGfOjNZ0AmG5nCOlp/J2TubNpSyUsz ZTzTq42RMt1k72TqNNwM2edcCdr98LBinkn0ZoxmbKsIBy649lkHVA+ZiNO0xbpQdKXb+ LQLv6JCpS3i5vrBZvPfsufZyyuZCgCq4wKNHxF5iWWd/3XKPKvhU9dHlH79aFSM2EzBQy Uh1s+ApXeVhnon4JuK8ZG5QmIc29kR3el0KVMMxj9mBPuBjhYhDbU2GslNZkTIw6r9Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793951275; h=DMARC-Filter:Received:X-Virus-Scanned:Received:Received:DKIM-Filter: DKIM-Signature:Received:Received:Date:From:To:CC:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy; bh=M7E3LRbotPWKmmFgsX76tB+mPSLjTY42TzuESKJJn4I=; b=Ui0gHoBIyfv0rDK3si7CwN7fYlammxaFlEGlxksVDATYc3fML3ZortgWOeDQMymWiLeI TlosnEQxUYae+92ixIJRh+c3BNfqXxmQCuJWvpJEIce0YFR0A036afsHdWrbhJ2DOFFmK RwGriMgSj7g7jSiXcK8xg5ZDS2e4KXjlOFQBXcgQOI7B5K0fcfZ09jYZkKbMIsdA8gk0o ZygITvycGIry00O5g+u2gxImLdW/InxTxPWWfcUPU8qUuTjCC+nEcSuMtvIgvckYvg2Bh 6+kvWH7JO6pjqAssvzCNm/mcisvH91uqjQ7SHk9zNxdk+Jn+Nv+Q0ReuMuPYCjBdJgg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=Z6ijFVVn; arc=none smtp.remote-ip=62.96.220.36 X-Received: from mx1.secunet.com (mx1.secunet.com [62.96.220.36]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED1A4606A326 for <netdev@vger.kernel.org>; Fri, 6 Nov 2026 07:47:53 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ED1A4606A326 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=secunet.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com X-Received: from localhost (localhost [127.0.0.1]) by mx1.secunet.com (Postfix) with ESMTP id A4B75207B3; Fri, 6 Nov 2026 08:47:46 +0100 (CET) X-Virus-Scanned: by secunet X-Received: from mx1.secunet.com ([127.0.0.1]) by localhost (mx1.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xyEfOV409eUE; Fri, 6 Nov 2026 08:47:45 +0100 (CET) X-Received: from EXCH-01.secunet.de (rl1.secunet.de [10.32.0.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.secunet.com (Postfix) with ESMTPS id AE8992074F; Fri, 6 Nov 2026 08:47:45 +0100 (CET) X-DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com AE8992074F X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1793951265; bh=M7E3LRbotPWKmmFgsX76tB+mPSLjTY42TzuESKJJn4I=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=Z6ijFVVnXzVJkolzj5cPCgCnXXaCXHSMraRVIRupBrbR8uSUJNiSkrRIqGxQXBJEG 1gyrXQe3LuvZD3CNB4YM7enSId2xCxXk+mwg4yx2u06nkXNiGCPpPJd67WhEjonQgD hMmLzRub8lTb4GJu2vzZLv/jeKt8GUZdMCr9se+zPxW+kR9NpA0DFRQUje265kV/jO NiTEOkMaNT/xKanDICb1uvGqhbzgtpJWnSDS4OnOB4GJZ/Bnu4ma1kYPaTUG+8Qt50 rbyS/joHG+XD7mbmqcKcT7jtDuWIT1Dk61sV/UJrE077f0AddkpfojEjrvTmSQX8NW LnWuHVPBRf/eA== X-Received: from gauss4 (10.182.7.102) by EXCH-01.secunet.de (10.32.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Fri, 6 Nov 2026 08:47:45 +0100 X-Received: (nullmailer pid 3068588 invoked by uid 1000); Fri, 06 Nov 2026 07:47:44 -0000 X-CC: <netdev@vger.kernel.org>, <herbert@gondor.apana.org.au>, <davem@davemloft.net>, <edumazet@kernel.org>, <pabeni@redhat.com>, <horms@kernel.org>, <vega@nebusec.ai> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <7f2686a7d3d393a0ef9eb7a2a2abe82caa7874b2.1792692779.git.zhilinz@nebusec.ai> X-ClientProxiedBy: EXCH-02.secunet.de (10.32.0.172) To EXCH-01.secunet.de (10.32.0.171)