Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2292324pxk; Mon, 14 Sep 2020 09:24:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylgd9M7I13nV1M6KqBGfPqHipDrmay3wVmo/HfZwGuDjWI9TR7XxibGcGDKRFMus8V2s3j X-Received: by 2002:a17:906:4c81:: with SMTP id q1mr15013626eju.72.1600100695355; Mon, 14 Sep 2020 09:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600100695; cv=none; d=google.com; s=arc-20160816; b=fDFshIfvOQywYuoIQU55PmKJM1rA0+tNTNOlWNnvz0mYXEozOaSJj9W3jSPq9FtqqQ TLTf8agoMIsWWeqRRaESt8i5zd6GEGxrFzTUeanT4paHx8M19hbeZGQXEKLD11s74ED7 PnbjTSHsGohKfpsRbvenKXna+zNFYs4JIvok7lQ2vEIvJ6F5FhMP26cCE1T4qrjxK4qV vn+6yd8VtzZLGuiiGu9LAIa/+WOpt3jdGLRuwCysVGw8kHETYm/s1e14dQqSNB22X1Gm c2W6mjSmo42yw/DJyO4Hvy2YLhgUAQuvvM/OBq4RwVUcnko1dKbdOMLB2eB0sKvH3GlB biGg== 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 :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=ZaZZqacCDA7oXtm//wcKDDOo/3GMN+o9Qri31drCCNY=; b=y47f572dxN4w6Xk93tg4scOf8NIhupz5kWQNvnUjhE244DWAyxPwxg9/nYfwsqrllg Nxi9vLhEyL7X68FQs/1yYlB1xI0G63K6lR8do0sJhIxh1zwqfwjP9K10lZdeX4UnACeD AguxrtZNz162gkNSjp1MFtSet3eSMW8/G6YHrj5q+8hYkRWVzPljnUlb9PIaUx5zZHWK a3El1pRzeaDOEQZ+R4vaILNmr478Il1qEQNywMCT0g4d+XocLmeQgOpXbX5K7ieoxryI vk69jxozvLfoX3y7oiy/q21NrAmDTTldrJCngZm8aZaLHF8vCDRSf2z4ZEcDFV9Ny3kw GHRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KDPADuN7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c61si7792393edf.394.2020.09.14.09.24.33; Mon, 14 Sep 2020 09:24:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KDPADuN7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbgINQVe (ORCPT + 99 others); Mon, 14 Sep 2020 12:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgINQRA (ORCPT ); Mon, 14 Sep 2020 12:17:00 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF029C06178A; Mon, 14 Sep 2020 09:16:52 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id c13so453762oiy.6; Mon, 14 Sep 2020 09:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=ZaZZqacCDA7oXtm//wcKDDOo/3GMN+o9Qri31drCCNY=; b=KDPADuN7sgN/H3qQhT8j9VnWJODEPaZsmTPIcGxPaBo6rYW0M8NvhKwJ5MAs/3V+SS aINw+7oVh2lqilrsOaj3DUq883Gf+0koNWpY6VRJi1GI31oIL+QkVBpCqs12ssFD+j/D zgW+1aROsUUIgtHyCf2nFByMV/syL9pyQ/TlcCq1R3lm21S88e9PHDQxB9dzZvBwZI2V uxgaKsEAz7ggMkvM0tGLLLqAT6/fVl7nNQ3120h18qyrvDxYYXcPBivgjPIv8cgp818y qfva7as4FDH1guCOFqYfCk0HmlLHFNXdMqaQ+sEadFnndjNT4gjh5Dyg1u94poMxWOFW REDg== 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:reply-to :from:date:message-id:subject:to:cc; bh=ZaZZqacCDA7oXtm//wcKDDOo/3GMN+o9Qri31drCCNY=; b=FoxOLYYKyCReZmtWH0W2qAg7FCtDhg/jCjYJzUA4SDI8QHTxKdOjSYHNUIeFVXsI+V KyyhEM6H7oldaVYUZ8RtYjeP29TQblFKH8A4aKDdxTehxjL/trq9voXY0VUGyWE0qo1v bbTLh1r7Ux24o6oSYGHIkEL1F6om+CW5IR7jd4zQdwPpIMSiTJt1vAYbaoGO6XlEuip5 oBwALD+e+2NCRZuBqFhVPXjc1aWUNEd5/xazoLbGJj4PmH3fSOcitmUPVm1Bk/8noPdD 4a+ejSsl2DRW+j7WZetZ5pA48MMiO81SIeLSDSfCkrWlkEf5vULgtC2haj+Fbh2QhkrL IUcA== X-Gm-Message-State: AOAM5334RyVkQH9OdTPMsY5k4K9nWqpBru2xDhoil2MHPLMmGZWEHvgC tXraCSALB6DaOeJSRzEyLKEDJDrBwBPOdCOEpPA= X-Received: by 2002:aca:ec50:: with SMTP id k77mr92502oih.35.1600100212390; Mon, 14 Sep 2020 09:16:52 -0700 (PDT) MIME-Version: 1.0 References: <20200901064302.849-1-w@1wt.eu> <20200901064302.849-2-w@1wt.eu> <20200901131623.GB1059@1wt.eu> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Mon, 14 Sep 2020 18:16:40 +0200 Message-ID: Subject: Re: [PATCH 1/2] random32: make prandom_u32() output unpredictable To: Amit Klein Cc: Willy Tarreau , David Laight , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , George Spelvin , Eric Dumazet , "Jason A. Donenfeld" , Andy Lutomirski , Kees Cook , Thomas Gleixner , Peter Zijlstra , Linus Torvalds , "tytso@mit.edu" , Florian Westphal , Marc Plumb 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 On Mon, Sep 14, 2020 at 4:53 PM Amit Klein wrote: > > Hi > > Is this patch being pushed to any branch? I don't see it deployed anywhere (unless I'm missing something...). > It's here: [1] https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom.git/log/?h=20200901-siphash-noise > Best, > -Amit > > > > On Tue, Sep 1, 2020 at 4:16 PM Willy Tarreau wrote: >> >> On Tue, Sep 01, 2020 at 01:10:18PM +0000, David Laight wrote: >> > From: Willy Tarreau >> > > Sent: 01 September 2020 07:43 >> > ... >> > > +/* >> > > + * Generate some initially weak seeding values to allow >> > > + * the prandom_u32() engine to be started. >> > > + */ >> > > +static int __init prandom_init_early(void) >> > > +{ >> > > + int i; >> > > + unsigned long v0, v1, v2, v3; >> > > + >> > > + if (!arch_get_random_long(&v0)) >> > > + v0 = jiffies; >> > >> > Isn't jiffies likely to be zero here? >> >> I don't know. But do we really care ? I'd personally have been fine >> with not even assigning it in this case and leaving whatever was in >> the stack in this case, though it could make some static code analyzer >> unhappy. >> >> Willy