Attention is currently required from: dexter.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26955 )
Change subject: ranap_common_ran: add decoder for RAN/RNC originated messages
......................................................................
Patch Set 5:
(6 comments)
Patchset:
PS5:
Mostly cosmetic notes, not a merge blocker.
File include/osmocom/ranap/ranap_common.h:
https://gerrit.osmocom.org/c/osmo-iuh/+/26955/comment/27b84377_1802f520
PS5, Line 599: funktions
Tippfehler: functions
File src/ranap_common_ran.c:
https://gerrit.osmocom.org/c/osmo-iuh/+/26955/comment/7030b23e_7396dc5d
PS5, Line 90: unsuccessfulOutcome
successfulOutcome? I think it's not critical, given that 'procedureCode' is present in all union members at the same position. But still may be confusing.
https://gerrit.osmocom.org/c/osmo-iuh/+/26955/comment/da00cf9b_8956d22e
PS5, Line 102: unsuccessfulOutcome
outcome? I think it's not critical, given that 'procedureCode' is present in all union members at the same position. But still may be confusing.
https://gerrit.osmocom.org/c/osmo-iuh/+/26955/comment/2ef5a507_79f42b5f
PS5, Line 124: unsuccessful
copy-paste: successful
https://gerrit.osmocom.org/c/osmo-iuh/+/26955/comment/0b68a617_a523c973
PS5, Line 132: unsuccessful
Neither unsuccessful not successful, so this word should be removed.
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26955
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Iad4c2743d4d1ddf8ad49002d1fe6866f22eb9e98
Gerrit-Change-Number: 26955
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 29 Jan 2022 10:16:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/22543 )
Change subject: gsm_7bit_encode_n(): use regular malloc() instead of calloc()
......................................................................
Patch Set 2:
(1 comment)
File src/gsm/gsm_utils.c:
https://gerrit.osmocom.org/c/libosmocore/+/22543/comment/dd46e343_896a80a9
PS1, Line 332: uint8_t *data = malloc(septet_len + 1);
> I was thinking about alloca() too, we already use it in src/conv.c. […]
I suggest to stay with the heap allocation for now. alloca() is nice, but it's a more radical change compared to calloc() -> malloc(). I am not confident enough that using the stack here is does not introduce non-obvious pitfalls.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/22543
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6956cbd83b2999dbcf8e2d210134b0a166c33efb
Gerrit-Change-Number: 22543
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 28 Jan 2022 20:12:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27005 )
Change subject: gsm_utils: use talloc API in gsm_7bit_encode_n()
......................................................................
Abandoned
In favor of I6956cbd83b2999dbcf8e2d210134b0a166c33efb.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27005
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8a38c493eff25b4f16af1740a1bcecb5098673d9
Gerrit-Change-Number: 27005
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon
fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27004 )
Change subject: gsm_utils: get rid of calloc() / free() in gsm_septets2octets()
......................................................................
Abandoned
This patch predates Ib1aac538afeb0a5c76a1df472d555139a496e12e, which changes typeof(septet_len) to size_t.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27004
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id2bb31b4d00bb91d3dcc302910e5d2da95be9a25
Gerrit-Change-Number: 27004
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: abandon
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/27005
to look at the new patch set (#2).
Change subject: gsm_utils: use talloc API in gsm_7bit_encode_n()
......................................................................
gsm_utils: use talloc API in gsm_7bit_encode_n()
Unfortunately, in this case we cannot make any assumptions on the
maximum size of the input string, so we cannot allocate the buffer
on the stack. Let's at least use talloc API.
Change-Id: I8a38c493eff25b4f16af1740a1bcecb5098673d9
---
M src/gsm/gsm_utils.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/05/27005/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27005
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8a38c493eff25b4f16af1740a1bcecb5098673d9
Gerrit-Change-Number: 27005
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27005 )
Change subject: gsm_utils: use talloc API in gsm_7bit_encode_n()
......................................................................
gsm_utils: use talloc API in gsm_7bit_encode_n()
Unfortunately, in this case we cannot make any assumptions on the
maximum size of the input string, so we cannot allocate the buffer
on the stack. Let's at least use talloc API.
Change-Id: I8a38c493eff25b4f16af1740a1bcecb5098673d9
---
M src/gsm/gsm_utils.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/05/27005/1
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index ba24291..511de79 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -382,7 +382,7 @@
size_t max_septets = n * 8 / 7;
/* prepare for the worst case, every character expanding to two bytes */
- uint8_t *rdata = calloc(strlen(data) * 2, sizeof(uint8_t));
+ uint8_t *rdata = talloc_zero(OTC_GLOBAL, strlen(data) * 2);
y = gsm_septet_encode(rdata, data);
if (y > max_septets) {
@@ -398,7 +398,7 @@
if (octets)
*octets = o;
- free(rdata);
+ talloc_free(rdata);
/*
* We don't care about the number of octets, because they are not
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27005
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8a38c493eff25b4f16af1740a1bcecb5098673d9
Gerrit-Change-Number: 27005
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27004 )
Change subject: gsm_utils: get rid of calloc() / free() in gsm_septets2octets()
......................................................................
gsm_utils: get rid of calloc() / free() in gsm_septets2octets()
Given that 'septet_len' is of type 'uint8_t', plus one optional
padding octet, the maximum buffer size is 256. No need to use
the heap for that, a buffer on the stack is enough in this case.
Change-Id: Id2bb31b4d00bb91d3dcc302910e5d2da95be9a25
---
M src/gsm/gsm_utils.c
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/27004/1
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index f8bb58e..ba24291 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -322,10 +322,10 @@
* \returns number of bytes used in \a result */
int gsm_septet_pack(uint8_t *result, const uint8_t *rdata, size_t septet_len, uint8_t padding)
{
+ uint8_t data[UINT8_MAX + 1] = { 0 };
int i = 0, z = 0;
uint8_t cb, nb;
int shift = 0;
- uint8_t *data = calloc(septet_len + 1, sizeof(uint8_t));
if (padding) {
shift = 7 - padding;
@@ -360,8 +360,6 @@
shift++;
}
- free(data);
-
return z;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27004
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id2bb31b4d00bb91d3dcc302910e5d2da95be9a25
Gerrit-Change-Number: 27004
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: neels, daniel, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/27002 )
Change subject: ranap_common_cn: add functions for direct access to decoder
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/27002
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I14d2ed8e597a5d12024a6a6c72ff011dbeb2549d
Gerrit-Change-Number: 27002
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 28 Jan 2022 16:58:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment