libosmocore[master]: Enable GnuTLS fallback

2017-11-02 Thread Harald Welte
Patch Set 9: Code-Review+2 -- 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: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Ger

[MERGED] libosmocore[master]: Enable GnuTLS fallback

2017-11-02 Thread Harald Welte
Harald Welte has submitted this change and it was merged. Change subject: Enable GnuTLS fallback .. Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id()

libosmocore[master]: Enable GnuTLS fallback

2017-11-02 Thread Max
Patch Set 9: OS#2610 is created to track optimization suggestion. -- 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: 9 Gerrit-Projec

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-11-02 Thread Max
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#9). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would alw

libosmocore[master]: Enable GnuTLS fallback

2017-11-02 Thread Harald Welte
Patch Set 8: Code-Review+2 (1 comment) I'm happy to merge it, but my original review comments about using a static variable to cache whether the syscall works has not been implemented. Please follow up with that in a later patch (or create a ticket as a reminder for this optimization) https:

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Patch Set 8: That's odd - why there're 2 rebuilds triggered by single gerrit push? -- 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

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#8). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would alw

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#7). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would alw

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Harald Welte
Patch Set 6: Code-Review-1 * getrandom() and SYS_getrandom only used if detected at compile time * if either of those returns an error at runtime, fall back to gnutls (if present/selected at compile time) -- To view, visit https://gerrit.osmocom.org/4593 To unsubscribe, visit https://gerrit.os

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#6). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return fai

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#5). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return fai

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Patch Set 3: I've updated comments and commit message. My confusion comes from following: currently we check for glibc version and syscall availability at compile time - and use either of those if available. The GnuTLS fallback is added in the same way: if compile-time check for getrandom (bot

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#3). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return fai

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Patch Set 2: > 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. Ah, get it now - misunderstood your comment altogether. Will send updated patch shortly. -- To view, visit https:

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Harald Welte
Patch Set 2: > > I would argue to activate the --enable-gnutls by default, if it > is present on the system. > > > Or maybe rather, fail configure.ac if gnutls is not found AND no > --disable-gnutls was present. > > What should be the default for .deb packages? a run-time fallback to gnu

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Harald Welte
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

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Patch Set 2: > I would argue to activate the --enable-gnutls by default, if it is present on > the system. > Or maybe rather, fail configure.ac if gnutls is not found AND no > --disable-gnutls was present. What should be the default for .deb packages? -- To view, visit https://gerrit.osmoc

libosmocore[master]: Enable GnuTLS fallback

2017-11-01 Thread Max
Patch Set 2: > it makes sense to cache the failure of the syscall and not attempt to use the > syscall at every random number generation to then fall back to gnutls Could you elaborate why that's more efficient? AFAIK with the way we use getrandom, it can only fail permanently iff we use it i

libosmocore[master]: Enable GnuTLS fallback

2017-10-31 Thread Harald Welte
Patch Set 2: I would argue to activate the --enable-gnutls by default, if it is present on the system. But I don't have a strong opinion here. Or maybe rather, fail configure.ac if gnutls is not found AND no --disable-gnutls was present. Furthermore, in terms of efficiency (we allocate TMSIs

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-10-30 Thread Max
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/4593 to look at the new patch set (#2). Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 8 "jessie" for example) the osmo_get_rand_id() would always return fai

[PATCH] libosmocore[master]: Enable GnuTLS fallback

2017-10-30 Thread Max
Review at https://gerrit.osmocom.org/4593 Enable GnuTLS fallback On systems with GNU/Linux kernel older than 3.17 (Debian 7 "wheezy" for example) the osmo_get_rand_id() would always return failure. To support such systems, let's add fallback code which uses GnuTLS library. It have to be enabled