From patchwork Mon Apr 11 09:41:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1615644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pnZa1t9I; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=ifUtwLSo; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KcP6G6325z9sCD for ; Mon, 11 Apr 2022 19:42:46 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/pykpdTici3FGHUeMuX29EqrrnYQR/HQ6yJ9Gea6pBU=; b=pnZa1t9IOKICCK JBWnhVOxEFY0r3T1CEeoOSjcVYhbQR9cnpExDIM7QBU77YswA57Barl3AbcK5XbnLazkhB/r7bQU0 wS5BqIRt2rkOOB3QOcOtIZd6n0Rbzz4W3P0Q7tLWm4rajypG0IML5E6hsUJgS2KKduU4yBDj6qFtd qler9OSWpR+gMw+axHKX7rB3VBCXWlq6bEUhPI2rOXcS8tSIajN+4LhSNHWq7yatD6IEZcn4ocBRl m62YA68LQFXafoJHOcg4h7buLVyLLrzIlR4sv94MzWrl4doMn4PBGbT/BpbQ2lcIvzFLqX1cxVMkB M2YCQj7GurRbu3OPwYSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndqYA-007zIn-FI; Mon, 11 Apr 2022 09:41:34 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndqY6-007zEa-DU for hostap@lists.infradead.org; Mon, 11 Apr 2022 09:41:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=wRHFXx/5pluEAYskloUant9pbqBlCkIwS9Sj6YdjLY4=; t=1649670087; x=1650879687; b=ifUtwLSooUFu1wodTB43RuI+DrAvvcMe80v7k9W4rRXdDLpg32aNRYe5LJm4wgYMrnL2ZPSdZjY lugzIcdJVBW+Q7e3SQUhbPygSnC00wpUSk0jW48pX81A1x2K6vb6V2/yTWW5ZH5ARiMqp3PxgGdd8 /4dbaIW2A1VzFh3h6qs1JZIgXa+3dirH9Z08n6Ek62G8G7PrXSV9rg1j56T/K9xvpKYXLPBU9c6tN OIrIHFYqZKy+DtFp+iuOHynvKZs//wGol//Qe2KmiHIaz3Q9FxTlgI+xMMx0FQPS4ld0sDIyRBVbV hD2o085+tL/jt/vMfl6uqEMJogG3tOJuHKCw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1ndqXz-008EC4-6b; Mon, 11 Apr 2022 11:41:23 +0200 From: Johannes Berg To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH] tests: vm: pretend the RNG is initialized Date: Mon, 11 Apr 2022 11:41:20 +0200 Message-Id: <20220411114119.e8c4e465da8e.I47453169065a52e80433b529073726a3c5855194@changeid> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_024130_481482_42C61CE3 X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg We don't particularly care about the quality of random numbers during the test. So far, there hasn't been an issue with the RNG not being initialized completely, we only get a few prints about uniniti [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg We don't particularly care about the quality of random numbers during the test. So far, there hasn't been an issue with the RNG not being initialized completely, we only get a few prints about uninitialized reads from urandom. However, if some tool were to actually use /dev/random, it might get stuck. Call the RNDADDTOENTCNT ioctl to unblock this. Signed-off-by: Johannes Berg --- tests/hwsim/vm/inside.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index bfcbda631e4f..f0a0d9bf3b9f 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -53,6 +53,11 @@ ln -s /proc/self/fd/0 /dev/stdin ln -s /proc/self/fd/1 /dev/stdout ln -s /proc/self/fd/2 /dev/stderr +# pretend we've initialized the RNG, we don't care here +# about the actual quality of the randomness. The ioctl +# is RNDADDTOENTCNT (at least on x86). +PYTHONHASHSEED=0 python3 -c 'import fcntl; fd=open("/dev/random", "w"); fcntl.ioctl(fd.fileno(), 0x40045201, b"\x00\x01\x00\x00")' + echo "VM has started up" > /dev/ttyS0 # create stub sudo - everything runs as uid 0