Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3030878rwo; Thu, 3 Aug 2023 20:40:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESm4ID0wLkWjZxTBGCUPpvprUgTqMbD0HVM3CS1/7QhTiYAwoh/8e9/76gZDqoDAm2/Np2 X-Received: by 2002:a17:90a:c782:b0:268:e43a:dbfd with SMTP id gn2-20020a17090ac78200b00268e43adbfdmr631026pjb.1.1691120455860; Thu, 03 Aug 2023 20:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691120455; cv=none; d=google.com; s=arc-20160816; b=fueqSO4R061/I6NRmNLPyeO1ETkTVMVehdnXnrzS+Gf/1J9pRmBtlDDULDE45NUd2p BYW6rxvvRpGkX1qIYUsJ2Q8BUaNQmI6NUWO1qXm1K79nRv09xrNVtZoYrgyR1hNcOkKl 8V3566YZmJZN86QFsjNd+PYjNi3R2/P7uum1jRX5sx1fpbdWqUQUyczYs6Du2DdbEQA4 UV4iRrMWoNHS2cKGchDGdfvslgB1SckvZPNahy2p8NYzImmyLzuul/TpFT67d1okND9A ibAU1LyRXmGNcpPfWZSex2/sGvYpeTNJda85ZkVUOPFbhN/UjuArZ4L2KCbm/k2aeDL4 NhZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=JRNDrr8Q5XicQAEnr/UMUDvJf9uks/FyRXeJTq4Lonc=; fh=xPmNu/zb4TJmzSCohQ7keUNq+Pr9uTZvqCyxPJaP82o=; b=d8FiQRoLATTNXsYUYtHUkTmc+FLmOcstoOo37rCQ69MIsTK1LimR7pWNplHqvKc653 E6O7sY8NuSu9w+9yqgzQI9+WwpHRIId5U+V5CWU4cF3aGdHBL2J0liy0zDVY2jmeXBcV 6/22f8F5PXxUfvk+ZoepdpYJ+X86t2Q/u94XFK9DCRAEpbZp5ptnD+/ClFGhWDYsFKWO LoTtPx7Efy7PAdlD3HSonj2JbCk8Zii+8MeBCmIKbi65XOZtOgCmkU6tJOuVCFbEBZZr CovC9uZ6KjRCfjJ04MVDWkWfndvc7swPIjGj7x8GQEbYzu6glJxtvsbXb0fnK40HkFzW ibJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R0WGwn2s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mm22-20020a17090b359600b00263a99b8448si1153479pjb.113.2023.08.03.20.40.43; Thu, 03 Aug 2023 20:40:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R0WGwn2s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233081AbjHDDO3 (ORCPT + 99 others); Thu, 3 Aug 2023 23:14:29 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.