Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2301951iog; Sun, 19 Jun 2022 13:26:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toZzUHm9ph53tCtIs988VYjMK1M/2rQaZOeTyUve7YQZikNOKTHMwK3wEs6/ANembw9jUz X-Received: by 2002:a05:6a00:2392:b0:51b:fe0e:2b8 with SMTP id f18-20020a056a00239200b0051bfe0e02b8mr21129951pfc.84.1655670368699; Sun, 19 Jun 2022 13:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655670368; cv=none; d=google.com; s=arc-20160816; b=Ks798VrTICUUlkTsWZELaWF43f+rTgHMg661IjJHGR8yiTBP0afEuc0EtBmZEVJk7b 8XXnTCGzTv06Kiq6+YdN45cFYD7KI6MevTAizGbMGl5S3L2Y1WF6+xXtvnxVxr3CdiAg 5KRpdb5H9fuWodT+1ehFVFFtKaMVkEsLXXFxqMgSaNmuPn0r6UoC+M5kUyeMe6khfD6K iTYDtmVbEQFgfF/hfYeXRyD0Qnc/l9tOklW5NdGVu18bb4OXO+Uraocvx5OPYAHr8KJE 7Hq1rbHwQrhzcIJkojMpbkSqzN0QsZo9mPlExfSODS4e2WdkMYe0LhqtvKRYHkFrYtJs 0z6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Zt19NQISpOb+BzcHD03LYz1ZgRQNfJH/euUE9l640Mw=; b=FyGO84rPueQCKIumpMiMuc8/NfBA2rWaoRJYDR2szih0Mq2I5oO8VcjVrjjkwX7v+3 B44YeVVkCo3L48/6AmkgVTN8fv6u0/pC3QxBSNlWPaSGwl78P9j8sSjRSBLdQtAnfNli 0JCqZHMTNQ0AiTX7XWXtvOc9lfpKCwN1irHprenEoved8wxEBYfTXXlwgjfgwe6SBhSl yXcipCtEdq2mhtjUBDzu8g7nIBAd3RN0L5UqWU2nQ4GkD7ZjL/Xx2DHsivo3hEz96jOe vfhhU0qH5NjfEEksAU/tHKco35JiZCyzw9IYvCQRwmm3dEWiLi5r0lp5sT4U3+RsVXlh fBLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=YwlRSLHz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a17090a170400b001ce45fbb2f6si2994058pjd.180.2022.06.19.13.25.53; Sun, 19 Jun 2022 13:26:08 -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-foundation.org header.s=google header.b=YwlRSLHz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236270AbiFSUFq (ORCPT + 99 others); Sun, 19 Jun 2022 16:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235196AbiFSUFp (ORCPT ); Sun, 19 Jun 2022 16:05:45 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E865A18F for ; Sun, 19 Jun 2022 13:05:44 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id cf14so2696364edb.8 for ; Sun, 19 Jun 2022 13:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Zt19NQISpOb+BzcHD03LYz1ZgRQNfJH/euUE9l640Mw=; b=YwlRSLHzOtRrpd2In0ezIB3k1jBosGYMZdU4texM86AzTKS9pMwdeAC0C84wKYzFdo sFxB84jg8b4fEufvYxxYgctOC0AkIWAp81rEooLQv0b1z1pWTA/9XWVE0I/r+qeM//ut 1B47dfsi56vOjBDnVRI6vdX8CCRnDszEUTnkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Zt19NQISpOb+BzcHD03LYz1ZgRQNfJH/euUE9l640Mw=; b=0YHhU+7f60MZqqxuqx7Pe4Aj7E4WcDm7S01gqKU0GWuoq+0UJOZ0dT1l6hkDQhbuCi irAOD44e7Oy1c6WvT3S9IScCxx1qaPs0Y0yke9x6nh03PY1J1Cj1KcMM/xg6OPUZiRI8 rDokS/nJfLZUG4Mg8VTEkfT7WVU5Z77Kaey49XXFj5EndAu+jBt/+UK50gisYcNiJ0o4 uLnEwt/fq7SVfAI9FK1/wXjkozU1PxhQ3KlRggygGwWSwqLgSWBsy8VKRBU2COlmRTSb tQ7OA9UJ3oPITC1iG07ukhoY4OTQpy+yJj4MU53AKQLsj0PBF2qKwd+QwSulVtofAWj4 /Gwg== X-Gm-Message-State: AJIora9FbWXLUd38QAPVi8EgUnveh5Jzog2lqq7JjryCQg3I4/ltBOzN 5TY4WqRRT+J2aoxzvcApXQl+ZgAc38yHFXLx X-Received: by 2002:a05:6402:538d:b0:435:7ca6:a136 with SMTP id ew13-20020a056402538d00b004357ca6a136mr4861107edb.268.1655669142425; Sun, 19 Jun 2022 13:05:42 -0700 (PDT) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id la24-20020a170907781800b0071c9ef22418sm4293879ejc.193.2022.06.19.13.05.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jun 2022 13:05:41 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id n1so11771996wrg.12 for ; Sun, 19 Jun 2022 13:05:40 -0700 (PDT) X-Received: by 2002:a05:6000:1251:b0:21a:efae:6cbe with SMTP id j17-20020a056000125100b0021aefae6cbemr12958608wrx.281.1655669140264; Sun, 19 Jun 2022 13:05:40 -0700 (PDT) MIME-Version: 1.0 References: <165564429738.1413209.17302088152547038708.tglx@xen13> <165564429887.1413209.8729918730024457105.tglx@xen13> In-Reply-To: From: Linus Torvalds Date: Sun, 19 Jun 2022 15:05:23 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT pull] locking/urgent for 5.19-rc3 To: "Jason A. Donenfeld" Cc: Thomas Gleixner , Linux Kernel Mailing List , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Sun, Jun 19, 2022 at 11:38 AM Jason A. Donenfeld wrote: > > This was initially my concern too, which I expressed to Sebastian, but > he made the point that this area here is rather "special". Actually, > randomness isn't really required here. That wasn't really my point. My point was that there are a lot of uses of prandom_u32() and friends in random places. Just grepping for it, there's lots of different drivers that use it. Who knows what locking they have. Clearly nobody *thought* about it. This one issue is purely about RT correctness, but how about all the uses that just want a pseudo-random number and may have performance issues, or may be calling things so much that a lock is just bad. The thing is, that prandom code used to be FAST. Not just "no locks", but also "fairly simple siphash round because its a PSEUDO random thing and shouldn't be anything more". The whole "make it use the same randomness" may just have been a huge and fundamental mistake. We've seen one actual outright bug because of it already. That was easy to fix by avoiding the new thing that now was a mistake. What about all the other uses with lock bouncing or whatever subtler issues that aren't pointed out by outright correctness tests? Linus