lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2023

  • 1 participants
  • 1601 discussions
[S] Change in pysim[master]: usim: Add EF.ePDGSelection + EF.ePDGSelectionEm support
by fixeria 11 Dec '23

11 Dec '23
Attention is currently required from: dexter, laforge, lynxis lazus. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35272?usp=email ) Change subject: usim: Add EF.ePDGSelection + EF.ePDGSelectionEm support ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I760a394ae1eac5f1175dc9b86c11b4a60671582e Gerrit-Change-Number: 35272 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 11 Dec 2023 07:42:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: USIM: add support for EG.ePDGIdEm (Emergency ePDG)
by fixeria 11 Dec '23

11 Dec '23
Attention is currently required from: dexter, laforge, lynxis lazus. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35271?usp=email ) Change subject: USIM: add support for EG.ePDGIdEm (Emergency ePDG) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I71cb7a4b9323f57b96db2d9f12f1567eda63f742 Gerrit-Change-Number: 35271 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 11 Dec 2023 07:40:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly
by fixeria 11 Dec '23

11 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email ) Change subject: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly ...................................................................... utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly Currently, OSMO_STRBUF_REMAIN would return a huge number if the given strbuf has its .pos pointer set to NULL. This macro is safe against the .buf pointer being NULL, but not against .pos being NULL. Fix this by adding a static inline function (for the sake of code readability) and handle .pos being NULL properly by returning length of the buffer. Add a unit test. Change-Id: I294a74a99c40995cf7fb5520d61f697d967be5a4 --- M include/osmocom/core/utils.h M tests/utils/utils_test.c M tests/utils/utils_test.ok 3 files changed, 56 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/35312/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index b6e67e2..973a9d0 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -281,8 +281,21 @@ #define OSMO_STRBUF_PRINTF(STRBUF, fmt, args...) \ OSMO_STRBUF_APPEND(STRBUF, snprintf, fmt, ##args) +/*! Get remaining space for characters and terminating nul in the given struct osmo_strbuf. + * \param[in] sb the string buffer to get the remaining space for. + * \returns remaining space in the given struct osmo_strbuf. */ +static inline size_t _osmo_strbuf_remain(const struct osmo_strbuf *sb) +{ + if (OSMO_UNLIKELY(sb == NULL || sb->buf == NULL)) + return 0; + if (sb->pos == NULL) + return sb->len; + return sb->len - (sb->pos - sb->buf); +} + /*! Return remaining space for characters and terminating nul in the given struct osmo_strbuf. */ -#define OSMO_STRBUF_REMAIN(STRBUF) ((STRBUF).buf ? (STRBUF).len - ((STRBUF).pos - (STRBUF).buf) : 0) +#define OSMO_STRBUF_REMAIN(STRBUF) \ + _osmo_strbuf_remain(&(STRBUF)) /*! Return number of actual characters contained in struct osmo_strbuf (without terminating nul). */ #define OSMO_STRBUF_CHAR_COUNT(STRBUF) ((STRBUF).buf && ((STRBUF).pos > (STRBUF).buf) ? \ diff --git a/tests/utils/utils_test.c b/tests/utils/utils_test.c index bdeedb5..26c94dc 100644 --- a/tests/utils/utils_test.c +++ b/tests/utils/utils_test.c @@ -1351,6 +1351,23 @@ strbuf_test_tail_for_buflen(1); } +void strbuf_test_remain_char_count(void) +{ + char buf[20]; + struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) }; + + printf("\n%s\n", __func__); + + printf("remaining space: %zu\n", OSMO_STRBUF_REMAIN(sb)); + printf("current char count: %zu\n", OSMO_STRBUF_CHAR_COUNT(sb)); + + printf("populating the buffer\n"); + OSMO_STRBUF_PRINTF(sb, "osmocom"); + + printf("remaining space: %zu\n", OSMO_STRBUF_REMAIN(sb)); + printf("current char count: %zu\n", OSMO_STRBUF_CHAR_COUNT(sb)); +} + static void startswith_test_str(const char *str, const char *startswith_str, bool expect_rc) { bool rc = osmo_str_startswith(str, startswith_str); @@ -2198,6 +2215,7 @@ strbuf_test(); strbuf_test_nolen(); strbuf_test_tail(); + strbuf_test_remain_char_count(); startswith_test(); name_c_impl_test(); osmo_print_n_test(); diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index 6f5d46b..c0c9560 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -524,6 +524,13 @@ 6: "" sb.chars_needed=6 sb.pos=&sb.buf[1] 7: "" sb.chars_needed=12 sb.pos=&sb.buf[1] +strbuf_test_remain_char_count +remaining space: 20 +current char count: 0 +populating the buffer +remaining space: 13 +current char count: 7 + startswith_test() osmo_str_startswith(NULL, NULL) == true osmo_str_startswith("", NULL) == true -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I294a74a99c40995cf7fb5520d61f697d967be5a4 Gerrit-Change-Number: 35312 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: utils: improve readability of OSMO_STRBUF_CHAR_COUNT
by fixeria 11 Dec '23

