Attention is currently required from: neels.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35306?usp=email )
Change subject: sdp: allow more space for fmtp
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35306?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ib9b9608d8d8f7ce34596a950dbc480e8a72ebf97
Gerrit-Change-Number: 35306
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 15:15:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35322?usp=email )
Change subject: mgcp: reserve once byte for '\0' in mgcp_do_read()
......................................................................
Patch Set 1:
(1 comment)
File src/libosmo-mgcp-client/mgcp_client.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/35322/comment/4c625f74_e0fabcf7
PS1, Line 762: ret = read(fd->fd, msg->data, msgb_tailroom(msg) - 1);
> I'd say the proper way would be to use msgb_failroom(msg) here, and then msg->l2h[OSMO_MIN(ret, msgb […]
JFYI, the nul-termination is already done deeper in the code:
```
mgcp_do_read() // this func
mgcp_client_rx()
mgcp_response_parse_head()
mgcp_msg_terminate_nul()
```
I am simply making sure that there will be enough room for this function to terminate the received string, if needed. What you suggest is also an option, indeed, except that `msg->l2h[OSMO_MIN(ret, msgb_l2len(msg))]` does not make sense to me because the code is doing `msg->l2h = msgb_put(msg, ret)` below, so that `ret == msgb_l2len(msg)`. Let's see what the others think.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35322?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Icc878af7f671213bb516af62cb601914d86ff808
Gerrit-Change-Number: 35322
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 14:49:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: dexter, laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email )
Change subject: ecu: force alignment of member data in struct osmo_ecu_state
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
Patchset:
PS2:
I think your comments are still not refuting my feedback on the fact that using the data[] array to put private fields is probably not a good idea, and that the private code extending it (adding fields) should be using a private struct which encloses the public one as a field, then use offsetof() and container_of() and all that.
So, in summary, I still believe we should fix the private/sublcass code, not the public one, which on top breaks the ABI.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35212?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: I28672856e8e8f47e04ffe09ee3e07b577108cdc7
Gerrit-Change-Number: 35212
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(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: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 14:46:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35322?usp=email )
Change subject: mgcp: reserve once byte for '\0' in mgcp_do_read()
......................................................................
Patch Set 1:
(1 comment)
File src/libosmo-mgcp-client/mgcp_client.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/35322/comment/7ed6bf89_cfba5ec4
PS1, Line 762: ret = read(fd->fd, msg->data, msgb_tailroom(msg) - 1);
I'd say the proper way would be to use msgb_failroom(msg) here, and then msg->l2h[OSMO_MIN(ret, msgb_l2len(msg))] = '\0' later, to put the char at the exact place where the last char is set.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35322?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Icc878af7f671213bb516af62cb601914d86ff808
Gerrit-Change-Number: 35322
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 14:41:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge, neels, pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email )
Change subject: ecu: force alignment of member data in struct osmo_ecu_state
......................................................................
Patch Set 2:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/c30385d6_7a242485
PS1, Line 15: thsi
> this
Done
Patchset:
PS1:
> I'm not sure this is entirely fixing the issue. […]
As far as I understand the line struct {} __attribute__ ((aligned)); will force data[0] into an aligned position, relative to the beginning of the address where struct osmo_ecu_state is stored. This will be an aligned address since the compiler has knowledge about what is stored, but it can not know what we store in the memory beginning from data[0]. However since data[0] is now at an aligned position this is not a problem anymore. To make it look less ugly we can also just define a an uint8_t *data pointer followed by an uint8_t _data[0] array. The pointer member will automatically be in an aligned position and so _data[0] will also be aligned. (see also @laforge@gnumonks.org comments in the referenced ticket.)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35212?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: I28672856e8e8f47e04ffe09ee3e07b577108cdc7
Gerrit-Change-Number: 35212
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 11 Dec 2023 14:40:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, neels, pespin.
Hello Jenkins Builder, laforge, neels,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: ecu: force alignment of member data in struct osmo_ecu_state
......................................................................
ecu: force alignment of member data in struct osmo_ecu_state
The member data[0] in struct osmo_ecu_state is used as an anchor to
attach private structs for a concrete ECU implementation. This works by
allocating more memory then struct osmo_ecu_state actually needs and
then using the excess memory to store the private struct of the concrete
ECU implementation.
However, this poses a problem since data[0] is at the end of the struct
it may land in an unaligned position. This also means that the struct we
store there is also unaligned. We should fix this by ensuring that
data[0] lands at an aligned memory location.
Related: OS#6286
Change-Id: I28672856e8e8f47e04ffe09ee3e07b577108cdc7
---
M TODO-RELEASE
M include/osmocom/codec/ecu.h
M src/codec/ecu_fr.c
3 files changed, 29 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/35212/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35212?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: I28672856e8e8f47e04ffe09ee3e07b577108cdc7
Gerrit-Change-Number: 35212
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset