From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D7C2EB64DD for ; Fri, 4 Aug 2023 03:14:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231445AbjHDDOe (ORCPT ); Thu, 3 Aug 2023 23:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234088AbjHDDNP (ORCPT ); Thu, 3 Aug 2023 23:13:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D611A49C1; Thu, 3 Aug 2023 20:12:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 74F5461F20; Fri, 4 Aug 2023 03:12:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 049F2C433C7; Fri, 4 Aug 2023 03:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691118733; bh=JRNDrr8Q5XicQAEnr/UMUDvJf9uks/FyRXeJTq4Lonc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=R0WGwn2s0vAe/DsI3XGK11OMvfOJmtznPvIDw84m40aHVTpIpcqb2BBYLuzfuLVXk dZ9acA9IAQwtQzTU28t9fuHvoxracxbRDCqOkzLX1LeJe0NAsASu8TMADmINbZgGdd BX1P/gy9WCmjlM0BVG0hX4jELQWFjCNAAo0NB2evy4APrirEumPedKRUVDBkxVBYCa fUd1SRVIjlviVLoEWElgozH8jaA3DN65SmuYGQbu3LeHFnLKFAiUC4/TJ29BR+GhsW RhGkM/EcwsZYTxHL13maI270zR85GYjtNQTRlmot3tdxlHuqRiD6Jvh+6E17duy9Fk pAi6/OWVkJa3g== Date: Thu, 3 Aug 2023 20:12:12 -0700 From: Jakub Kicinski To: Tariq Toukan Cc: David Howells , netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Al Viro , Christoph Hellwig , Jens Axboe , Jeff Layton , Christian Brauner , Chuck Lever III , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Boris Pismenny , John Fastabend , Gal Pressman , ranro@nvidia.com, samiram@nvidia.com, drort@nvidia.com, Tariq Toukan Subject: Re: [PATCH net-next v10 08/16] tls: Inline do_tcp_sendpages() Message-ID: <20230803201212.1d5dd0f9@kernel.org> In-Reply-To: <852cef0c-2c1a-fdcd-4ee9-4a0bca3f54c5@gmail.com> References: <4c49176f-147a-4283-f1b1-32aac7b4b996@gmail.com> <20230522121125.2595254-1-dhowells@redhat.com> <20230522121125.2595254-9-dhowells@redhat.com> <2267272.1686150217@warthog.procyon.org.uk> <5a9d4ffb-a569-3f60-6ac8-070ab5e5f5ad@gmail.com> <776549.1687167344@warthog.procyon.org.uk> <7337a904-231d-201d-397a-7bbe7cae929f@gmail.com> <20230630102143.7deffc30@kernel.org> <20230705091914.5bee12f8@kernel.org> <20230725173036.442ba8ba@kernel.org> <852cef0c-2c1a-fdcd-4ee9-4a0bca3f54c5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Aug 2023 14:47:35 +0300 Tariq Toukan wrote: > When applying this patch, repro disappears! :) > Apparently it is related to the warning. > Please go on and submit it. I have no idea how. I found a different bug, staring at this code for another hour. But I still don't get how we can avoid UaF on a page by having the TCP take a ref on it rather than copy it. If anything we should have 2 refs on any page in the sg, one because it's on the sg, and another held by the re-tx handling. So I'm afraid we're papering over something here :( We need to keep digging.