Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3208814yba; Tue, 16 Apr 2019 06:57:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2LTVPGUiRU3ugLfGd2siZ5AC2VezrP/OUZIWWmMTUuCX3mfyl6oPI1rOJJ1Abuv57Z4kq X-Received: by 2002:a17:902:b94a:: with SMTP id h10mr83060859pls.82.1555423043919; Tue, 16 Apr 2019 06:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555423043; cv=none; d=google.com; s=arc-20160816; b=0rQDGERFlPUT3YRpguqSSOltL6I70AULryUtmK6cSuZhDGkHqnHUJTCOYkbm3YBUcZ gOlVIDuQ4Qm2i3+0cLNbMJTT5bPjzPlvFilRUet4NqFt9BF0EcnKB+FN+XDy1JSPpv3M k4VWRDgmlmkcIiGotiSOLjgf92DZ7pi+82qpAZ3EbPj/Ckf6Iwla7gAEQ8loCyHtRf8K 4zUxoIAvlfCgYz5AvhWCkx69DnRyMhTtmsTVu/jgXq4cu0H2mIxqzpUO56XK0ZF85OIm S4Ufw3hphB5/a+PYGeIXT4Vui9NqEHm4FbapfFlc8Cno2oJ2+pIQZbKTED+JAmBu1blm fx/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Hl1SR1d+fQ0s8rpI/iVMF3m6ctga84zjhEJtjFfUIhg=; b=vZ0spVUH2JBSRwubftwZVw2pHyF1vSKsikBXCmzJ3YazWQW+7XgF6pfYYmu6j+rIyJ YSLoZFy2Prh0WQGuJ2xgbbFCz4W/Z/JowKXNt92m7RajO5heAORsIdshkrqLMgQnFdNQ 3GK99OGfrZjd0qiiKK7kn8bomGbPX44CWyZ4jCNmGQPF25/2pFYo3WgW/iWnsWh8dE0K mcMSYrN9G2yGYTf2zXSqGvS+7vfVB6OOmZMQfG72ilXheS/GG784SNjMLpnlKBr60uxQ p8KRI+QJSXyHarZlffbyjxUZgEsBoGPJwyQOmOkVqs8Jqv+eaa/eBpb09frx9dAKlObg judA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=v66nxs5J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si47101580pgj.502.2019.04.16.06.57.07; Tue, 16 Apr 2019 06:57:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=v66nxs5J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729540AbfDPN4M (ORCPT + 99 others); Tue, 16 Apr 2019 09:56:12 -0400 Received: from mail-vs1-f54.google.com ([209.85.217.54]:35132 "EHLO mail-vs1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbfDPN4M (ORCPT ); Tue, 16 Apr 2019 09:56:12 -0400 Received: by mail-vs1-f54.google.com with SMTP id d8so11587129vsp.2 for ; Tue, 16 Apr 2019 06:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hl1SR1d+fQ0s8rpI/iVMF3m6ctga84zjhEJtjFfUIhg=; b=v66nxs5Jc88EyVLHuO7UoXfOAFHKHN8S8Au7epwUOoL6pE/GQPqRtSXYxeO5/mn/+k 0FgZkJusjtO5ZfPP1fNtoxCpqPy+/nEI+FMi8KbeTXDtv/uGzV1KONflPWlsJMgHq6Gx PBxhK6lM0xCjTYhr/CcApRNhClj9vstEkJQmTbdGjnycCSoZgW0frJaiIGAcHndg+MJF E8JPdvs+XU7eL4EawO3LvR2NPwqG/M99ujNRqn4RqvFdTuCDV69NU/vBbm06afvz7j1t r76fvKxDUJJvBJGtx4Mmziq+H7SOdMYGsY/vNJL6QDp3Cqmu2/1wcd89JT199e+hFmb/ 5Jyw== 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=Hl1SR1d+fQ0s8rpI/iVMF3m6ctga84zjhEJtjFfUIhg=; b=dp2Uk+6xxc6YKASLD0Z1SgByGpe3zs4daTzg6VyqVkJW1k1Wc5caETg+7t/p97aiXS VxVceuDUctIzldm6lwetM29xEZzYzBE/Fa1sf9V3JYnkzNsUyUTXrfKwA8kr/H2jzciB 17AkGm2S4R4kPxdG0feXNy4l5zKgJJqaNcd3H4Vw2YuGVWzrD2Xg9oqG+vHIV+MCoQwR rr5217qzBRTeVYdD277y8pcBmiz+2rUusG4rYgpRfRoAvhyvxitM2IcllxW9oQ/pwXPv jsfoinoBAfhbsgn8ALba8cb60oxMy7JSs0P0dCKGoh8j0RQYY4ZNSY8lVRxb0Zal47Ck y7pw== X-Gm-Message-State: APjAAAXCpMu99Zo4I0rHStrbM36dzFNoxMoAgIsBJap6c4iTFJ86m+2T WZokIk7CkAPG1mtLakxdHfDQaGfjx3ScNIIPDGKBaWs6 X-Received: by 2002:a67:7e12:: with SMTP id z18mr21457705vsc.82.1555422970881; Tue, 16 Apr 2019 06:56:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kees Cook Date: Tue, 16 Apr 2019 08:55:59 -0500 Message-ID: Subject: Re: BPF RNG To: Daniel Borkmann Cc: Hannes Frederic Sowa , LKML , Ingo Molnar , "Reshetova, Elena" , Alexei Starovoitov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [correcting Alexei's email address and resending...] On Tue, Apr 16, 2019 at 8:54 AM Kees Cook wrote: > > Hi, > > In looking at prandom_u32() users, I noticed that BPF uses its own > state variable with bpf_user_rnd_u32(). It appears that this state is > never reseeded like regular prandom_u32(). (See __prandom_timer().) Is > this intentional, or should reseeding be happening? > > -Kees > > -- > Kees Cook -- Kees Cook