Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13224490ybl; Sun, 29 Dec 2019 07:09:09 -0800 (PST) X-Google-Smtp-Source: APXvYqyGvZeRbKNG5rs4isRYNo4mQcevKOBw6DxCJXftxk+1Rz6B/GtEx6Q/8+BHJC4HDFwuJYvF X-Received: by 2002:a05:6830:4d9:: with SMTP id s25mr69217672otd.171.1577632149421; Sun, 29 Dec 2019 07:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577632149; cv=none; d=google.com; s=arc-20160816; b=qVm9L66xp9jd7ZUtLnhFrfixewicToYRQQ29W4rCqTbveCtr5c37M5dyt4Vlrkz6nD fsyg4SiDjPB1Bb/y70V8GLOrrsNwG7OlLbKlq7u6cHUnoOruipDU/ImTKUFfnRaeM8X+ VeEDKamsmCiPEp7iqAVm6qSx7guYsSP0adzMQIeMfptmKfacJzxgUvszkFaET4SYQC6W 73RIdchwzE3r8aXJ/SW+wJ34OdY9WHbtz+QY7cOlan/4+Y+o2sIUngyZcOJkH2JqoIKo OkVQfOmV4OU4h9TvV5CC98ZKKxxjDnOwNn4oKXUqXai0rRfwacWed+NFR7DChbregfbn Bleg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=JpqRu20LZHxdWN1UW9AkuUQvQXkCetz6nWnrVXZaXRg=; b=Cghb/tL3TF9pRhtEHdzhCBFCxaRiJ4T4bTOrX9yJs30vSkFoYnDxhRFCU7q5SXGvq1 WwEURFD/pafDUa6HYlsKg0YfENNRxbLd2brv/lQxSu+NZo6UjiGH8rk9iCrT4TiqefIo bTL7GLni5bgtxaHXL+94GU6hnrPxD2ZKrQSPwN+jFlPpFmGCDpwwFxVgY9IWhxz/h5vp 1FhhN7uJsvZnCHR6YM3XLeM9OeRC3d6PrhrMazCl3cJDu9iV1vb0QdmHHu740actry6G VvgyzBEkKMsfaTQzPtlT5j9CKc1xRF0eR+nNshCiR++bsQc46FHQVHNBTwJNKX2RqMU8 n61g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=S+uZxX+E; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q190si11002067oic.187.2019.12.29.07.08.59; Sun, 29 Dec 2019 07:09:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=S+uZxX+E; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbfL2PI4 (ORCPT + 99 others); Sun, 29 Dec 2019 10:08:56 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:36391 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726455AbfL2PIz (ORCPT ); Sun, 29 Dec 2019 10:08:55 -0500 Received: by mail-oi1-f195.google.com with SMTP id c16so10554052oic.3 for ; Sun, 29 Dec 2019 07:08:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=JpqRu20LZHxdWN1UW9AkuUQvQXkCetz6nWnrVXZaXRg=; b=S+uZxX+EaQmPyB6zJ2fqU/hUZuwlpmMS4Hu3op3yUKzfg+ck49mpuWaMrCl8Ro03Sf P05YwiT9hWqZYAfCCPEX/l/A8d5Fay2EEpm05+o4kmdiBfoEXLTD88+5f/1LLws9AsN+ nYHetUMmzMlUs+pTTZ+yL/MCwEHdNtXJ0AjyriI6S2AWH91p4gMxlmiILlQscp4l5bZP tkmzsKjJd/j+6FFjOYdh2mz4cu9GyxzT7vp8Scpt+up6IoUN2jTI5FKBH1OyxHyM7U56 9gMqeHWsAx7qlHry2TcgBE5OUIKF7xYIP7qIHkbtrVOCZgz1eZlnSJt0mat7uv7604if SXLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=JpqRu20LZHxdWN1UW9AkuUQvQXkCetz6nWnrVXZaXRg=; b=CSgPzYqEccyoYbbGivoBJ1V2ld9uhtI4wFFbo6XDRDRCa3e92xYvLpLNOG9LJ9iZq/ LfPrHjC6XKlqv/pG2mcprBurO75RvSCqwfc5txXNQl0FdBQsZKvxnapbAbeed7qJe73j R9Jt8iVjrjgxNhWwv0DuOiNRxPihLYYKjpL7e2Hcm2MNPaRExv/zUCjwSbJjZWcW48Mh m6CU2XwC4CLXpfSwS+lvQUWggxvuJVyec+epXIbfiwuD+rt54zCDyTecp1otKLov5DeW /R2OJNA6bkmG2MvB7MAx0nDwgHaPHBrM7PYYQiVACwFY8oYQS+C2dlXB1B2F4wVjBsBA KG/g== X-Gm-Message-State: APjAAAVzvlyo35DT71JkY8kveKnmOMSuWWUJ5dIuYzUHRtnRfBTXSXIM Prj95Ezz/2MZOouo4QuNF3BsgQ== X-Received: by 2002:aca:758a:: with SMTP id q132mr5236846oic.162.1577632134837; Sun, 29 Dec 2019 07:08:54 -0800 (PST) Received: from [26.83.181.6] ([172.58.107.236]) by smtp.gmail.com with ESMTPSA id t25sm12835238oij.17.2019.12.29.07.08.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Dec 2019 07:08:54 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v3 0/8] Rework random blocking Date: Sun, 29 Dec 2019 23:08:50 +0800 Message-Id: References: <20191229144904.GB7177@mit.edu> Cc: Andy Lutomirski , Stephan Mueller , LKML , Linux API , Kees Cook , "Jason A. Donenfeld" , "Ahmed S. Darwish" , Lennart Poettering , "Eric W. Biederman" , "Alexander E. Patrakov" , Michael Kerrisk , Willy Tarreau , Matthew Garrett , Ext4 Developers List , linux-man In-Reply-To: <20191229144904.GB7177@mit.edu> To: "Theodore Y. Ts'o" X-Mailer: iPhone Mail (17C54) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > On Dec 29, 2019, at 10:49 PM, Theodore Y. Ts'o wrote: >=20 > =EF=BB=BFOn Fri, Dec 27, 2019 at 06:06:56PM -0800, Andy Lutomirski wrote: >>=20 >> I'm thinking of having a real class device and chardev for each hwrng >> device. Authentication is entirely in userspace: whatever user code >> is involved can look at the sysfs hierarchy and decide to what extent >> it trusts a given source. This could be done based on bus topology or >> based on anything else. >=20 > Yes, that's what I was thinking. Another project on my "when I can > get a round tuit" list is to change how drivers/char/random.c taps > into the hwrng devices, mixing in a bit from each of these devies in a > round-robin fashion, instead of just feeding from a single hwrng. >=20 >> The kernel could also separately expose various noise sources, and the >> user code can do whatever it wants with them. But these should be >> explicitly unconditioned, un-entropy-extracted sources -- user code >> can run its favorite algorithm to extract something it believes to be >> useful. The only conceptually tricky bit is keeping user code like >> this from interfering with the in-kernel RNG. >=20 > The other problem is the unconditioned values of the noise sources may > leak unacceptable amounts of information about system operation. The > most obvious example of this would be keyboard and mouse sources, > where today we mix in not only the timing information, but the actual > input values (e.g., the keyboard scancodes) into the entropy pool. > Exposing this to userspace, even if it is via a privileged system > call, would be... unwise. >=20 > =20 Hmm. We could give only the timing. We could also say that the official interface for this is to use tracepoints= and punt everything into userspace.=