From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F39A71F000C1; Mon, 30 Nov 2026 16:10:07 +0000 (UTC) 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== 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) Content-Type: text/plain; charset="utf-8" X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net] tls: set the copy cursor before cloning plaintext From: patchwork-bot+netdevbpf@kernel.org Message-Id: <179605500675.3403811.7621253363656924847.git-patchwork-notify@kernel.org> Date: Mon, 30 Nov 2026 16:10:06 +0000 References: <20261123063842.64536-1-juanagusnicco@gmail.com> In-Reply-To: <20261123063842.64536-1-juanagusnicco@gmail.com> To: Juan Agustin Niccolini 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 Hello: This patch was applied to netdev/net.git (main) by Willem de Bruijn : 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