From owner-freebsd-arm@freebsd.org Sun Nov 17 18:02:26 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C36901C5C4A for ; Sun, 17 Nov 2019 18:02:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47GKg52LhNz4WlT; Sun, 17 Nov 2019 18:02:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f65.google.com with SMTP id c14so5507505oth.2; Sun, 17 Nov 2019 10:02:25 -0800 (PST) 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=DQJfUtkxLrinY87dwhqKa1m2V4KWpY9vzWv4v9Ss5Oc=; b=gst5ig4B4ItjhgZMUBF8rvuEx+3MP5dV+dV8ITJ8/4ThlFDyzGXa/9+t0ahYUWZfk4 dPy/YfUenRd3Dun5O9yJGPAiRJ1eWx+JOgiAPzAcw7V+6oHdoiafw5+2JBYAPvCAG/L5 s+/eMcOcwaVp3GyQrQdgGaJTHhMyULF3I1PmYFunlrFcfk+BMbVZnwGkOPsO9hsjlacF dVGybK/QWxbwEZGZgG6XDkaCLWqQHaIQVDCQL2yXwsd2WdYqncwq7knZWZLTzxxbJTZO TgX9HrdXHtaq9JTdB09VPoEhZ7CN22bIMUgge2DDt4WX0B5vktQmV7nQeiyvpALtYUnx dGdA== X-Gm-Message-State: APjAAAUGCRaE9Ma51NpdGIHL1jFBThH00VDWDIVsmfw+co+VW1snQXAf c+8ePuq9+I604LOz7mJbWTDFSJb3 X-Google-Smtp-Source: APXvYqzL4mXXoyBNePlP/jm8uSUGVQcqRTsMyhm5aYAiyoKJHbx9GVZNrXZ2FL90UPPiQkzlj7uEOA== X-Received: by 2002:a05:6830:1f1a:: with SMTP id u26mr17516301otg.75.1574013743798; Sun, 17 Nov 2019 10:02:23 -0800 (PST) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com. [209.85.167.179]) by smtp.gmail.com with ESMTPSA id d5sm5047149oic.23.2019.11.17.10.02.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Nov 2019 10:02:23 -0800 (PST) Received: by mail-oi1-f179.google.com with SMTP id n14so13172993oie.13; Sun, 17 Nov 2019 10:02:22 -0800 (PST) X-Received: by 2002:aca:1e02:: with SMTP id m2mr17105285oic.81.1574013742703; Sun, 17 Nov 2019 10:02:22 -0800 (PST) MIME-Version: 1.0 References: <2F178D6A-300B-4683-84D6-CDB6924877E5@FreeBSD.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 17 Nov 2019 10:02:11 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Initial support for bcm2838 RNG To: Kyle Evans Cc: Conrad Meyer , Mark Murray , Robert Crowston , "freebsd-arm@freebsd.org" X-Rspamd-Queue-Id: 47GKg52LhNz4WlT X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.210.65 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-2.03 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RWL_MAILSPIKE_GOOD(0.00)[65.210.85.209.rep.mailspike.net : 127.0.0.18]; REPLYTO_ADDR_EQ_FROM(0.00)[]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[65.210.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.04)[ipnet: 209.85.128.0/17(-3.18), asn: 15169(-1.98), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Nov 2019 18:02:26 -0000 I don=E2=80=99t think csprng=E2=80=99s blocker level review requirement ext= ends to individual drivers, but I might be mistaken. The kind of things we care about (imo) are, in order: the core randomdev device, the Fortuna implementation, the generic entropy gathering, and that entropy data can only be used once =E2=80=94 don=E2=80=99t expose it to a user and also feed= it to randomdev. Also, arc4random et al. Personally, I don=E2=80=99t have the expertise with this particular hardwar= e to find anything objectionable about this change. The actual change to the harvest function in this driver is de minimis. As far as I=E2=80=99m concer= ned, it looks good to me; ship it! On Sun, Nov 17, 2019 at 06:29 Kyle Evans wrote: > On Sun, Nov 17, 2019 at 4:03 AM Mark Murray wrote: > > > > Hi, > > > > > On 16 Nov 2019, at 18:59, Kyle Evans wrote: > > > > > > On Sat, Nov 16, 2019 at 12:48 PM Robert Crowston via freebsd-arm > > > wrote: > > >> > > >> I have made a first cut at supporting the Broadcom 2838 hardware > random number generator, as found on the Raspberry Pi 4. > > >> > > >> Diff: > https://github.com/freebsd/freebsd/compare/master...RobCrowston:pi4-hwrng > > >> > > >> This extends the existing bcm2835_rng.c driver to function on the > Pi4. Unfortunately I do not have a Raspberry Pi 3 board to confirm it sti= ll > works there, but on my Pi4, it generates (apparently) random numbers. > > >> > > > > > > Hi, > > > > > > No worries- I've got access to a Pi 3 for regression testing. Can you > > > throw what you've got into Phabricator [0] and add me as a reviewer? > > > We can iterate/review from there. > > > > Please also add markm@ and cem@ (or csprng@). You'll need one of us to > OK the commit. > > > > Hi, (adding cem@ to CC list) > > Is there a document or something outlining what csprng@ wants to > accomplish? I definitely don't object to adding you guys on this one > (both because of the csprng@ origin story and this touches just enough > actual RNG code path to warrant it, at a glance), but going forward- > is csprng@ wanting to audit pre-existing stuff as it gets touched in > any way (e.g. existing driver, just adding compatibility bits to make > it probe/attach on new board), or just any new code actually affecting > RNG? > > Thanks, > > Kyle Evans >