11 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35313?usp=email ) Change subject: utils: improve readability of OSMO_STRBUF_CHAR_COUNT ...................................................................... utils: improve readability of OSMO_STRBUF_CHAR_COUNT Similarly to OSMO_STRBUF_REMAIN, let's improve the code readability by adding a static inline function. We should generally prefer using static inline functions over macros, unless there is something that only the proprocessor can do. Change-Id: I71f24b87c13fd83952029171a6993f8da5e32e5b --- M include/osmocom/core/utils.h 1 file changed, 28 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/35313/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 973a9d0..9a6e6b2 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -297,11 +297,21 @@ #define OSMO_STRBUF_REMAIN(STRBUF) \ _osmo_strbuf_remain(&(STRBUF)) +/*! Get number of actual characters (without terminating nul) in the given struct osmo_strbuf. + * \param[in] sb the string buffer to get the number of characters for. + * \returns number of actual characters (without terminating nul). */ +static inline size_t _osmo_strbuf_char_count(const struct osmo_strbuf *sb) +{ + if (OSMO_UNLIKELY(sb == NULL || sb->buf == NULL)) + return 0; + if (sb->pos == NULL || sb->pos <= sb->buf) + return 0; + return OSMO_MIN(sb->pos - sb->buf, sb->len - 1); +} + /*! Return number of actual characters contained in struct osmo_strbuf (without terminating nul). */ -#define OSMO_STRBUF_CHAR_COUNT(STRBUF) ((STRBUF).buf && ((STRBUF).pos > (STRBUF).buf) ? \ - OSMO_MIN((STRBUF).pos - (STRBUF).buf, \ - (STRBUF).len - 1) \ - : 0) +#define OSMO_STRBUF_CHAR_COUNT(STRBUF) \ + _osmo_strbuf_char_count(&(STRBUF)) /*! Like OSMO_STRBUF_APPEND(), but for function signatures that return the char* buffer instead of a length. * When using this function, the final STRBUF.chars_needed may not reflect the actual number of characters needed, since -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35313?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I71f24b87c13fd83952029171a6993f8da5e32e5b Gerrit-Change-Number: 35313 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-sip-connector[master]: verbosely log MNCC and SDP
by fixeria 11 Dec '23

11 Dec '23
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email ) Change subject: verbosely log MNCC and SDP ...................................................................... Patch Set 2: (1 comment) File src/mncc.c: https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308/comment/8c6b2b2b_ae… PS2, Line 1059: Log about the received MNCC message Given that this whole new code chunk is only for `LOGL_DEBUG` logging, I think it can be moved into a separate function and called conditionally `if (log_check_level(DMNCC, LOGL_DEBUG))`? -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/35308?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ie923117929c6b79b1eb61e5a9f02a169edabc599 Gerrit-Change-Number: 35308 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 11 Dec 2023 06:19:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: Only check for intersecting AMR codec support on matching TS rate
by neels 11 Dec '23

