libosmocore[master]: Enable GnuTLS fallback

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Nov 1 11:19:18 UTC 2017


Patch Set 2:

> Could you elaborate why that's more efficient?

Isn't it the cost of a syscall (very expensive) vs. the cost of a single conditional if statement?  Or am I missing something?


 > AFAIK with the way we use getrandom, it can only fail permanently

yes, exactly.  This means that on the first getrandom() call it will fail the syscall -> we fall back to gnutls and memorize that fact.  On second and further calls, we simply go directly to gnutls.


 > Moreover, I think GnuTLS uses getrandom internal when it's
 > available so I doubt that direct getrandom() call would fail for us
 > but succeed for GnuTLS.

we are using gnutls for fallback in case there is no getrandom().  So gnutls would never be used in a situation where getrandom() is available, right?

 > Overall, I'd rather keep it as it is: isolated fallback for old
 > systems which can be trivially removed once we do not have to
 > support them anymore. Unless you have strong opinion to the
 > contrary of course.

I am arguing for a "trivial fallback" but in a way that a single binary will determine at runtime if getrandom() is available, or if not, fall back to gnutls.

-- 
To view, visit https://gerrit.osmocom.org/4593
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic77866ce65acf524b768882c751a4f9c0635740b
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-HasComments: No



More information about the gerrit-log mailing list