Message ID | 20190510012458.22706-6-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 j2csp1724127ilr; Thu, 9 May 2019 18:31:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwimVs7PMvMn4DEe0gUZak6JL6MUiIY//GOoatL+5Wo/D0+5O7yFWRBtNFnEvR/1eMjP87V X-Received: by 2002:a5d:55cc:: with SMTP id i12mr5417069wrw.179.1557451863892; Thu, 09 May 2019 18:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557451863; cv=none; d=google.com; s=arc-20160816; b=RaLhzYrS13Y2ZG7tva0t1GrdHYhi0OMlfKmMn6c5b0mDWMQ/pvH+bVhGQnv9PrKBUQ klakTdme0dGTbStsBirWF5+r1opgQnGfVe+iTBgbkDgmK/yJFENdfmYnD81siJSJQOPM VYBiZUTTU5at5uOzG3yZrOE2YC52Sh9YizRj8FkORsFiPUBkvIlKWpdCzPEMCFkeZBuL SsEDcqo721XUGJw2XPU0ziPJuxFslCtVjzzUO+jbbfniUhyUeurJq0pfUJCYbWuAuniS ljtX8G0DkpYDgLS7L/Fpyt1+/CgNgBz+QSgTn+Meg+0j7TUoXGB4BzawRt2IyD+/W/Bf zsig== 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=p/AR+QB1/uCfqQ+ytrGBnYCYqwPtnBM3b7CBgieQEw0=; b=p3LIRLjIj2X8NAk/EActDXlaxPPUDn6wZt0tg1QtoyKlRY/OCunIy6dmNodhvqRmjY PdvO3ZsRc+BfMGjcaocQSA3X1vfeHX1UDUrTRIVs5sgyDRiffeumR4Z0PRdUIYtIMSe8 yocppoc3H1aybZEh0FG4IYKawXHJ+OsdjCknkx7BDF7/c75HHLFBfuLcRAdmkwETiAhN 8awzFHDApmztmOQNINTOgVEYnFkw+lrK/1byP3EFWjPNJBJwK5o/CNx1AW+2E8LUt0l1 cxsOPlhqwt++iIc0T9YJ1+DM8m6yzQRrkIb15bJscv4OMr+Nn0vtdsSPvcIl5tXwV05M +xdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=q9FC5WjX; 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 s15si2635054wmc.4.2019.05.09.18.31.03 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 May 2019 18:31:03 -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=q9FC5WjX; 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]:35080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hOuNK-0003Qc-Q8 for patch@linaro.org; Thu, 09 May 2019 21:31:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hOuHk-0006Iv-Ig for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hOuHj-00014R-AK for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:16 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:47002) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hOuHj-0000vt-3Q for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:15 -0400 Received: by mail-pl1-x641.google.com with SMTP id bi2so1971614plb.13 for <qemu-devel@nongnu.org>; Thu, 09 May 2019 18:25:07 -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=p/AR+QB1/uCfqQ+ytrGBnYCYqwPtnBM3b7CBgieQEw0=; b=q9FC5WjX7Sjp9A4E/k9cgfEf7yTbFV4yLRQJSZnkUh2FFec8t/Uz+/GgB650uA+f3T 4aU9dWy+5aQR/SyeX59WPaPYYNzcMbWumNI3YgklONkhrwwyTZmifKDWZoK0hPT4jofh Ft8MN8WWsuOiozsvu1Ueugk8/sainc6H6uQVjYlLiZ1RaLJrqqZ67AZ7idWXiZrj/6WT hdSGeOZOHojHZR7HV42rejEG0kZzc2nL3Ns1yyhSg6OQ7dC+Z9g8aDJBTpzrFNBYAQAV EB+4+YrgLhz+wxCYxoJ0wR6IP7vwqtcC53jBxnlfks0WS03jZGUlrADPgzQlPdcuqQNs HpRw== 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=p/AR+QB1/uCfqQ+ytrGBnYCYqwPtnBM3b7CBgieQEw0=; b=obp1S+l9cKA/u1QRzzZWW5BzD8MbU2EbgpAmpIc5SSvV3uq6QcaQln/+ePaapeeNkN BuTu3Zby9RFmvul3NRX8FkWdBejxL0IBltut3ROIX0MlrdQEYXEBBUQ1ENBg2TT/QjfB lGo3cs3iWLYnm1i54SrWcQ9GJjmvaWIR68F8yCzVGgU0A6bjZyNwcKCykuekd6MsPgEU cVhuV99VEvJRuf0PgQE5eWJLyxdrANhWDIZi9EUyv6LbEcifo6w54BJzft1RVb77Puza E2iaSDTlG3mMPNIX+oCUxntz2c+WK0SB3RN2ZWG3ySJsSNRoRdievOS1ke3N5GXJkUK3 gbxQ== X-Gm-Message-State: APjAAAWXFHByz/XLiTjuNk3bAS3cQekNx+GhBlju648lFn+e3DXHszYW GNMKOgUAm4C8Z0G+SvC3663uW6v5u8A= X-Received: by 2002:a17:902:7c8f:: with SMTP id y15mr9415198pll.339.1557451506794; Thu, 09 May 2019 18:25:06 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id n18sm8252700pfi.48.2019.05.09.18.25.05 for <qemu-devel@nongnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 18:25:05 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 18:24:39 -0700 Message-Id: <20190510012458.22706-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510012458.22706-1-richard.henderson@linaro.org> References: <20190510012458.22706-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::641 Subject: [Qemu-devel] [PATCH v5 05/24] crypto: Use O_CLOEXEC in qcrypto_random_init 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/crypto/random-platform.c b/crypto/random-platform.c index 260b64564d..6df40744c7 100644 --- a/crypto/random-platform.c +++ b/crypto/random-platform.c @@ -42,9 +42,9 @@ int qcrypto_random_init(Error **errp) #else /* TBD perhaps also add support for BSD getentropy / Linux * getrandom syscalls directly */ - fd = open("/dev/urandom", O_RDONLY); + fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC); if (fd == -1 && errno == ENOENT) { - fd = open("/dev/random", O_RDONLY); + fd = open("/dev/random", O_RDONLY | O_CLOEXEC); } if (fd < 0) {