Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp2176837lfo; Fri, 20 May 2022 16:34:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwObi3z6tOgSetds9lgCL6FGbYs4NqxAMe9Mli8hfoIgIZwiDB/jCIkd+MpxgW1SSKC7x51 X-Received: by 2002:a05:6402:2031:b0:42a:d157:66e9 with SMTP id ay17-20020a056402203100b0042ad15766e9mr13616531edb.395.1653089658826; Fri, 20 May 2022 16:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653089658; cv=none; d=google.com; s=arc-20160816; b=aiV2yNpateT4ZDJQT+fRxxs7+zA4GkpI1blnXrC0Fj0ktEbMTCh+blOVzQ+GyWAh6q wr2kcA6KIqGGrW9uNn8kT2T1v/LlmHN+NR7YqLF2hBn0VlNY8PyKKTDlhAijw96Kd/wh HuI2zEGIuwQqHoDN8gxKbR+wQvShZDi6Pc0W/uH3uhes0uJk7vGrPjWytv8sjCJbJxIo uaZP/RsA4UqyJJBC+3vrasVlS5ZkNeilSNvxH0m3LX0z6W6gXSwofmJYXZZ4s+B3qyOw lTNIaED+He3jESJ3RmuSSKBQZkbBQOcw0/ocmtkJ37dEh0pMtQ94Mzect+oQLu+0KWMA 8zfA== 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=Up48slLLXklbScKjS7/klG/4sx3wupJAFkj4Y/FraRs=; b=x8mvAD0ri2BfghduUY2AkScGVWsS5z94Cb5UNnEymHEmMQ4sWEqdy82pki7FXRAAx/ uHcQflXmVAYBm9WlCKDABhEhrBX5a1FO3OOW/6pu047eiS3SpsjVv1jdrO9jBPFwp5GJ bwoVgT2rGYbJ9yeM3VyU7niWdGYDgaFnac9do0u03ZipMtewtgJ8JaduTYeTSO3OOWRi FSkQ5gG07Fawvk/m3iKWleOrwulQFpjJhReNlsHCJ0p+fqVszn8VtzwfulNtF/dF3+TM yPPvkI8Z1/B19j5uW/6pIo9M5TvmnHdLVTAF5wFInOn0elPa4yAMj0KOIFfaNmkVTQn9 Z/xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=KPHAmma9; 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 fr30-20020a170906891e00b006df76385ea2si7702705ejc.834.2022.05.20.16.33.52; Fri, 20 May 2022 16:34:18 -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=KPHAmma9; 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 S1351580AbiETQYm (ORCPT + 99 others); Fri, 20 May 2022 12:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351574AbiETQYk (ORCPT ); Fri, 20 May 2022 12:24:40 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ACF017D3BA for ; Fri, 20 May 2022 09:24:39 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id z3so6654964pgn.4 for ; Fri, 20 May 2022 09:24:39 -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=Up48slLLXklbScKjS7/klG/4sx3wupJAFkj4Y/FraRs=; b=KPHAmma9oKN1ewvN1W6iAV8SGt3iITADLc/ZUOTV723rXPR+SmD+N7JjGaI6Xsg1NK PoAlymoTFt9amGl5099Dvl61Z+E0wRR0/UAwha4i1Jor1wp0xe/7T6/QCY/LSl9NZXun o2vWbkFQ0Zp2pId8y3c/y/XuEZzekP/QQrmZ/VDwmOAqWW3h+Pydlr+Uc8pdu6ZAoEbV dsK2FQM2v2XMQ7SezECWga9/pMvN0+zl9Uu4nIyw6kht7YalkNMnM5lSRSLJ3o4IXhAE RCvMFmAnJCD9cPnSoj8X9xxmIMrCPUW1cps+0njiflhaYAWPQtbxODH8TBN0KR1+JguK 5Yeg== 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=Up48slLLXklbScKjS7/klG/4sx3wupJAFkj4Y/FraRs=; b=jzOtCcfxMOmuU1o1mJ2cpI4gQ2IDOfV0yoVwlbVmG31wIE/FUWw1TjXIlvHlRfPiL3 R9z+hR/eFHkzLK5symAUL5xsEQq4MJqqKzhb0AQ634xIAuazAp4awH0gPNLoUjYulnlC f5DqQ7gMNlkx3328wVJA1xHg5/XASXZ28c9rlY8BINDvNNgPPQdWzJHqjY8h4UnFfo3a 1PE7HquOA9lH43feUJC1Roy2c7YgReVZbHclxS0FwDZ0bshnPrdSEmHi61LY64vKYgYJ 7VLtFkrVf/F/KRec8PX0MIupAnbUmsBS+gO7azbqjr8f5bU8CxnZNHsS02yHn4yQEBRu i+Iw== X-Gm-Message-State: AOAM5337mF/ZhJOPRGe4YFAMwWbNiWi/wbbCz+VE9XOn21KsbRfz5RiT g8m1YyhLzRUOSZwj68zbZbxeWA== X-Received: by 2002:a63:350c:0:b0:3c6:bf88:1509 with SMTP id c12-20020a63350c000000b003c6bf881509mr9111619pga.144.1653063879002; Fri, 20 May 2022 09:24:39 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id x7-20020a170902b40700b0015e8d4eb254sm5762558plr.158.2022.05.20.09.24.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 May 2022 09:24:38 -0700 (PDT) Message-ID: <69bd18e6-d216-dfb3-201b-f6a285deb0e7@kernel.dk> Date: Fri, 20 May 2022 10:24:36 -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: Al Viro Cc: "Jason A. Donenfeld" , Theodore Ts'o , Christoph Hellwig , LKML References: <20220520094459.116240-1-Jason@zx2c4.com> <7e78d6a7-1cc3-2408-fe91-0329f5020e77@kernel.dk> 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 10:15 AM, Al Viro wrote: > On Fri, May 20, 2022 at 09:53:30AM -0600, Jens Axboe wrote: >> On 5/20/22 9:47 AM, Al Viro wrote: >>> On Fri, May 20, 2022 at 09:34:46AM -0600, Jens Axboe wrote: >>> >>>> I'm very sure, otherwise we're just accepting that we're breaking real >>>> world applications. >>> >>> "Breaking" as in "it used to work with earlier kernels, doesn't work with >>> recent ones"? Details, please... >> >> Yes, as in exactly that. This is what drove this addition of >> ->read_iter() for urandom. See commit: >> >> ommit 36e2c7421f02a22f71c9283e55fdb672a9eb58e7 >> Author: Christoph Hellwig >> Date: Thu Sep 3 16:22:34 2020 +0200 >> >> fs: don't allow splice read/write without explicit ops >> >> related to the set_fs() changes, and now go look for any commit that >> has: >> >> Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") >> >> in it and see that this isn't an isolated incident at all. >> >> tldr - splice from /dev/urandom used to work, and I recently got a >> report internally on an application that broke on upgrade from 5.6 to >> 5.12 exactly because it now just just -EINVAL's instead. > > IIRC, Linus' position at the time had been along the lines of > "splice is not so good ABI anyway, so let's do it and fix up > the places that do get real-world complaints once such appear". > So /dev/urandom is one such place... That's what Christoph said too. Honestly that's a very odd way to attempt to justify breakage like this, even if it is tempting to facilitate the set_fs() removal. But then be honest about it and say it like it is, rather than some hand wavy explanation that frankly doesn't make any sense. The referenced change doesn't change the splice ABI at all, hence the justification seems very random to me. It kept what we already have, except we randomly break some use cases. -- Jens Axboe