From nobody Thu Feb 17 05:06:00 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A337519D1BC5; Thu, 17 Feb 2022 05:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JzjTN47sYz5742; Thu, 17 Feb 2022 05:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645074360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C2RTiD6ezAsIkBppYbJbi09BdbyAnYpcIUsAcg5sGRI=; b=ff/lT/EAS/YYd9pC2MGAIEhQXWWxEZOZ7WDel6ottVYKy37//OZl8L7kXqZQLGYt2ciXQJ qU1a+WAFsjsuQ/0XgzMXlYdLQ7mFesuKIZExRsriO5iuWQYO8W1HIDGJUUZqMYb5kzCdvQ +69N2+SrDDgVi+jYoqj9DKeXtt3k7O4iO4EO4ubbnJL42EIYLZEe/emXeFJzp4vGx3BtGo LQL8LDbCNkT9IcvozNQ4ga+nEcpEb6hccGyVZw+MP9CW3zhUX7WGFtrcAxUhjq17gZCTdn xfnWVacmnDX6cNDuv/41t47ECpE/JxTXTfzQlFeqDMHhr4l7QRAiOYsVz8dFAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F31E23A4D; Thu, 17 Feb 2022 05:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21H5607H050691; Thu, 17 Feb 2022 05:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21H560t0050690; Thu, 17 Feb 2022 05:06:00 GMT (envelope-from git) Date: Thu, 17 Feb 2022 05:06:00 GMT Message-Id: <202202170506.21H560t0050690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "David E. O'Brien" Subject: git: edede7d79a26 - stable/12 - random(4): De-export random_sources list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: edede7d79a26e747460586d0621a59fa7ed35f7e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645074360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C2RTiD6ezAsIkBppYbJbi09BdbyAnYpcIUsAcg5sGRI=; b=DQIG3Om68QdXHWHaYOovHtM7tohUKWFEj9F1cohNr06jo0HMtd5ugllyXx2yZbxkEtp88a F2ZRT2wNde1chNrYqcc4Y7DFZYIGVE7Mbyh9kpL80rqR34A/1sKYX0AWH/B0qtOzd1G0O4 nQSMQZ6SSNj0hew2ZOTPIZfjJMt9CSBzSFc7h8Q/Ng19rCpxu/bxyZZvEyMb9Az/OWIIHi aFDXJcNDWANcH1YbP1JpahIp/bqR7vKroMetuzJ4XXeh+EQsiGfJr1yG4LSMpRxTw4COPP 4Btfq2MRII5AWgRm28Az9JT4ZCOBr8wmK/lOwxByTYZZjo1Dmn2nZ7Eut+bQow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645074360; a=rsa-sha256; cv=none; b=Zb87wJeCgEZ5kpadPfiWbQTPXyrKA3cy/lq9G7FsvlW19Kei02w0myJZeuTgwyHKR9GWGw ltVz5cjIj30JzU68yXou3E1GB6UDps2veIPqrVBAeUq3ORPnWlJtUganLfZZq+72Jm4yzy fm6RemSX8EdhGpS+EeUH9ROQjSYWZFNgZsTrmLlVsGfD1t1XCDgHFgl1B93TtDgyzHaoW3 AnFCMx3HychFWxfEVC6QrSSh1rLCi1BF/1o84rwoGX54mZIzZ9hz4dPZOER9v2VsetyhIY I/T1YeIaBmK1aOFvzQrcaIpZP/kRkR0oEqfbUbrsLOkEEzFbGHo3Q1H39rEFhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=edede7d79a26e747460586d0621a59fa7ed35f7e commit edede7d79a26e747460586d0621a59fa7ed35f7e Author: Conrad Meyer AuthorDate: 2019-11-22 20:24:15 +0000 Commit: David E. O'Brien CommitDate: 2022-02-17 04:57:46 +0000 random(4): De-export random_sources list The internal datastructures do not need to be visible outside of random_harvestq, and this helps ensure they are not misused. No functional change. (cherry picked from commit b6db1cc7100350790201bfa550ec47d9a5fbe781) --- sys/dev/random/random_harvestq.c | 8 ++++++++ sys/dev/random/random_infra.c | 2 -- sys/dev/random/randomdev.h | 8 -------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index 0c6777ba9d0d..035b5c028fb6 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -87,6 +87,14 @@ volatile int random_kthread_control; */ __read_frequently u_int hc_source_mask; +struct random_sources { + LIST_ENTRY(random_sources) rrs_entries; + struct random_source *rrs_source; +}; + +static LIST_HEAD(sources_head, random_sources) source_list = + LIST_HEAD_INITIALIZER(source_list); + SYSCTL_NODE(_kern_random, OID_AUTO, harvest, CTLFLAG_RW, 0, "Entropy Device Parameters"); diff --git a/sys/dev/random/random_infra.c b/sys/dev/random/random_infra.c index 9a40c35f12b7..19973ac4b46d 100644 --- a/sys/dev/random/random_infra.c +++ b/sys/dev/random/random_infra.c @@ -101,8 +101,6 @@ SYSCTL_BOOL(_kern_random_initial_seeding, OID_AUTO, MALLOC_DEFINE(M_ENTROPY, "entropy", "Entropy harvesting buffers and data structures"); -struct sources_head source_list = LIST_HEAD_INITIALIZER(source_list); - #if defined(RANDOM_LOADABLE) struct random_algorithm *p_random_alg_context = NULL; #else /* !defined(RANDOM_LOADABLE) */ diff --git a/sys/dev/random/randomdev.h b/sys/dev/random/randomdev.h index abed568fb215..896b31a5fea2 100644 --- a/sys/dev/random/randomdev.h +++ b/sys/dev/random/randomdev.h @@ -102,14 +102,6 @@ struct random_source { random_source_read_t *rs_read; }; -struct random_sources { - LIST_ENTRY(random_sources) rrs_entries; - struct random_source *rrs_source; -}; - -LIST_HEAD(sources_head, random_sources); -extern struct sources_head source_list; - void random_source_register(struct random_source *); void random_source_deregister(struct random_source *);