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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46ECDC4708D for ; Mon, 12 Dec 2022 14:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232120AbiLLOfh (ORCPT ); Mon, 12 Dec 2022 09:35:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiLLOfd (ORCPT ); Mon, 12 Dec 2022 09:35:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C694B11453; Mon, 12 Dec 2022 06:35:31 -0800 (PST) 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 835B0B80D53; 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 Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jiri Pirko , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, aksecurity@gmail.com, ilay.bahat1@gmail.com, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-mtd@lists.infradead.org, linux-scsi@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/5] Renaming weak prng invocations - prandom_bytes_state, prandom_u32_state Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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