11 Dec '23
Attention is currently required from: jolly. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35135?usp=email ) Change subject: Only check for intersecting AMR codec support on matching TS rate ...................................................................... Patch Set 1: Verified+1 Code-Review+2 (1 comment) Patchset: PS1: nice! I verified that this patch now allows me to configure only AMR rate 12k2 in an all-TCH/F setup. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35135?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ia4a8e7f22dc652655ee7c5458624df8ae136dd95 Gerrit-Change-Number: 35135 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 11 Dec 2023 04:27:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: logging: fix NULL pointer dereference in _output_buf()
by neels 11 Dec '23

11 Dec '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35309?usp=email ) Change subject: logging: fix NULL pointer dereference in _output_buf() ...................................................................... logging: fix NULL pointer dereference in _output_buf() In the _output_buf() we explicitly initialize only the 'buf' and 'len' fields of the struct osmo_strbuf, leaving the 'pos' field implicitly initialized to NULL. Later, in this function, 'sb.pos' is passed to ctime_r() and strlen(), leading to a NULL pointer dereference (segfault) in certain scenarios. This situation can occur when color logging is disabled or when a specific logging subsystem has no associated color. Any application using libosmocore's logging API would crash with the following config: log stderr logging filter all 1 logging timestamp 1 logging color 0 Fix this by initializing the 'pos' field explicitly. Change-Id: I7ec9badf525e03e54e10b725d820c636eaa3fd1c Fixes: d71331bc "logging: fix nul octets in log output / use osmo_strbuf" Fixes: CID#336550 --- M src/core/logging.c 1 file changed, 29 insertions(+), 1 deletion(-) Approvals: neels: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/core/logging.c b/src/core/logging.c index 0d215f4..6941f9b 100644 --- a/src/core/logging.c +++ b/src/core/logging.c @@ -488,7 +488,7 @@ { int ret; const char *c_subsys = NULL; - struct osmo_strbuf sb = { .buf = buf, .len = buf_len }; + struct osmo_strbuf sb = { .buf = buf, .pos = buf, .len = buf_len }; /* safety net in case of encountering errors and returning nothing */ buf[0] = '\0'; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35309?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ec9badf525e03e54e10b725d820c636eaa3fd1c Gerrit-Change-Number: 35309 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: logging: fix NULL pointer dereference in _output_buf()
by neels 11 Dec '23

11 Dec '23
Attention is currently required from: fixeria, manawyrm. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35309?usp=email ) Change subject: logging: fix NULL pointer dereference in _output_buf() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35309?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7ec9badf525e03e54e10b725d820c636eaa3fd1c Gerrit-Change-Number: 35309 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 11 Dec 2023 04:07:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: tests/conv: separate test logic
by fixeria 10 Dec '23

10 Dec '23
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/1627?usp=email ) Change subject: tests/conv: separate test logic ...................................................................... Patch Set 4: (1 comment) File tests/conv/conv.c: https://gerrit.osmocom.org/c/libosmocore/+/1627/comment/3b257a42_c8f2d659 PS4, Line 42: return -1; > Would it be possible to separate test code in Coverity from 'regular' code? I'd say that would make […] Sorry for very late feedback. It's possible to exclude specific files or even directories from the analysis (in the project settings). But it's not like we're getting too much of those issues. For now I am fine with clicking "ignore" on such CIDs. Also, we may not see real bugs in tests if we exclude them. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/1627?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98 Gerrit-Change-Number: 1627 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-CC: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Sun, 10 Dec 2023 17:03:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_sstat_state
by laforge 10 Dec '23

10 Dec '23
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_sstat_state ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Gerrit-Change-Number: 35283 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 10 Dec 2023 11:32:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.