Change in osmocom-bb[master]: Move from libc random() to osmo_get_rand_id (2nd attempt)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Holger Freyther gerrit-no-reply at lists.osmocom.org
Mon Jul 23 19:56:04 UTC 2018


Hello Harald Welte, Jenkins Builder, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/10098

to look at the new patch set (#4).

Change subject: Move from libc random() to osmo_get_rand_id (2nd attempt)
......................................................................

Move from libc random() to osmo_get_rand_id (2nd attempt)

When starting multiple mobile in the same second, the libc random number
generator will be seeded to exactly the same value.

The random bits inside the RACH request(s) will be exactly the same
across multiple mobile and when the channel fails they all pick the same
randomized back-off timing.

Use stronger random numbers and replace all calls to random(2) with
osmo_get_rand_id. Add a fallback to try random().

[v2: Add helper to make sure the result is int and between 0 and
RAND_MAX]

Change-Id: Icdd4be88c62bba1e9d954568e48f0c12a67ac182
---
M src/host/layer23/include/osmocom/bb/common/Makefile.am
A src/host/layer23/include/osmocom/bb/common/utils.h
M src/host/layer23/src/common/Makefile.am
A src/host/layer23/src/common/utils.c
M src/host/layer23/src/mobile/gsm322.c
M src/host/layer23/src/mobile/gsm48_mm.c
M src/host/layer23/src/mobile/gsm48_rr.c
M src/host/layer23/src/mobile/settings.c
8 files changed, 61 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/98/10098/4
-- 
To view, visit https://gerrit.osmocom.org/10098
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Icdd4be88c62bba1e9d954568e48f0c12a67ac182
Gerrit-Change-Number: 10098
Gerrit-PatchSet: 4
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180723/7c947bd9/attachment.htm>


More information about the gerrit-log mailing list