Attention is currently required from: laforge, pespin.
neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39309?usp=email )
Change subject: api doc: stream.h: hint at how to select modern vs legacy mode
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File include/osmocom/netif/stream.h:
https://gerrit.osmocom.org/c/libosmo-netif/+/39309/comment/b40f78da_9704601… :
PS1, Line 36: * The legacy mode is chosen by invoking the older osmo_stream_srv_create().
> maybe at some point, but at the moment it's just about a year old and we haven't even bothered to co […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39309?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I651fadb1a00e51f347963418b7a6c5d320580d23
Gerrit-Change-Number: 39309
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
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: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Jan 2025 12:46:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39364?usp=email )
Change subject: coverity: vty for AMR start mode: clarify range checks
......................................................................
coverity: vty for AMR start mode: clarify range checks
Coverity complains about a possible overflow to smod = -1. Clarify by
some type sanity that this is actually not possible.
Related: CID#465560
Change-Id: I34ac83e1441a34fcec6b10c34e10ab6dffa37607
---
M src/osmo-bsc/bts_vty.c
1 file changed, 17 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/64/39364/1
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index 1babd4d..9c68b75 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -2781,23 +2781,32 @@
struct amr_multirate_conf *mr = (full) ? &bts->mr_full: &bts->mr_half;
struct gsm48_multi_rate_conf *mr_conf =
(struct gsm48_multi_rate_conf *) mr->gsm48_ie;
- int num = 0, i;
-
- for (i = 0; i < ((full) ? 8 : 6); i++) {
+ unsigned int num = 0;
+ for (int i = 0; i < ((full) ? 8 : 6); i++) {
if ((mr->gsm48_ie[1] & (1 << i))) {
num++;
}
}
- if (argv[0][0] == 'a' || num == 0) {
+ /* When the user passed "auto", set ICMI=0.
+ * Otherwise, pass ICMI=1 and the start mode in smod.
+ * (smod starts with index 0, while arguments and 'num' start with index 1).
+ */
+ if (strcmp(argv[0], "auto") == 0 || num == 0) {
mr_conf->icmi = 0;
mr_conf->smod = 0;
} else {
+ int arg = atoi(argv[0]);
+ /* clarify for coverity: the VTY argument spec is (auto|1|2|3|4). */
+ OSMO_ASSERT(arg >= 1 && arg <= 4);
+
+ /* If there are less modes than the start mode the user is asking for, fall back to the last available
+ * mode. (FIXME: should this complain and fail instead?)
+ * 'num' is guaranteed to be > 0 here. */
+ num = OSMO_MIN(num, arg);
+
mr_conf->icmi = 1;
- if (num < atoi(argv[0]))
- mr_conf->smod = num - 1;
- else
- mr_conf->smod = atoi(argv[0]) - 1;
+ mr_conf->smod = num - 1;
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39364?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I34ac83e1441a34fcec6b10c34e10ab6dffa37607
Gerrit-Change-Number: 39364
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39361?usp=email )
Change subject: cosmetic: osmo_io: Improvde documentation of read_cb when segmentation is used
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39361?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I93ac0b3224e17bfd1ecd4244a6dc7a44457c06e8
Gerrit-Change-Number: 39361
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Jan 2025 10:12:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email )
Change subject: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
......................................................................
osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
Trying to use IORING_OP_SENDMSG on local files fails with "Socket
operation on non-socket" errors.
Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
---
M src/core/osmo_io_uring.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/39363/1
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index 72a465e..5fd7ddc 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -307,6 +307,8 @@
switch (msghdr->action) {
case IOFD_ACT_WRITE:
+ io_uring_prep_write(sqe, msghdr->iofd->fd, msghdr->iov[0].iov_base, msghdr->iov[0].iov_len, 0);
+ break;
case IOFD_ACT_SENDTO:
case IOFD_ACT_SENDMSG:
io_uring_prep_sendmsg(sqe, msghdr->iofd->fd, &msghdr->hdr, msghdr->flags);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
Gerrit-Change-Number: 39363
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/39362?usp=email
to look at the new patch set (#2).
Change subject: hnbgw_rx_hnb_register_req(): guard against asn.1 parsing errors
......................................................................
hnbgw_rx_hnb_register_req(): guard against asn.1 parsing errors
I considered putting these checks into
hnbap_decode_hnbregisterrequesties() itself, but that code is generated
by asn1tostruct.py, so it is non-trivial.
So I decided to add this code bit, to guard against potential NULL deref
induced by input from the wire, which coverity complains about.
Related: CID#465551
Change-Id: I555f11cadc23ea231821bd48f7cd62953b022e9e
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/62/39362/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/39362?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I555f11cadc23ea231821bd48f7cd62953b022e9e
Gerrit-Change-Number: 39362
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39360?usp=email )
Change subject: osmo_io: segmentation: Remove unneeded impossible check
......................................................................
osmo_io: segmentation: Remove unneeded impossible check
The rc <= 0 case is already early returned above.
Change-Id: I9316730aeaf7c7efd3ea8965ab43fa21f844260c
---
M src/core/osmo_io.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/39360/1
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 45aaef3..15703cf 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -343,7 +343,7 @@
do {
pending = NULL;
res = iofd_handle_segmentation(iofd, msg, &pending);
- if (res != IOFD_SEG_ACT_DEFER || rc < 0) {
+ if (res != IOFD_SEG_ACT_DEFER) {
iofd->io_ops.read_cb(iofd, rc, msg);
/* The user could unregister/close the iofd during read_cb() above.
* Once that's done, it doesn't expect to receive any more events,
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39360?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9316730aeaf7c7efd3ea8965ab43fa21f844260c
Gerrit-Change-Number: 39360
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>