Message ID | 20190510173049.28171-15-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp2678928ilr; Fri, 10 May 2019 10:43:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4MR21bleyN+DTzXQLM6bCXNpvJY7vhlmYIoJr6YbsRF0fGHOb5O620qxGB9O9xwaccT2n X-Received: by 2002:a17:906:a414:: with SMTP id l20mr7316793ejz.255.1557510204944; Fri, 10 May 2019 10:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557510204; cv=none; d=google.com; s=arc-20160816; b=yxe9G0f4cX87hmhb3+w0rW82wTlu1o6xsHSY076cafSWUiGpoPdzfAMJi/OXRlts5/ yRlgDkHUatN1n1AMOAcNgozz1Kipqjr//1XSQz44Ozhvcsks7x2C3gm6RLb8YVeBB3T2 pn2Wyxd9Ina7uHsoBXyIL2vBtKasHYvRAHqfyqA/+eMurzyoglg9+Yni473WOP4G2sbx 8WG8lR7CKupsUDy7EGEJ9xq54GGhbYQZYBFVxroLjNHtkEXSTRtNA/VkWe2ftf0m4gmx rjF2gA4Y/xsgKoqnvyGnY9eVuGXkIy4F9QJxHjfv0zFUIBB1qmaRTtYitM+c6qx/TC5V lTiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=LA1zmsYxmzBAEiSSaTbYsFeqnklh9uk6Ygv0EHqOLtQ=; b=r22YRLaqPQduGLJzYXpjAfUhdat9ZHG5rXEFQPWiU83NkXjz+xif9feN97rq4YRSB6 gDlkxrwSDCLBLoxoP2BQkBKnTbNi8/upgjcpSsZbOExrL8qPxc5Ir7Pm6nJtvdei4FEt HnGZ33RB5cuY4dFPkBWNHZ95/kbI3ZqSg81eZ49HT2gGYCrJ1f1yLffULdu2ojglvsJJ tFwup3B88fDvn7OM4VuVsRaBLzYOTefyA6Q1ANAVYZI3S8KD8cROWu47e3Qp27zejRIo LYz1klH1ikngMzG+aIqpAJzV8EEzFMS+VsUJg448zveiTH+SUo+ca/YtoJ//b9d0R7En ylWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FNPH219O; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gr15si2244347ejb.272.2019.05.10.10.43.24 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 May 2019 10:43:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FNPH219O; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:47647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hP9YJ-0002nk-QD for patch@linaro.org; Fri, 10 May 2019 13:43:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hP9MV-0007TX-0g for qemu-devel@nongnu.org; Fri, 10 May 2019 13:31:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hP9MU-00067t-3x for qemu-devel@nongnu.org; Fri, 10 May 2019 13:31:10 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:40333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hP9MT-00067S-Uu for qemu-devel@nongnu.org; Fri, 10 May 2019 13:31:10 -0400 Received: by mail-pg1-x542.google.com with SMTP id d31so3331433pgl.7 for <qemu-devel@nongnu.org>; Fri, 10 May 2019 10:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=LA1zmsYxmzBAEiSSaTbYsFeqnklh9uk6Ygv0EHqOLtQ=; b=FNPH219OQ0b5NQFTLYr6qpuNP/ia06SlQEpUiIzLc3TyDA5TWvjGWa1re+Ocdw+oN3 XY8VJIv36iFk7zFNJZ2aiLd+zCPWke+1ASbAw7piHG8/uhA4VpC5gFji2+zKfzSS6Ur2 1QaMnFgn6lc8YtDNa8zDc71DVvQG7tzFND10aJrnlOXWkjDcNnZeCkXAs1kdIgF4mUOq IC5LMWKfCAlXRZbFUQnCuieTTF/9x0MU7w58Gqcju1nc3khvPQhOB1xVSPWCgdknS8u9 ar3wyyjkfKMWG7gUdePlY6YizDJG5ijb8GC+k0S85x12F3hZYcn+o+n4RQV/CvFU16gM BpAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LA1zmsYxmzBAEiSSaTbYsFeqnklh9uk6Ygv0EHqOLtQ=; b=Dml8TncuL3rmlDZ/Y3reJjcdsQMZoQ9mNgIDKsgSrFAc/Z5+9UM9O/PT+62VSsvUTp uVyu08ATkPHMc0eMC3jin5kanGNyaXvsa9R4ckYwgf7k89CABv+J0q1R+t9KgQP05UKI hbKbba/cMVUXMBFPmICBK1XACnnEWnd3EbdEQj51tRPWOqvbEdE3NHx+qLa96GwCD0np Zd9lhprHy/lZg7AYkRzfj5mTZkzbOTDy8U1j0YGqvFbRiHw8Is75qg9FG8R+Q038JdBW S70c67VO60acs+fpmRv4fCqdky+fvKjs3+QbDDQ5ewOKAdUZpUAg73vmn7Jik7y9cVaV ttXg== X-Gm-Message-State: APjAAAVXBTEaT2PZ8QaAnNOSZqm4bwKGoCMm6V2bqhLoU0oh+zszKUt1 b3+ndbELhIQHcS9QTFZXM2fqpRfT7qM= X-Received: by 2002:a63:1d05:: with SMTP id d5mr15173262pgd.157.1557509468739; Fri, 10 May 2019 10:31:08 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id v64sm7936792pfv.106.2019.05.10.10.31.07 for <qemu-devel@nongnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 10:31:08 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 10:30:38 -0700 Message-Id: <20190510173049.28171-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510173049.28171-1-richard.henderson@linaro.org> References: <20190510173049.28171-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH v6 14/25] linux-user: Use qemu_guest_getrandom_nofail for AT_RANDOM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
Add qemu_getrandom and ARMv8.5-RNG etc
|
expand
|
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index ef42e02d82..1e06b908b7 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -7,6 +7,7 @@ #include "qemu.h" #include "disas/disas.h" #include "qemu/path.h" +#include "qemu/guest-random.h" #ifdef _ARCH_PPC64 #undef ARCH_DLINFO @@ -1883,12 +1884,9 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, } /* - * Generate 16 random bytes for userspace PRNG seeding (not - * cryptically secure but it's not the aim of QEMU). + * Generate 16 random bytes for userspace PRNG seeding. */ - for (i = 0; i < 16; i++) { - k_rand_bytes[i] = rand(); - } + qemu_guest_getrandom_nofail(k_rand_bytes, sizeof(k_rand_bytes)); if (STACK_GROWS_DOWN) { sp -= 16; u_rand_bytes = sp;