Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2672551rdb; Mon, 4 Dec 2023 04:35:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLH93Sd000tO+aN7sHyz0XJFA707Ug8cwW168HSwjY/6mxcYjspiSj3d1hzman/v5BgAeX X-Received: by 2002:a05:6a20:e118:b0:18f:7481:da54 with SMTP id kr24-20020a056a20e11800b0018f7481da54mr426151pzb.20.1701693337282; Mon, 04 Dec 2023 04:35:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701693337; cv=none; d=google.com; s=arc-20160816; b=fXvLwX7uMDzkVPEWuM98XqNzUxyp7qfLA43RMj1+dF01EyQVfwCgDCMSQ6nsC1O1bU mxWulY6+bYA3QOwy9wW+Z4oklmbuoi3O8MiJoGZ2AxqAJs0Jy+rTp+TlwIlSZn5gyHzE wyWywfi9acKALhMFGjMeLzlPbuKLLXZB/S5vRlwNr724fK7OHDo7IigjNuPB8jyC62Jn tN5tZFG+XTpOqCLom87M48eyNyztKzpA1ooYziIkU8xAYyO0eWl1elnlXDn6fXCWQARL V4dvgwmrTYWw//I3PR4kWvTK0M9J2jKEYYSH3jr5OBEv1HhoeiGkfbVEfEmdgOvFAHVq 3S0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-signature; bh=OCIXVOliNM/mKvIQEs2vJxlTlzv3NC4XIbxWAn96+Ls=; fh=1WSFL/FSLGEz3apxPo5ubYvMBgPOXrZG/aOWEbit9kc=; b=ZDsRYMdH/qo7OdklzjlpOvU64+cg6YpbW8M+z89SEfVBFYIt+HqpG2GSJO7EcN15tH hG9yNt0vRuEcr+88JF6LDFwHox4b3BX746B1lsA2I3dIO/26LiNovR8gccBzq0wUANcx g3BPRma46yJn5GcG7AFo/ROImmCY1uLOJrIHOrZTT5iliASlWrrzclVXtQNAOW0DPJxO 45R+QsUSSqmGhRWRu28Ul46ILg8Dst8XuE42bNjPRN7xHV3nfKTs0f69W+eFh/UMdLbx hU7WPqosdiLbFnRG27IwDxQwZVi93s47G4aNb/rTcLp+agR/KP9wBudKbXXoTfnHXmmx jtTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (no key) header.i=@uni-rostock.de; dkim=pass header.i=@uni-rostock.de header.s=itmz header.b=qAgQWY57; spf=pass (google.com: domain of linux-crypto+bounces-535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uni-rostock.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p5-20020a056a000b4500b006cb8abd39d3si572275pfo.180.2023.12.04.04.35.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:35:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (no key) header.i=@uni-rostock.de; dkim=pass header.i=@uni-rostock.de header.s=itmz header.b=qAgQWY57; spf=pass (google.com: domain of linux-crypto+bounces-535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uni-rostock.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3C88DB2096F for ; Mon, 4 Dec 2023 12:35:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8D3D241F7 for ; Mon, 4 Dec 2023 12:35:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=permerror (0-bit key) header.d=uni-rostock.de header.i=@uni-rostock.de header.b="Wp1y7VjE"; dkim=pass (1024-bit key) header.d=uni-rostock.de header.i=@uni-rostock.de header.b="qAgQWY57" X-Original-To: linux-crypto@vger.kernel.org X-Greylist: delayed 299 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 04 Dec 2023 04:11:47 PST Received: from mx1.uni-rostock.de (mx1.uni-rostock.de [139.30.22.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0DAEE6 for ; Mon, 4 Dec 2023 04:11:46 -0800 (PST) Received: from 139.30.22.84 by mx1.uni-rostock.de (Tls12, Aes256, Sha384, DiffieHellmanEllipticKey384); Mon, 04 Dec 2023 12:06:45 GMT DKIM-Signature: v=1; c=relaxed/relaxed; d=uni-rostock.de; s=itmze; t=1701691605; bh=OCIXVOliNM/mKvIQEs2vJxlTlzv3NC4XIbxWAn96+Ls=; h= Subject:Subject:From:From:Date:Date:ReplyTo:ReplyTo:Cc:Cc:Message-Id:Message-Id; a=ed25519-sha256; b= Wp1y7VjEAET3niNQ+QN86zfAKFiRJFGS9odoGivA3yfsm//StMnWDZ/lM+VxvgB76jlvkm1+R/CDY9vWw/u5Cw== DKIM-Signature: v=1; c=relaxed/relaxed; d=uni-rostock.de; s=itmz; t=1701691605; bh=OCIXVOliNM/mKvIQEs2vJxlTlzv3NC4XIbxWAn96+Ls=; h= Subject:Subject:From:From:Date:Date:ReplyTo:ReplyTo:Cc:Cc:Message-Id:Message-Id; a=rsa-sha256; b= qAgQWY57jeYONfIMve0kMF2WH2kRlp0IPOUUsFiVmN/lbRtgwH3ofWVwfEU08OJN1Uinl8ynIQUAO+TlRqSeKO0hQvozLYy0W004hgb7Bedst9RMTuHa3Dt/nQYGYPl6YOOLyvUlIei2zq+tMhiNH0xqnac1KLJG5AT7FMDJewI= Received: from [139.30.201.32] (139.30.201.32) by mail1.uni-rostock.de (139.30.22.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 4 Dec 2023 13:06:44 +0100 Message-ID: <6cffe622-bf4b-4cba-bfac-037c5aa89a25@uni-rostock.de> Date: Mon, 4 Dec 2023 13:06:43 +0100 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: jitterentropy vs. simulation Content-Language: de-DE To: Johannes Berg , Anton Ivanov , CC: , =?UTF-8?Q?Stephan_M=C3=BCller?= References: <7db861e3-60e4-0ed4-9b28-25a89069a9db@kot-begemot.co.uk> <8ddb48606cebe4e404d17a627138aa5c5af6dccd.camel@sipsolutions.net> From: Benjamin Beichler Organization: =?UTF-8?Q?Universit=C3=A4t_Rostock?= In-Reply-To: <8ddb48606cebe4e404d17a627138aa5c5af6dccd.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: EMAIL2.uni-rostock.de (139.30.22.82) To mail1.uni-rostock.de (139.30.22.84) X-TM-SNTS-SMTP: 6F2B22E2EF85B60F7C1A3ABE4129E3D73B303944A0C3E9D993A51785A6D002632000:8 Am 01.12.2023 um 19:35 schrieb Johannes Berg: > [I guess we should keep the CCs so other see it] > >> Looking at the stuck check it will be bogus in simulations. > > True. > >> You might as well ifdef that instead. >> >> If a simulation is running insert the entropy regardless and do not compute the derivatives used in the check. > > Actually you mostly don't want anything inserted in that case, so it's > not bad to skip it. > > I was mostly thinking this might be better than adding a completely > unrelated ifdef. Also I guess in real systems with a bad implementation > of random_get_entropy(), the second/third derivates might be > constant/zero for quite a while, so may be better to abort? Maybe dump question: could we simply implement a timex.h for UM which delegates in non-timetravel mode to the x86 variant and otherwise pull some randomness from the host or from a file/pipe configurable from the UML commandline for random_get_entropy()? I would say, if the random jitter is truly deterministic for a simulation, that seems to be good enough. Said that, it would be nice to be able to configure all random sources to pull entropy from some file that we are able to configure from the command line, but that is a different topic. > > In any case, I couldn't figure out any way to not configure this into > the kernel when any kind of crypto is also in ... > > johannes > >