Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34144 )
Change subject: osmo_io: Avoid potential double free when sending msgb
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34144
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3a279b55a3adff96948120683c844e1508d0ba94
Gerrit-Change-Number: 34144
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Aug 2023 15:17:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34144 )
Change subject: osmo_io: Avoid potential double free when sending msgb
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS3:
> ACK, so it's maybe the other way around? a mshdr actually always relates to (child of) a given msgb? […]
I don't like it too much as this complicates the msghdr alloc logic, but I guess it's better than having multiple msgb and msghdr in a talloc report without knowing what belongs to what.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34144
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3a279b55a3adff96948120683c844e1508d0ba94
Gerrit-Change-Number: 34144
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Aug 2023 15:13:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/34144
to look at the new patch set (#4).
Change subject: osmo_io: Avoid potential double free when sending msgb
......................................................................
osmo_io: Avoid potential double free when sending msgb
Ensure that a msgb has the proper talloc parent:
All msgbs inside an iofd get the iofd as parent. Received msgbs are reparented
to iofd->msgb_alloc.ctx (which was set in osmo_iofd_setup()) before
being passed to the receive callback.
Before this change the code could fail for msgbs that are submitted via uring
where the (failed) write returns after the iofd has already been
osmo_iofd_free()d. free()ing the iofd is deferred until the write
completes, but the (iofd) parent context could have been free()d in the
meantime.
Change-Id: I3a279b55a3adff96948120683c844e1508d0ba94
---
M src/core/osmo_io.c
1 file changed, 36 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/34144/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34144
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3a279b55a3adff96948120683c844e1508d0ba94
Gerrit-Change-Number: 34144
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, laforge, daniel.
daniel has uploaded a new patch set (#14) to the change originally created by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/32536 )
Change subject: osmo_io: Add io_uring backend
......................................................................
osmo_io: Add io_uring backend
Change-Id: I5152129eb84b31ccc9e02bc2a5c5bdb046d331bc
---
M configure.ac
M contrib/libosmocore.spec.in
M debian/control
M include/osmocom/core/osmo_io.h
M src/core/Makefile.am
M src/core/osmo_io.c
M src/core/osmo_io_internal.h
A src/core/osmo_io_uring.c
M tests/osmo_io/osmo_io_test.c
9 files changed, 486 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/32536/14
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32536
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5152129eb84b31ccc9e02bc2a5c5bdb046d331bc
Gerrit-Change-Number: 32536
Gerrit-PatchSet: 14
Gerrit-Owner: pespin <pespin(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-CC: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newpatchset
osmith has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34196 )
Change subject: README.md: update
......................................................................
README.md: update
Fix the broken formatting (wrong headlines, missing line breaks in
blocks of commands) and move the configuration and escript sections
below the running section.
Add the command that fixeria suggested for running it with one shell
command.
Old: https://gitea.osmocom.org/erlang/osmo_dia2gsup/src/branch/master/README.md
New: https://gitea.osmocom.org/osmith/osmo_dia2gsup/src/branch/master/README.md
Change-Id: Ib96f42ca0066ba2f6d0d783f6bf1764cbfee544f
---
M README.md
1 file changed, 39 insertions(+), 11 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/README.md b/README.md
index 3177caf..8d8dc01 100644
--- a/README.md
+++ b/README.md
@@ -1,42 +1,51 @@
-= Osmocom DIAMETER -> GSUP translator =
+# Osmocom DIAMETER -> GSUP translator
This project implements a proxy translating Diameter into GSUP, hence allowing
Diameter clients connecting to GSUP server. This allows, for instance, using
OsmoHLR as an HSS used by 4G/5G nodes.
-== Building ==
+## Building
Install erlang and rebar3 packages (not "rebar", that's version 2! You may need
to compile it from source in some distros).
+```
$ rebar3 compile
$ rebar3 escriptize
+```
-== Testing ==
+## Testing
Unit tests can be run this way:
+```
$ rebar3 eunit
+```
-== Running ==
+## Running
Once osmo\_dia2gsup is built, you can start it this way:
+```
$ rebar3 shell
-
-In the erlang shell:
-```
1> osmo_dia2gsup:start().
```
-== Configuration ==
+Passing a config file:
+```
$ rebar3 shell --config ./examples/sys.config
-```
1> osmo_dia2gsup:start().
```
-== Run as an escript ==
+Running it with one shell command:
+```
+$ rebar3 shell --config ./examples/sys.config --eval "osmo_dia2gsup:start()."
+```
+
+Running it as an escript:
+
+```
$ rebar3 escriptize
$ ERL_FLAGS='-config ./examples/sys.config' _build/default/bin/osmo-dia2gsup
-
+```
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34196
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: Ib96f42ca0066ba2f6d0d783f6bf1764cbfee544f
Gerrit-Change-Number: 34196
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34197 )
Change subject: cosmetic: Fix typo in comment
......................................................................
cosmetic: Fix typo in comment
Change-Id: I1f6a47aa8eb59224f4259969707f7e41d3c56a18
---
M src/gsup_client.erl
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_dia2gsup refs/changes/97/34197/1
diff --git a/src/gsup_client.erl b/src/gsup_client.erl
index 6a583e0..d18138a 100644
--- a/src/gsup_client.erl
+++ b/src/gsup_client.erl
@@ -63,7 +63,7 @@
init([Address, Port, Options]) ->
ipa_proto:init(),
- % register the GSUP codec with the IPA core; ignore result as we mgiht be doing this multiple times
+ % register the GSUP codec with the IPA core; ignore result as we might be doing this multiple times
ipa_proto:register_codec(?IPAC_PROTO_EXT_GSUP, fun gsup_protocol:encode/1, fun gsup_protocol:decode/1),
lager:info("Connecting to GSUP HLR on IP ~s port ~p~n", [Address, Port]),
CcmOptions = #ipa_ccm_options{
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34197
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I1f6a47aa8eb59224f4259969707f7e41d3c56a18
Gerrit-Change-Number: 34197
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange