Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6843520rwb; Mon, 12 Dec 2022 07:06:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf7v0/WifyhRtZWzaPTMpA0nKjtjChTKFd8GwBAZuZaujo4EJGtf9Sk2dy0/PZ7axk/waT5t X-Received: by 2002:a17:902:ec8a:b0:189:bda4:4a39 with SMTP id x10-20020a170902ec8a00b00189bda44a39mr20617579plg.49.1670857601392; Mon, 12 Dec 2022 07:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670857601; cv=none; d=google.com; s=arc-20160816; b=MuwRY98C3Y1dpF199DovXivRMHnhXTdG4uV873aZx3ZkDjZeHqFRP4fU38MbZuzVo+ QxPERNr0lS2X2z9zpFCzuj4wW+O4uLY6GFCxs+jlqNJp/j1rjqYpTWpQUg6yinOxUIbz cVaeRTH1L34tWN4NQTIrPSruUhu0zKikfqOqfkWAgaNplAHWk2AjyCtXfX/UvofQjHnF NqYKGeu64X1yRnAKm1NwBjh3Yh7x13hVsWAVuYi6f9rAK2HBArKfVNQ/Wu4t1mWnWYuU 0IR0O3TqbTgV2JykIgwyrS2NjOMMH6snBRyTs8CZmddKOPrYDdtzr2xHn9R8IcYlFUc5 CMqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1KyY32z5nf0Lu8vM4J/2IpAlTcstrOO9+asdsS0mdQs=; b=Z3Y0ysiQTWUMdtS1P9pFvCwgKaKsgZdTZ1qlZF8RiVSs37LD+4UuyPdcRalFK8p76E nHVxiCmryVBhid/b56uVrqhfxrJVver/me5z46YZI3Q351b5PNj5Gchj7qKo+4VDSaqO pk/Tg3kSUpAnUovYXkIIirN4FWNJ4EQUmzhpMVcIs5fN6TKN08zj7sMKKDsvy1FVIi7G auzYbyzegDqaZLnYFWYWPbGgGNezbCGEcrUqEPQn2qOouJBoYZ5dixk7HsJfIvAJzUl0 CMZe4Syj9/WHmXbYqWkBv12RJQIJeDjjvFx1nvWdsDpuUTxkjCX05q3QJxgQOw13K+ns +ykQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=Wl6pADoH; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q96-20020a17090a17e900b002129a8204d2si9456668pja.44.2022.12.12.07.06.28; Mon, 12 Dec 2022 07:06:41 -0800 (PST) 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=@zx2c4.com header.s=20210105 header.b=Wl6pADoH; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232081AbiLLOfg (ORCPT + 75 others); Mon, 12 Dec 2022 09:35:36 -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: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 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