Article View: linux.kernel.netdev
Article #24676Re: [PATCH net] tls: set the copy cursor before cloning plaintext
From: patchwork-bot+netdevbpf
Date: Mon, 30 Nov 2026 16:10
Date: Mon, 30 Nov 2026 16:10
33 lines
9385 bytes
9385 bytes
Hello:
This patch was applied to netdev/net.git (main)
by Willem de Bruijn <willemb@google.com>:
On Mon, 23 Nov 2026 01:38:42 -0500 you wrote:
> tls_sw_sendmsg_locked() copies into the open record by cloning space
> with tls_clone_plaintext_msg() and filling it with
> sk_msg_memcopy_from_iter(), which starts at sg.curr and sg.copybreak
> as left by whatever last added to the record. The copy trusts other
> paths to leave that cursor in the right state, and they have not.
>
> Since commit d829e9c4112b ("tls: convert to generic sk_msg interface"),
> the path that adds the caller's own pages (sendpage, later splice) did
> not move sg.curr, so the next copy wrote into those pages. Commit
> c5a595000e26 ("net: tls, update curr on splice as well") fixed that by
> making the splice path leave sg.curr at sg.end with copybreak 0. That
> is only correct if the clone adds a new element. sk_msg_clone() instead
> grows the last element when the cloned range is contiguous with it, so
> sg.end does not move, and the copy starts at an unused slot, wraps
> around the ring and writes from sg.start, into the spliced pages again.
>
> [...]
Here is the summary with links:
- [net] tls: set the copy cursor before cloning plaintext
https://git.kernel.org/netdev/net/c/80a141905909
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Technical Details
Message-ID:
<179605500675.3403811.7621253363656924847.git-patchwork-notify@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374297-linux-kernel-netdev=dewy.ruReferences:
<20261123063842.64536-1-juanagusnicco@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374297-linux-kernel-netdev=dewy.ru From: patchwork-bot+netdevbpf@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] tls: set the copy cursor before cloning plaintext Date: Mon, 30 Nov 2026 16:10:06 +0000 Organization: Usenet Network Message-ID: <179605500675.3403811.7621253363656924847.git-patchwork-notify@kernel.org> References: <20261123063842.64536-1-juanagusnicco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1464192"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:92R2hozmSh0xziwZNIO4XAlsh5M= sha256:T3jALeDkRUlzLNHh7epfPRXG2fyUsxX2AHHSqybSJrU= sha1:FQt9OiPFGOMGHf2lpysGd4JGbF8= sha256:sYZJjbQ4GX3/MvX/s4TBrzkiSbIDXVjZMq8Dg/Cl0OA= 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 E3649125FF6; Mon, 30 Nov 2026 19:10:28 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 dvpSKubMsKwe; Mon, 30 Nov 2026 19:10:21 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374297-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id E3842125FF2; Mon, 30 Nov 2026 19:10:12 +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 46A2629EE0; Mon, 30 Nov 2026 16:10:09 +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=1796055009; b=LQ0hV8I9pKJTR4WzhVWkTLuOInbr6xPDpZ3RcoE+a5fmxeD7qtnywUugRllYQHa0zgaN QkonygqiEg2N+12CCwdxWSS6dKxBy0s5RrX3bAV6WK0q1LB/lD7sfNykRGW1NXwZc+YRm ZFHMg79D7VVJE76G+sR9XeWipl6++ziNj9WDZgnvQN2EFOSyh91+CCyPqxJmsSjiXsKvy x3EZrulVNr7OzkBBdIKK4CzYw3fdKxWTIIzkzfMfvWHCUtyIadapRprtvtFNMz8omg18M HCkhFIPV5nOHtgUxMatbV/SwLK+xdjLedmEt/UtIqWUJ8fJXUoaXCtLYF0yH2Jq5puA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796055009; h=X-Original-To:Received:Received:DKIM-Signature:Received:Content-Type: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=YtOct/l+PFNuh/9CGPZNjjHKRni3GvXVHI44c9LGVz8=; b=M1MhmHAcxlZJH31iC5zA42w7xsu63zuvvgSDJ+UzgKYNjBI5uIxjQDeUIbj00usF7pPr FUSMr6N5cfS3IYP5wwcOs0Qxd4vAsYyc5Gr9a9kg1boLYuWEDrumqc1miR2V/NBNt1o8U Jt9yMqqorkeLdAfZO8vK7+9gjIPpnghhdD26im2e7NTBcLko1QXSx1iVXjCiWzPyEmaTD nvMyTvy7xIWZAqZ8AEqMK5UYQLGX/Gg6t6KlvoDwp8Cr9Wizk5KF+TGpVy++9aOoizZRd 5Fa7XqC2GNu83z08WzjjKaPpx5ycwrVEw2LVnjrpbsqDNEAxbxXGq4pZdRv7up4A/cg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IYAGVEcy; 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 08B06606A332; Mon, 30 Nov 2026 16:10:09 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IYAGVEcy X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796055008; b=wtvKI/QZuxkEC1rH3+PQ9vjnFDfYYDuSJr42SlKWJVrnSMx7Dl/VSTmJnctFuFDLJaL1 YDuXUsWDJ5xyaqbs5ctDZEPZtxg8PFHh8N97fL8ANCI2KpPEqvOtk66/ZHnBUvVYl2+0P uTxW/FJe0WTAqXyi+wGA2hsJP9VHliz0gB5EQoK7WojHYqYVRrYaaPB+/QxvIWVCflviN Fp9YTaCnciB6G6KL9dZc/CW18IEqrToRiuczF05w4u6w118FjssaK0vYYq/wP4mcVApQn Limib6xN8rCG2l6SwRR8ZnuTIAp1yrQSDT2sx+0DB4Sd1bgcg8zsUEKplWoKhc9erNA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796055008; h=Received:DKIM-Signature:Received:Content-Type:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=YtOct/l+PFNuh/9CGPZNjjHKRni3GvXVHI44c9LGVz8=; b=b10S93oisZp/vzahy7CwVt16rJzbzWKXuIJAWhIyNFUukBHgVN1+2xk/M9wv1MnDS0MQ lJVQivguAQzPOGK3aOQXmXabtbHHIzt1y/oyrtvPe16JXo7WdfbsHIG4Ojvmywrk61RSR S96tjESTxFvaRcX55ZSb2zrdJYKmBcY+KBQd7rVwzIVo8Xsq/67cNff9DSvoPbZhJofzY BJRMf+7Ooi1j780ExiLlg0qRL0sPDzkiCx6t2jnFvQtbP+axDXYFQ7A+oiL7JuawmEu7X RCNJ66gGVIvV+DqXj3Ifoq7koooz/f+wvPqGnZQ6Bmpkbx90FfvUv1moo9L8ZcJjL4Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IYAGVEcy; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2830C606A31C; Mon, 30 Nov 2026 16:10:08 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id F39A71F000C1; Mon, 30 Nov 2026 16:10:07 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796055008; bh=YtOct/l+PFNuh/9CGPZNjjHKRni3GvXVHI44c9LGVz8=; h=Subject:From:Date:References:In-Reply-To:To:Cc; b=IYAGVEcyblWIvtks6QycAjMqCgeNZrrfrlsbwAe23vz1e7SJmoN1zy26kbIQnLkeo MHZKNDvRjBu1rYR1DoKuAAPEIfZT76mbYawj4XiQQhqolm5vhtKN379FCsz9v0zdWM Rr3BZ61pXVf3BNcmjU3hfeRYzH/9HEBaT+V8+YX/4A9Mag5MGmt65AMY5vUb8o0UdB +3+XjgFTzkIcG2ZKhwznPt+Be0aZC+KdVm++1izrFtXD3dZU6jRi3p1jsH3jACBQVB YtcVdJEOfPZsJ/USUgV1YT4Z0kDGVQex01EnLp6PcI048k/xnZysW+fdherB1ohqEU Gl2UmBxy0b19g== X-Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id EBABB39E4DAB; Mon, 30 Nov 2026 16:10:07 +0000 (UTC) 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: <20261123063842.64536-1-juanagusnicco@gmail.com> X-Cc: netdev@vger.kernel.org, john.fastabend@gmail.com, kuba@kernel.org, sd@queasysnail.net, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, willemb@google.com, horms@kernel.org, daniel@iogearbox.net, ast@kernel.org, jiayuan.chen@linux.dev, linux-kernel@vger.kernel.org, eddsterxyz@gmail.com, kylebot@openai.com