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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 929A0C433E0 for ; Mon, 10 Aug 2020 17:45:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56F05206B5 for ; Mon, 10 Aug 2020 17:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597081549; bh=sWDMMmCB3sLoljZ6G9gWAThKybF1nd8Xk75hXcMlO0s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=CGGWujYGUcXyiUv219jJve1BPBJQIxEs731zWIeIQZEH7XQa97FlVxQ+QjJuJeMw/ qQFwomj10fEVFK6UNIb6DfVmD3WTmgZM7sXHw7iLB8ArupAWZi6GjWg+W5Ii5ZhEAG 6T3RNlbOE7Euym9R97ymtCNac2oCwC4nVj3vRb2c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbgHJRps (ORCPT ); Mon, 10 Aug 2020 13:45:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbgHJRpr (ORCPT ); Mon, 10 Aug 2020 13:45:47 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E28A9C061756 for ; Mon, 10 Aug 2020 10:45:46 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id d2so5187640lfj.1 for ; Mon, 10 Aug 2020 10:45:46 -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=HMDnYYwGdq+30SGu5JCkNhz46jOb7L2DmJQKoF6R49s=; b=eEYr7uGHSEifXQBm79KDX69OssyWfkIy3k6sDuDCM/bOL8jKMI3Ut9RfUn9tHd7JBG Os0d5QgT7WAQuRj3fuzwn2pxqP/1AY4wAM4sfEbpbz0OiVyfzfQoRatMjy9IUNN7vTJm SwimVTc1sKwHIfDxml8qruPzWplzSjyM0cVAQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HMDnYYwGdq+30SGu5JCkNhz46jOb7L2DmJQKoF6R49s=; b=MFwszwbinGXDXfm79UAo/vI66ldqqn+aAEAWYek1DxI2HLB+tYtG5EG2i2wXGmxfza Ww5/UnZYRnFIwFPo+borbdh1w72Xbg4Flmj88h8/qjSZ0+ksms/kQCpzr8Aof04QNHxM +nsAqhA3kVPlS25MiNayiQ4+1n6d0MmagtOW4u3kZCjpDw01VD/b8z+t7vaYOG3AWKxY wF+JtiZ3AEXH+VycNuy8Sc5TXJW+aBnO5QoyCH6UJpA+D0Hb0qHaICA3qRb/OYCgiCyr R8DoLAE806rSiHhQjPDM5u8uAMf4nhOTs1tGJdeHFcCx8kPjiMjUEXyCQZhQ7nyCmKAe kC4Q== X-Gm-Message-State: AOAM5320hOcp62UnKCppLxkkbHvy55tCtGXCRXV8pAnPnYpmebk2tz/g LTXRoKhI5v6bQX4dtDPsUMFuJ4VaZZM= X-Google-Smtp-Source: ABdhPJxyAED4UHOIgcRUCK5iGs1guVooD3lyg70SWgMrLuArOqeocwdcGvnXAuCMlEtRzHl7IIeFog== X-Received: by 2002:a19:c519:: with SMTP id w25mr1144026lfe.24.1597081544801; Mon, 10 Aug 2020 10:45:44 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id a9sm9338375ljb.57.2020.08.10.10.45.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Aug 2020 10:45:43 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id b30so5176186lfj.12 for ; Mon, 10 Aug 2020 10:45:42 -0700 (PDT) X-Received: by 2002:ac2:46d0:: with SMTP id p16mr1152503lfo.142.1597081542480; Mon, 10 Aug 2020 10:45:42 -0700 (PDT) MIME-Version: 1.0 References: <20200808152628.GA27941@SDF.ORG> <20200809065744.GA17668@SDF.ORG> <20200809093805.GA7928@1wt.eu> <20200809170639.GB25124@SDF.ORG> <20200809173302.GA8027@1wt.eu> <20200809183017.GC25124@SDF.ORG> <20200810114700.GB8474@1wt.eu> <20200810165859.GD9060@1wt.eu> In-Reply-To: <20200810165859.GD9060@1wt.eu> From: Linus Torvalds Date: Mon, 10 Aug 2020 10:45:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [DRAFT PATCH] random32: make prandom_u32() output unpredictable To: Willy Tarreau Cc: George Spelvin , Netdev , Amit Klein , Eric Dumazet , "Jason A. Donenfeld" , Andrew Lutomirski , Kees Cook , Thomas Gleixner , Peter Zijlstra , "Theodore Ts'o" , Marc Plumb , Stephen Hemminger , Florian Westphal Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Aug 10, 2020 at 9:59 AM Willy Tarreau wrote: > > I took what we were already using in add_interrupt_randomness() since > I considered that if it was acceptable there, it probably was elsewhere. Once you've taken an interrupt, you're doing IO anyway, and the interrupt costs will dominate anything you do. But the prandom_u32() interface is potentially done many times per interrupt. For all I know it's done inside fairly critical locks etc too. So I don't think one usage translates to another very well. Linus