Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1125996ioo; Sun, 22 May 2022 04:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKNE0OigwTEC7PB6LMrp4Yb8AxmkyabSBnuTau7smAc64WxKinITQNjrcOvknFgAiV6Aa5 X-Received: by 2002:a17:902:82c7:b0:161:4936:f068 with SMTP id u7-20020a17090282c700b001614936f068mr18289868plz.145.1653219586879; Sun, 22 May 2022 04:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653219586; cv=none; d=google.com; s=arc-20160816; b=0eOeqhcHtVkQHzHlhFxjZNgwn0Qd5MN159xd1NJBt5e01Txvl7SjMSxlVvzcGZ792P 7ldM5bjiN3uFMe1o3hMWV3iCh5YG37zWxp4AMV1rDkmL/gHkiikyfEhMv1fL+pXF0Gkw h9XpEi8f0/fFVOzRg8iuK0MCKLLr4q/PZmve4cXQxkSAYWj/fZvA0eeyHTp7fqp+El/Z jBYEIg6oLIEth1YN1OzIZW0geIaI8zVjFWcgN0km3sor9W6Gj0Tbd3GMsrk6mmjh17bt cBHG2OODExAR2RUxBgBold55sC8WhIf3Qs2Wdf/V4fGOhck+HW+J2H/JHbkkHljc7ygL n2dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xfBgeP+UgAMyYfuiGkyqd7pK8/GplNN5B8Npca/gXrU=; b=cqZ2Irz/IfMAiI/jBkfJAm3Nc5WjDvU7VpNx5TbnAEM4Fx+fetsz9V9RSCOOh4Utcr yQgFHyy+gChIwR9km/tHGPhRrCnYzbB7S1WaRTOu7r2qYHDzz0S1YI7AjIaAq5zXa8YM b9Cj12melbCKF4vdt14duII+eqoEV9w27RI5674i6Yp1ypLAK/Qb2tP5fz8RLd3jgbBb d2v2KDUb7InaFE4NspLrW+Du3HX8ZTB07V8pWVKE/3jIG+7u9jPTBQ4Eq7MNLL0JkaIP +PiEMu27ZXGG0LqYSsfUzaEguJhvbq/JaQZ34ENVDB0nf4nxbu54lfC9gQVP8+mkUoi4 gBEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=VWDoik0u; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u25-20020a632359000000b003db37953ca2si6099135pgm.577.2022.05.22.04.39.35; Sun, 22 May 2022 04:39:46 -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-dk.20210112.gappssmtp.com header.s=20210112 header.b=VWDoik0u; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351097AbiETPva (ORCPT + 99 others); Fri, 20 May 2022 11:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351150AbiETPvL (ORCPT ); Fri, 20 May 2022 11:51:11 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C651626AD3 for ; Fri, 20 May 2022 08:51:09 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id h13so1819539pfq.5 for ; Fri, 20 May 2022 08:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=xfBgeP+UgAMyYfuiGkyqd7pK8/GplNN5B8Npca/gXrU=; b=VWDoik0uRyKjQxUY61C7iGAe6NewO9iV3x6sawu7TsoWZFNg0exUyQsQbZdkCShwGz +msUoQm+GBl3pOGflb6qYhg+63NIIpggONq3HuDEFsJcg+JiMxpHNzPRehtayeWt+Ppf RMZJ5RffTkSyQKogyK4R+a1uzOpn+zTsjArt50tDFzVVA7b2MenSopjmCxKRi9iGz0JY 8YsCIotgZcYNdZWkM3mLU2IGuxfyMuoyk43kPLMfgQ7QbHydwWwLtmROtvX1BANjQ2aX pIWiVM13riwmh3RlHhgGJhYKGI3xaWyIAdnaX2mG9/440NSAOLmbOpJOdgbH3Nc3+APq tg4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=xfBgeP+UgAMyYfuiGkyqd7pK8/GplNN5B8Npca/gXrU=; b=Ia9e451fLp8/2B49gHOwl1DwjSZO39VjAdf1/kkn8K7oZMiaRBpGpISkrqctorwC1i 0MfxEjwJevZEWTuPbu2LpbdzUijrGQa8DPSQyzazbsDpxX9MRKdpj14saMQtLjBjIjWw mTViSWFZL2Oxn5XyakPJbH23C9hODFYHyHtjw9Gb9acgOgDXeybaZLy9z3Ngyb3YATfe dNLl6YMsNbCB1l0bo5KOPvhtp9gVM1NQRj9vrAr2HaO97dVX4CXMLuZ1QFiuMHjNO42A OCrRdhsCHWFBpux4Ai1DqlNW5OwNZKJZgQk1q3Pd5Gmioz+89RdeyVoSRPpHD8E8Vqvy x4kg== X-Gm-Message-State: AOAM532lzTQoK3/f5EhN9jMQav4C59bLRnQBk2H1CyqpzpK3e3v/Z2l8 HY/l2kLEhpX0PWXsAhGOmJW4YA== X-Received: by 2002:a63:1b49:0:b0:3f2:cf90:5ad4 with SMTP id b9-20020a631b49000000b003f2cf905ad4mr9019159pgm.450.1653061869174; Fri, 20 May 2022 08:51:09 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id e21-20020aa79815000000b005104c6d7941sm1988370pfl.31.2022.05.20.08.51.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 08:51:07 -0700 (PDT) Message-ID: <72344aad-b5ad-b317-d36d-385cb16d5204@kernel.dk> Date: Fri, 20 May 2022 09:51:06 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v4 0/3] random: convert to using iters, for Al Viro Content-Language: en-US To: "Jason A. Donenfeld" Cc: Theodore Ts'o , Christoph Hellwig , LKML , Al Viro References: <20220520094459.116240-1-Jason@zx2c4.com> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 5/20/22 9:46 AM, Jason A. Donenfeld wrote: > Hi Jens, > > On Fri, May 20, 2022 at 09:34:46AM -0600, Jens Axboe wrote: >> On 5/20/22 9:25 AM, Jason A. Donenfeld wrote: >>> Are we sure we really want to do this and need to do this? >> >> I'm very sure, otherwise we're just accepting that we're breaking real >> world applications. > > Would we really? I always thought splice() and copy_file_range() and > sendfile() were all kind of "special" in that they mostly do not work > for many things, and so all userspaces need fallback code. And the state > of "mostly not working" has always just been the norm. So broken today, > working tomorrow, broken next week would be par for the course? I might > be *super* wrong here, so feel free to say so, but this has been my > general impression. No, I think that is exactly the wrong impression. If you have an application that is written using eg splice from /dev/urandom, then it should indeed be safe to expect that it will indeed continue working. If we have one core tenet in the kernel it's that you should ALWAYS be able to upgrade your kernel and not have any breakage in terms of userspace ABI. Obviously that can happen sometimes, but I think this one is exactly the poster child of breakage that should NOT happen. We took away a feature that someone depended on. This situation of splice being flakily availably is new from when it was decided that it was OK to only have it be available if ->read_iter() and ->splice_read() is set. And that is very unfortunate. > Anyway, I do like the idea of supporting splice() and sendfile(). The > performance hit is just kind of sad. I like the idea too, but this is deeper than that. We simply cannot just break existing use cases like that. Thankfully we do have an option here as I outlined in the previous email - keep the ->read() and just add ->read_iter() on the side so that splice still works. Is that ideal? No, it needs more code to support. But hopefully that can die at some point when the performance gap is such that we no longer need to worry about having ->read() for those cases. -- Jens Axboe