From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 285EAC4167B for ; Mon, 12 Dec 2022 14:35:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D7F5891CC; Mon, 12 Dec 2022 14:35:35 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 313A3891CC; Mon, 12 Dec 2022 14:35:32 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 9C246B80D8A; Mon, 12 Dec 2022 14:35:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B7EEC433EF; Mon, 12 Dec 2022 14:35:23 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Wl6pADoH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1670855721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1KyY32z5nf0Lu8vM4J/2IpAlTcstrOO9+asdsS0mdQs=; b=Wl6pADoHCtIIbQYtGWyzoK0/ft/6K3+8UZfyGZQbHCn0OgumkLD978IERouS9rLh91V7py ofol1dOocMk4p1DFNAhuJ2rC6+TlFlqFiUo0IADIb6l2vBWdPsmninRN5yWI9N/OpXZpdd 5BCaUAKkpp98C6Hq6gwjcSOdDz781ww= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id db04abc2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 12 Dec 2022 14:35:21 +0000 (UTC) Date: Mon, 12 Dec 2022 15:35:20 +0100 From: "Jason A. Donenfeld" To: david.keisarschm@mail.huji.ac.il Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Intel-gfx] [PATCH 1/5] Renaming weak prng invocations - prandom_bytes_state, prandom_u32_state X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vignesh Raghavendra , Peter Zijlstra , Dave Hansen , Rasmus Villemoes , Alexei Starovoitov , dri-devel@lists.freedesktop.org, Song Liu , Eric Dumazet , linux-mtd@lists.infradead.org, Stanislav Fomichev , Miquel Raynal , Roman Gushchin , Christoph Lameter , David Airlie , "H. Peter Anvin" , Daniel Borkmann , Richard Weinberger , x86@kernel.org, John Fastabend , Andrii Nakryiko , ilay.bahat1@gmail.com, Ingo Molnar , Steven Rostedt , Jiri Pirko , David Rientjes , Yonghong Song , Paolo Abeni , intel-gfx@lists.freedesktop.org, Petr Mladek , Jiri Olsa , Hao Luo , "James E.J. Bottomley" , KP Singh , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Jakub Kicinski , Borislav Petkov , Hannes Reinecke , Andy Lutomirski , Rodrigo Vivi , Thomas Gleixner , Andy Shevchenko , Andrew Morton , Vlastimil Babka , linux-scsi@vger.kernel.org, "Martin K. Petersen" , linux-mm@kvack.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Pekka Enberg , Sergey Senozhatsky , aksecurity@gmail.com, Daniel Vetter , Joonsoo Kim , Martin KaFai Lau , "David S. Miller" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Please CC me on future revisions. As of 6.2, the prandom namespace is *only* for predictable randomness. There's no need to rename anything. So nack on this patch 1/5. With regards to the remaining patches in this series, if you want to move prandom_u32_state callers over to get_random_bytes() and get_random_u32(), that's fine from my perspective, but last I looked, there was much usage in places where being repeatable was actually the goal - test suites and such, where you want to be able to redo your tests with the same seed. So you'll have to look at each instance case by case and convince whoever maintains that code that they don't need predictability. However, if you do that, the right functions to use are get_random_bytes() and get_random_u32(). Jason