Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1715580rwd; Thu, 1 Jun 2023 21:50:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PEk76fr8/fk3esS+xEg4pSRxtHIOzFiDzTSG6WYQKl5Dif1yRTSHcZ+fBCKJ5Fk5hkpwj X-Received: by 2002:a05:6830:154e:b0:6af:6f25:48c with SMTP id l14-20020a056830154e00b006af6f25048cmr1616949otp.3.1685681451590; Thu, 01 Jun 2023 21:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685681451; cv=none; d=google.com; s=arc-20160816; b=etVjErVgog1tf8AVu6Zl6GeFcwdyDHfTSKgbIdxRHCqrB4Z6PcXBV4DQerQzZQM2z4 AZBts/vsk+w1sqZJ7AZpZO8S30PiY20sz3o4SkCP9PhagnmYpLnQ8QodI4bqsj7hXuVy l7zO1dWaH+bxl7pVnAcfXYOunyp+KeTrpRSyicw0U83d4uq22Priqa//53Erxfuubt3r Dizq94hv6ukWd5mTzh4Tg2NfutaJXto5WgP6jnBHCV+Xq7d0umDC9eH28qTfyMNDh7ay Aqlo22z3AN2TmSSVJc0hJJUFRAlIEEAlDDxjXPmvugSoPBwCsXEf0ndcG+dFvzmok6uK twJQ== 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=1fDr2P6ScDRHlbadwBzl4s28y9ON8v1iOcdZgZ3duVM=; b=yrgLuexpOpVw3WM57cAldfEPMNNaIBKOhi2w7fQzRwzXMzz6T2gCvqzj5H981fqwjs XMCyc3xi/7g+PFAqrZqaWHEVESv06234pIEkSPbBIOQUjEMNd35poYhg5onyUwEY2Zy7 7YF5LvEJ91qE/dT0jyaJRRg7N+uRlE6+K5SlyBo2dS7NbpJsXbQeWk/BMy78glEooRcF D+MWCYfi4XtAV+SzANXMtjnUkA66yA9RjBUCgBIgEOn9l6ZSW8kqqZ08GCssLSh3YGfA xAzBW/yszcWUDxi3sieYDc/SSump3SsngBFA4bupafhHekas9PcdpP7iY4euRDzGFv9R P09w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LowUN665; 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 o25-20020a637319000000b0053fec3ed061si355561pgc.718.2023.06.01.21.50.39; Thu, 01 Jun 2023 21:50:51 -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=LowUN665; 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 S233473AbjFBEUs (ORCPT + 99 others); Fri, 2 Jun 2023 00:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232019AbjFBEUr (ORCPT ); Fri, 2 Jun 2023 00:20:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 344D6CE for ; Thu, 1 Jun 2023 21:20:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C00F564C17 for ; Fri, 2 Jun 2023 04:20:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A69BC433EF; Fri, 2 Jun 2023 04:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685679645; bh=Pe0QdSQELFT4UssZ7PzgR16P5m3tS2P0+wxp1GZ38R8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LowUN665zQHa0uvTb3FnPncpJmTOU6V2ezCMk2A4eHRfj+xwdSDVcHJs4RdFlpstW zW3i/m8g7NW8lAW9X3/pjRFZ5jvXN2qa8OSBxZvXmoWoRJw3+8TRANQ3xS2EqdRI6G L07LXvfPQZsAb6LuqM0HiliMdKF4y3H91+NyH5SlFkozs7p4OZuDlRGs4H1brxJmvG VZ32nd0UfpnzlyFdYqrLLJiX+t9MYpAO+lGLsBVWMfsGU1qC6L0gob7FBrQ8EgnKj7 kNccbpYblBEcC2jhymk1mzJ9+SZ/RPV5NBQngac++E/466iVqdsGurLMrvvir2Cue4 p5HuUQAOL7BFQ== Date: Thu, 1 Jun 2023 21:20:43 -0700 From: Jakub Kicinski To: David Howells Cc: Linus Torvalds , netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Chuck Lever , Boris Pismenny , John Fastabend , Christoph Hellwig Subject: Re: Bug in short splice to socket? Message-ID: <20230601212043.720f85c2@kernel.org> In-Reply-To: <909595.1685639680@warthog.procyon.org.uk> References: <20230524153311.3625329-1-dhowells@redhat.com> <20230524153311.3625329-10-dhowells@redhat.com> <20230526180844.73745d78@kernel.org> <499791.1685485603@warthog.procyon.org.uk> <832277.1685630048@warthog.procyon.org.uk> <909595.1685639680@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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, 01 Jun 2023 18:14:40 +0100 David Howells wrote: > The answer then might be to make TLS handle a zero-length send() IDK. Eric added MSG_SENDPAGE_NOTLAST 11 years ago, to work around this exact problem. Your refactoring happens to break it and what you're saying sounds to me more or less like "MSG_SENDPAGE_NOTLAST is unnecessary, it's user's fault". A bit unconvincing. Maybe Eric would chime in, I'm not too familiar with the deadly mess of the unchecked sendmsg()/sendpage() flags.