Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3022366lqo; Tue, 21 May 2024 04:48:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9hFvps4VeKwNKQ8Djm98823EA52jafajc8LEjbGQQX8ixlPYIZ077AiqWh3Q1Yoh7y0ayzarIEZRqtuBgp+mUJIZ9YcGjbv0C9O31Cw== X-Google-Smtp-Source: AGHT+IGoOL2/NgJAW+xsRHdTj7o7DSps5hvC4XcQ6DfgNTv3QMlhFFmZ8DSoOGlxOs3iNl9PCFR6 X-Received: by 2002:a05:6214:554a:b0:6a9:7306:dc9c with SMTP id 6a1803df08f44-6a97306e773mr90100086d6.37.1716292103444; Tue, 21 May 2024 04:48:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716292103; cv=pass; d=google.com; s=arc-20160816; b=QFZOsxNXM2jxI8ud/4PKWn8AUqb4ApdrKc4tNyPkp6pxgkMMjO8qvZcX6ovRucsDgY 6TaWKTuvUx4MCP+gfRBDA0Z9xiG/6Kp8OKc5iSFheGMTqodnifV/OYDBjnkwCOmLS0Rc uNNbZcryBd88eYlj9hzlAOfzbVj+/UpzirMdlkbUmbOX9E60bJhS7VFxgSs3GIW9IjpS TajLQo9XH5DrLvmq+HaQnCLi9RKlfnByiP4mczSI2ux+GmJaZmeqBAO/zjJz34gObZZY D6TT3VS13AtqHO3W8cOtmqs07FVC6L+LbflHK8lv3fGFzy2l3fuAgY7vbgcolLXgWW4w U/rA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=ScVJ44SNNv7slncCQ9AbQNPMEQULt+EbdHOtj84evl4=; fh=4uo0VF0qNgCTM+HVL+uhZgSPfWc/acrjO0yaKBfwhJs=; b=Ddt43Bfsjr9FMXx1ac2rJWbQ1bOUF61OVcOgi08sxPbGMFrp3bnjf4tJP0Txvken5z WqF7dyi3sJtcdike9pDvbijPkF4zJEj0UdY6gvuLSyeEc4Yhzts/CivHDtGX0sowlol/ GdbhGLo1+LS2zvwS9s69QtnA6Qjac8EOyGmE9tCusWN+DQqZNh3zqmiYPeiMT24TaJA2 Tf1Ooafcmdgno8HF0Y7uV1RLGmXrboZekdIGnXY5qWDl3idoTC8KlW2QnENIYIHkcBFD g4b9GyEiZ2y18VyUqHu35yoLAoSrVQchRVT6rDQJQSzc1G8YQiUyhwNtNqau88a8MWrh WAqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YFxMZ9EM; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-184894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ab6c08fdedsi6056646d6.85.2024.05.21.04.48.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 04:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YFxMZ9EM; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-184894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2E6641C21DC4 for ; Tue, 21 May 2024 11:48:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24B127442F; Tue, 21 May 2024 11:48:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YFxMZ9EM" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10F0547A74 for ; Tue, 21 May 2024 11:48:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716292097; cv=none; b=USFihDTD11sFyLXdopg5mZTCCVi7dHQsnLbbrQf2dvLt5AAgaIln9XlsezvPwBhOTZRMySIrlqZ1CNVrEwCOLIYaS5bTpuK4YEf6OA3p6MowXSrSZNEHjGkANcBBWq4OlcdMiuZ9iRKS6fQ3FdMRur4Y1P1lqA4duO/ieNXUs5s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716292097; c=relaxed/simple; bh=mOJoqoemCb2h0NhMLeFjcITMcLIhyF49JAEwSdnhYe0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=qhw0/W5tQuEKVml11ZdoKTANv8UyMu0EFBuEx7ci11erCl7IuEBNjCZ2W/cXwBCPozhG5HISW32GlvcNNDbv5rkkdhMuqXX3YHrRqX1vUM1S8RepDPPn6nx3OBBLtyIKVBFHRhn95dXPfb648pl/0sZfaTtf4FJv45M5qyQz0EQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YFxMZ9EM; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716292095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ScVJ44SNNv7slncCQ9AbQNPMEQULt+EbdHOtj84evl4=; b=YFxMZ9EM0YjhLC3HyWtE3uNEyhF3kB85sZ1NJ4aqkvRTQmG4T0jMPhFSoysNwQfVPNRV/B N9nNm+3D9oNW19oPwkFsZ3nFzhxog0PKTZml1D2jI4HFhWAf5XVM61TKUlHYYbsYji5QHS oQ9AFYhWHm0PTVN8cAhH5Pkf1SRe8hA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-445-9tXyyicKP1y7f5W_UJ-cyg-1; Tue, 21 May 2024 07:48:13 -0400 X-MC-Unique: 9tXyyicKP1y7f5W_UJ-cyg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3852A8058D1; Tue, 21 May 2024 11:48:13 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58FF8400EBE; Tue, 21 May 2024 11:48:12 +0000 (UTC) From: Florian Weimer To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, tglx@linutronix.de Subject: Re: [PATCH v15 2/5] random: add vgetrandom_alloc() syscall In-Reply-To: <20240521111958.2384173-3-Jason@zx2c4.com> (Jason A. Donenfeld's message of "Tue, 21 May 2024 13:18:40 +0200") References: <20240521111958.2384173-1-Jason@zx2c4.com> <20240521111958.2384173-3-Jason@zx2c4.com> Date: Tue, 21 May 2024 13:48:10 +0200 Message-ID: <87msoj5qth.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 * Jason A. Donenfeld: > Libc is expected to allocate a chunk of these on first use, and then > dole them out to threads as they're created, allocating more when > needed. The returned address of the first state may be passed to > munmap(2) with a length of `num * size_per_each`, in order to deallocate > the memory. I think =E2=80=9Cfirst use=E2=80=9D actually means =E2=80=9Cprocesss start= =E2=80=9D here? We don't have a way to report failure from arc4random and similar interfaces. Thanks, Florian