Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp687885ioo; Sat, 21 May 2022 10:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/TZLt4OUgGj67Ey4VHQROqart00sp51JSDk4osaF8L6jLZ5glR5xkfcxrFpjelwm42dML X-Received: by 2002:a05:6a00:885:b0:510:950f:f787 with SMTP id q5-20020a056a00088500b00510950ff787mr15478935pfj.83.1653155536846; Sat, 21 May 2022 10:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653155536; cv=none; d=google.com; s=arc-20160816; b=D42YGBy5KyxMi8j/4COQ0u4/9IrKRLXlm64Ve9Z9w4+GzlQciTFNjhfe3z7maYWhrF JO4oJnC6KczAUl4AOTlqaE1L+eYjbvhjpudcLaE5tY7BIWIOJ388QJxBfwlaz0baKU3y U3MAhAZpW5HhxqkJ4KurFg1TQ1Zg0/SUfnw3YawYVKHvVhgs2luczcjybaO1DZB6EqTe cl9yS0xnOCfx0gzmlcfXJUpVjtKlNBUl8H6MH+Q4Sm1TrA40kBlTas/io9tgu195mOEo jM1iQWnD3iMicQcXGQJkXlxvGa+HJf2/YrutkXp0al3xjEq+6kgtbESU/23xTaRrU/rb /llA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mfhBwZcnaZ54WaOWHFXsaT0BxNawadzJQv+waAwgHL0=; b=TjxnGjQN/ypoKKXb8jB0UMBKUD2EtBqc+tYWz9aBbkiULFGOmh74dGRAZAgZBpBc75 fGeLu9NxYGBVNvKGC4es0Dkar97E/5zUaGUCwGp8r/istBGLOD/JHShEmgfMmQWyqYTc TiRjmMV/IALhw2P5Fg+PMdqr3Syi5tEDPBVfb6OYI1n8RieoRNOQo5JImwT8J9jgnpWF klJGkHO+unj85/VjpavK0+f+Goqf9DntepvoV6g9KR42NOsAWTcZ5PWdLNap0olH19IM ELXpOIpu2NvxVyBAPTetWJvA+ceQMEWtSkNMV8FC43VAtDIPg38eQgYaF3iqEMKZOld4 r/SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=OSX44A4p; 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=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a62e80d000000b004fa3a8e0087si7151728pfi.318.2022.05.21.10.52.03; Sat, 21 May 2022 10:52:16 -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=@linux.org.uk header.s=zeniv-20220401 header.b=OSX44A4p; 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=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349224AbiETQPX (ORCPT + 99 others); Fri, 20 May 2022 12:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235490AbiETQPU (ORCPT ); Fri, 20 May 2022 12:15:20 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DE281666A3 for ; Fri, 20 May 2022 09:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mfhBwZcnaZ54WaOWHFXsaT0BxNawadzJQv+waAwgHL0=; b=OSX44A4pUo8LP0BG7RuO/YC5Tw 2Qo6nCV3BGBkYPqfEcunShihpgpX5FIBj9i5epCkYNqapazT0V6xpqOXJLl0mE7OLEufpvk1TVmMK /ZKXneGPg2WyXUzlbFjxEpOHJt2xjvokpQqqeV7TBLLVo2lfaLkgfOTuGc+IiPIiw855On+HSKVHI JeXVWaObADNZ6UlxEp9Tyw1ZPdyPyiwDE6Kz+GRAitrMSo8Yy6MuA5UAjRAuvJqyYrMcFk1PbyDfa 1xgRrfLVjBYz1pk65nj+RjuZGGQRhk43aaiC+sjdkNh+6USxmsGPq8ZX6oWCZxxer1Ur/sTLwmkVY 87aAeFbA==; Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ns5HY-00GdoN-Al; Fri, 20 May 2022 16:15:16 +0000 Date: Fri, 20 May 2022 16:15:16 +0000 From: Al Viro To: Jens Axboe Cc: "Jason A. Donenfeld" , Theodore Ts'o , Christoph Hellwig , LKML Subject: Re: [PATCH v4 0/3] random: convert to using iters, for Al Viro Message-ID: References: <20220520094459.116240-1-Jason@zx2c4.com> <7e78d6a7-1cc3-2408-fe91-0329f5020e77@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e78d6a7-1cc3-2408-fe91-0329f5020e77@kernel.dk> Sender: Al Viro X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, 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 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...