Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp490993pxx; Wed, 28 Oct 2020 09:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmvoLjzGHR6vXxSv4eX9anFLtK14F4+g/ch9wJonQocLnke4PW0C1y8NGHQZvsVQW1WLpS X-Received: by 2002:a17:906:25cc:: with SMTP id n12mr8105568ejb.488.1603902658809; Wed, 28 Oct 2020 09:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603902658; cv=none; d=google.com; s=arc-20160816; b=XavhnZRCr8tN1vy44P6MRV8+/J7IFBqRd16jArS+rozmVHgwD1+XoRiVgq2uJJ71S1 8rBbPpXRCQUrCvo/sXvoqPMO2ymcKeG2NYZYpnTE5Q9i4AMkUZs9jy5HTvGnHgraPQtM Sg0adsSpkhUBVpS0R4zmN2EUlIOHmm+YnQDpezM6ArUJ89AtvG05Iiet4rveg1SkoRut jC2bfMSxHRmNx5lUNz7rLIUeyjxM+r1xqvKtypTIpMUcfCKfq5Cnw9dVOSUdU0Sug4Nw 8Nzetq9D/vbVdQogY5OjLFL3FkEoeOULU6TOlU3oerqlKHz1ZkuEZwG00H79uju48Jqn A81Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=EZh4dD1BclvwLujcBPVgM3Mq+6Z122xJpilQyOiTFeA=; b=OxX8oCmGg2i1jr4ib7bZnRrAPSxMxZxhBa9j6yZNAFV2WLTkYDQ4NDjKdMEPmW1ReP Vnu5ey5XBWGNsV8O0lXai1HxCa9H7rE5ZUANlHdfGzDJZ6OqHIhfR1REhqZLww+fa8X2 jgKsOgkaAOIjnyV0W8Ws1D2+9oTKaKPGSC7/ukQ0UDD3EnQo9K+UHQ8a7qJIJfN0T6Y5 DqmjcLfhP/qI+Z0jQ+d9jDkJWDncN7b1j/02QbB9aE2iC6gwHUktNhE4hj10fotHbZp/ Bf2KknsrvdQQ05JYZrOcjZg57B7Nk4fUBcNiKF8twqRtshc1pT0ID4tjr24B1kIK3bkG z3YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu23si3620690ejb.83.2020.10.28.09.30.36; Wed, 28 Oct 2020 09:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1817012AbgJ0RMC (ORCPT + 99 others); Tue, 27 Oct 2020 13:12:02 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:45974 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1786275AbgJ0RMB (ORCPT ); Tue, 27 Oct 2020 13:12:01 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 09RHB2Ch015504; Tue, 27 Oct 2020 18:11:02 +0100 Date: Tue, 27 Oct 2020 18:11:02 +0100 From: Willy Tarreau To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Amit Klein , Eric Dumazet , "Jason A. Donenfeld" , Andy Lutomirski , Kees Cook , Thomas Gleixner , Peter Zijlstra , Linus Torvalds , tytso@mit.edu, Florian Westphal , Marc Plumb , George Spelvin , Sasha Levin Subject: Re: [PATCH 5.9 639/757] random32: make prandom_u32() output unpredictable Message-ID: <20201027171102.GA15452@1wt.eu> References: <20201027135450.497324313@linuxfoundation.org> <20201027135520.535662993@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201027135520.535662993@linuxfoundation.org> User-Agent: Mutt/1.6.1 (2016-04-27) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Tue, Oct 27, 2020 at 02:54:49PM +0100, Greg Kroah-Hartman wrote: > From: George Spelvin > > [ Upstream commit c51f8f88d705e06bd696d7510aff22b33eb8e638 ] > > Non-cryptographic PRNGs may have great statistical properties, but > are usually trivially predictable to someone who knows the algorithm, > given a small sample of their output. An LFSR like prandom_u32() is > particularly simple, even if the sample is widely scattered bits. (...) I'd have let it cook a bit longer into mainline before backporting it, first it's not small (a bit border line by stable rules), and second, considering how long we've been with the previous solution, there's no emergency anymore. The risks are essentially at the build level though (e.g. include hell on exotic architectures, or obscure driver trying to make use of one of the removed functions maybe). On the other hand, given the amount of tests that run on the stable queue, we'll quickly know! So we can probably keep it for now, but do not hesitate to drop and postpone it if it causes any trouble so that we have time to investigate. I'd rather not go through the previous one's repeated breakage again! Thanks, Willy