From nobody Sat Feb 17 21:33:10 2024 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 4TchqW1zqbz59l1W; Sat, 17 Feb 2024 21:33:11 +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 4TchqW0XkKz4hyW; Sat, 17 Feb 2024 21:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205591; 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=Hj++eqNH7cFzEbH8RI2rm2cAWWMnLhXLHxvhOWCF5ZY=; b=egGJcrv137WpCgwJaYQTBEWk2qTtQG6lfQLRQ5W3s665IZXlidyHwWWm1q1/15YC6EhjjA ilkRYsMa948FDRFoTzqIewB6DhN3OnSaEtRqF2IIhr0M0fkrWJPNT/J/A4/NE94bNLaboi omnW5cqRH9SxcWhcem02MTidrKmbLCnylbBSRUuWRy0SzbRqgrLxc+26rUyexXf+FnoqGb T3XPSL6PSY3uLchjWXp/OAO2n5eWF1n/vI+LZKtAkZw9UToFx3EpIGE3c9h+BfWDUYCvNJ TZhNoFDLBqQ9wq6cI7J5U7gLrz5S45GxEX5k5mWQE4OA5Y4J3vmg3anI/gothg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205591; 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=Hj++eqNH7cFzEbH8RI2rm2cAWWMnLhXLHxvhOWCF5ZY=; b=mmJfH3jgS5Hl+gT7Sp47iUnWQj5nlZGPNdUEvHXEJ3eoInO2n6j1iguD+2CG2rEB87N/Ao ozf88WGYlBNLcnv6A7jVC/4djb1R3wGQ7y1BycVVqXK/T/ccHEkXq8LCn6j+scg6om19DV JIB8O5MEZ9X04CCQQwTiY8XtnFpXvIFA2oH19nqVXpzTUL3OOnUIde2/nm1+4B8tHQ8jNH KjN2F0TNdKFkWeum9u3ZM+zRxvT5d8oAKqviqmRDO2cJCaO1J9ih0rUfO7oQTgpNU/7Qzf d1SAHt/5V5DhN2ySPhr468oLSGppfTZ154QoAqlWM4YzybR2TLKCEWu7qA7XUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205591; a=rsa-sha256; cv=none; b=EvNxJgiEcITNgKi+8y5380kmrDSwoBRLcUKY/I4/MZdFz6/YyJt6j67vS7u7qTXI08TdkE 10JSJ0Fv45dWsEM0Yqq3lUAgC7xJ08WHW9zjhmqJ0+7dk54GMiO9GgvE7PYwg8bUG+WwQ3 2xbtClhxCBzdctBdkNF5cbJqhgnjievoIs3tS20mCwNBWonCxbYxCQP9kYPcwmW8cCNcUS sliC/z4odZt54r6SaSSDTj0WCbby+sCizZUvQqSVHjldSGoeJ49Sr+KcPk6jrhNNu4GhI0 sFoFkvCKMlTbw3+nvjNPrPqMqqyzTerLFE7lklAOSNHKbzMFQAs7t4L32R/E+w== 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 4TchqV6lFnzP5V; Sat, 17 Feb 2024 21:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HLXAxQ021229; Sat, 17 Feb 2024 21:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLXA69021226; Sat, 17 Feb 2024 21:33:10 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:33:10 GMT Message-Id: <202402172133.41HLXA69021226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: c535e8ae7f61 - stable/14 - LinuxKPI: Add get_random_u64() function 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c535e8ae7f6137f8ecda2ec503eee253bab8a67e Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c535e8ae7f6137f8ecda2ec503eee253bab8a67e commit c535e8ae7f6137f8ecda2ec503eee253bab8a67e Author: Vladimir Kondratyev AuthorDate: 2023-12-24 08:20:00 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:38 +0000 LinuxKPI: Add get_random_u64() function Sponsored by: Serenity Cyber Security, LLC Reviewed by: manu, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42816 (cherry picked from commit 7f88d742e578c4cef4e26ce10b9a936e58237964) --- sys/compat/linuxkpi/common/include/linux/random.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/random.h b/sys/compat/linuxkpi/common/include/linux/random.h index 5335cca8251c..e87d4412ea4e 100644 --- a/sys/compat/linuxkpi/common/include/linux/random.h +++ b/sys/compat/linuxkpi/common/include/linux/random.h @@ -87,6 +87,15 @@ get_random_long(void) return (val); } +static inline uint64_t +get_random_u64(void) +{ + uint64_t val; + + get_random_bytes(&val, sizeof(val)); + return (val); +} + static __inline uint32_t prandom_u32(void) {