I see random() mentioned in man pages and /usr/include/sys/libkern.h on 14.0-RELEASE. It was slated for removal with 14.0-RELEASE. However, it looks like it was not removed.
Where did you see that it would be removed?
Hi Ed, It's in man section 9 for random. https://man.freebsd.org/cgi/man.cgi?query=random&apropos=0&sektion=9&manpath=FreeBSD+14.0-RELEASE+and+Ports&arch=default&format=html https://cgit.freebsd.org/src/tree/share/man/man9/random.9?h=releng/14.0#n135 Thanks!
oh, random(9), not random(3)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f50322c1dcfe369ad73e1123541d18fc431384f6 commit f50322c1dcfe369ad73e1123541d18fc431384f6 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-03-18 20:02:08 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-03-18 20:03:49 +0000 random(9): bump removal to FreeBSD 15.0 It has not yet been removed, and still has some in-tree consumers. PR: 277655 Sponsored by: The FreeBSD Foundation share/man/man9/random.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Thank you! Is there another issue tracking what consumers still exist?
There is no other issue for tracking that I'm aware of. A grep turns up instances in: sys/contrib/libsodium/src/libsodium/randombytes/randombytes.c sys/contrib/openzfs/tests/zfs-tests/cmd/btree_test.c sys/contrib/openzfs/tests/zfs-tests/cmd/file/file_trunc.c sys/contrib/openzfs/tests/zfs-tests/cmd/readmmap.c sys/contrib/openzfs/tests/zfs-tests/cmd/rm_lnkcnt_zero_file.c sys/contrib/openzfs/tests/zfs-tests/cmd/xattrtest.c sys/dev/al_eth/al_eth.c sys/dev/bce/if_bcereg.h sys/dev/hpt27xx/hpt27xx_os_bsd.c sys/dev/hptmv/entry.c sys/dev/hptnr/hptnr_os_bsd.c sys/dev/hptrr/hptrr_os_bsd.c sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c sys/dev/mlx5/mlx5_core/mlx5_vsc.c sys/dev/random/unit_test.c sys/dev/syscons/dragon/dragon_saver.c sys/dev/syscons/fire/fire_saver.c sys/dev/syscons/plasma/plasma_saver.c sys/dev/syscons/rain/rain_saver.c sys/dev/syscons/snake/snake_saver.c sys/dev/syscons/star/star_saver.c sys/dev/syscons/warp/warp_saver.c sys/geom/multipath/g_multipath.c sys/kern/kern_fail.c sys/kern/kern_synch.c sys/kern/subr_fattime.c sys/kern/subr_stats.c sys/net/altq/altq_classq.h sys/netgraph/ng_pipe.c sys/netinet/cc/cc_cdg.c sys/netinet/cc/cc_chd.c sys/netinet/cc/cc_hd.c sys/netinet/igmp_var.h sys/netpfil/ipfw/dn_aqm_pie.h sys/netpfil/ipfw/dn_sched_fq_codel.c sys/netpfil/ipfw/dn_sched_fq_pie.c sys/netpfil/ipfw/ip_dn_io.c sys/netpfil/ipfw/ip_fw2.c sys/netpfil/ipfw/test/test_dn_heap.c sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c sys/tests/fib_lookup/fib_lookup.c sys/vm/memguard.c
Created attachment 249283 [details] sys/netinet/cc switch from random() to prng32()
I see, thank you! I drafted up a quick patch for sys/netinet/cc/. It's untested and I don't understand all of the implications of the changes. If it's worth reviewing, where should I submit it?
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=466e0dc5ce78da69c14dd993d12ef21a62deca5b commit 466e0dc5ce78da69c14dd993d12ef21a62deca5b Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2024-03-18 20:02:08 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-03-22 13:30:31 +0000 random(9): bump removal to FreeBSD 15.0 It has not yet been removed, and still has some in-tree consumers. PR: 277655 Sponsored by: The FreeBSD Foundation (cherry picked from commit f50322c1dcfe369ad73e1123541d18fc431384f6) share/man/man9/random.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Might it be possible for you or someone else to review my patch? If I should submit it through another avenue, please let me know!
A modified version of my patch was merged. I updated the title to track the random() removal for 15.0. Still lots of random() calls being made.