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

October 2024

  • 1 participants
  • 1631 discussions
[M] Change in osmo-ggsn[master]: ggsn: Avoid forwarding IPv6 solicited-node multicast addr to tun device
by pespin 23 Oct '24

23 Oct '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38505?usp=email ) Change subject: ggsn: Avoid forwarding IPv6 solicited-node multicast addr to tun device ...................................................................... ggsn: Avoid forwarding IPv6 solicited-node multicast addr to tun device There's no need to forward those. Morevoer, they cannot be forwarded when using gtpu kernel mode since it doesn't support reinjecting packets we got from it, so avoid erroring out when trying to inject them later on. Related: OS#6600 Related: OS#6382 Change-Id: Iac8f14083620d86f3872aa951930fbe8f680ff24 --- M ggsn/ggsn.c M lib/icmpv6.c M lib/icmpv6.h 3 files changed, 82 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/05/38505/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index c73a46d..a02b97f 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -782,10 +782,15 @@ return -1; } - /* daddr: all-routers multicast addr */ - if (IN6_ARE_ADDR_EQUAL(&ip6h->ip6_dst, &all_router_mcast_addr)) - return handle_router_mcast(pdp->gsn, pdp, &peer->addr.v6, - &apn->v6_lladdr, apn->cfg.mtu, pack, len); + if (IN6_IS_ADDR_MULTICAST(&ip6h->ip6_dst)) { + /* daddr: all-routers multicast addr */ + if (IN6_ARE_ADDR_EQUAL(&ip6h->ip6_dst, &all_router_mcast_addr)) + return handle_router_mcast(pdp->gsn, pdp, &peer->addr.v6, + &apn->v6_lladdr, apn->cfg.mtu, pack, len); + /* daddr: solicited-node multicast addr */ + if (memcmp(&ip6h->ip6_dst.s6_addr, solicited_node_mcast_addr_prefix, sizeof(solicited_node_mcast_addr_prefix)) == 0) + return handle_solicited_node_mcast(pack, len); + } break; case 4: peer = pdp_get_peer_ipv(pdp, false); diff --git a/lib/icmpv6.c b/lib/icmpv6.c index e74fb70..4226fc0 100644 --- a/lib/icmpv6.c +++ b/lib/icmpv6.c @@ -42,6 +42,14 @@ .s6_addr = { 0xff,0x02,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,2 } }; +/* RFC4291 link-local solicited-node multicast address, FF02:0:0:0:0:1:FF, 104 bits = 13 bytes */ +const uint8_t solicited_node_mcast_addr_prefix[13] = { + 0xff, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, + 0xFF +}; + /* Prepends the ipv6 header and returns checksum content */ uint16_t icmpv6_prepend_ip6hdr(struct msgb *msg, const struct in6_addr *saddr, const struct in6_addr *daddr) @@ -180,6 +188,25 @@ return true; } +/* Validate an ICMPv6 neighbor solicitation according to RFC4861 7.1.1 */ +static bool icmpv6_validate_neigh_solicit(const uint8_t *pack, unsigned len) +{ + const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; + + /* Hop limit field must have 255 */ + if (ip6h->ip6_ctlun.ip6_un1.ip6_un1_hlim != 255) + return false; + /* FIXME: ICMP checksum is valid */ + /* ICMP length (derived from IP length) is 24 or more octets */ + if (ip6h->ip6_ctlun.ip6_un1.ip6_un1_plen < 24) + return false; + /* FIXME: All included options have a length > 0 */ + /* FIXME: If the IP source address is the unspecified address, the IP + * destination address is a solicited-node multicast address. */ + /* FIXME: If IP source is unspecified, no source link-layer addr option */ + return true; +} + /* Validate an ICMPv6 router advertisement according to RFC4861 6.1.2. Returns pointer packet header on success, NULL otherwise. */ struct icmpv6_radv_hdr *icmpv6_validate_router_adv(const uint8_t *pack, unsigned len) @@ -263,3 +290,46 @@ } return 0; } + +/* handle incoming packets to the solicited-node multicast address */ +int handle_solicited_node_mcast(const uint8_t *pack, unsigned len) +{ + const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; + const struct icmpv6_hdr *ic6h = (struct icmpv6_hdr *) (pack + sizeof(*ip6h)); + + if (len < sizeof(*ip6h)) { + LOGP(DICMP6, LOGL_NOTICE, "Packet too short: %u bytes\n", len); + return -1; + } + + /* we only treat ICMPv6 here */ + if (ip6h->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_ICMPV6) { + LOGP(DICMP6, LOGL_DEBUG, "Ignoring non-ICMP solicited-node mcast\n"); + return 0; + } + + if (len < sizeof(*ip6h) + sizeof(*ic6h)) { + LOGP(DICMP6, LOGL_NOTICE, "Short ICMPv6 packet: %s\n", osmo_hexdump(pack, len)); + return -1; + } + + switch (ic6h->type) { + case 135: /* Neighbor Solicitation. RFC2461, RFC2462 */ + if (ic6h->code != 0) { + LOGP(DICMP6, LOGL_NOTICE, "ICMPv6 type 135 but code %d\n", ic6h->code); + return -1; + } + if (!icmpv6_validate_neigh_solicit(pack, len)) { + LOGP(DICMP6, LOGL_NOTICE, "Invalid Neighbor Solicitation: %s\n", + osmo_hexdump(pack, len)); + return -1; + } + /* RFC 2462: Ignore Neighbor (Duplicate Address Detection) */ + LOGP(DICMP6, LOGL_DEBUG, "Ignoring Rx ICMPv6 Neighbor Soliciation: %s\n", osmo_hexdump(pack, len)); + break; + default: + LOGP(DICMP6, LOGL_DEBUG, "Unknown ICMPv6 type %u\n", ic6h->type); + break; + } + return 0; +} diff --git a/lib/icmpv6.h b/lib/icmpv6.h index 1040600..2469ed0 100644 --- a/lib/icmpv6.h +++ b/lib/icmpv6.h @@ -98,9 +98,12 @@ const struct in6_addr *own_ll_addr, uint32_t mtu, const uint8_t *pack, unsigned len); +int handle_solicited_node_mcast(const uint8_t *pack, unsigned len); struct icmpv6_radv_hdr *icmpv6_validate_router_adv(const uint8_t *pack, unsigned len); /* RFC3307 link-local scope multicast address */ extern const struct in6_addr all_router_mcast_addr; + +extern const uint8_t solicited_node_mcast_addr_prefix[13]; -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38505?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Iac8f14083620d86f3872aa951930fbe8f680ff24 Gerrit-Change-Number: 38505 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ggsn[master]: tun: Fix null pointer derefence when in kernel gtp mode
by pespin 23 Oct '24

23 Oct '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email ) Change subject: tun: Fix null pointer derefence when in kernel gtp mode ...................................................................... tun: Fix null pointer derefence when in kernel gtp mode When using gtp kernel module, the kernel sends GTP-U packets to userspace (osmo-ggsn) when it is unable to find a related pdp ctx for the packet. This is so far processes through the code path: ggsn_gtp_fd_cb => gtp_decaps1u => gtp_gpdu_ind => encaps_tun = > tun_encaps In usual circumstances, if the gtp module sends a packet to userspace because it is unable to find a pdp ctx, userspace shouldn't be able anyway, so it should go through a different code path and answer over GTP-U with a "Error Indication". Other specific packets (such as ICMPv6 with link local address) are also being forwarded to userspace. Some of them are being handled in encaps_tun() in a special way (eg. Router Soliciation), but others, such as Neighbor Solicitation, are not being handled there and follow the generic path where they try to be forwarded over the tun towards the Internet. When using the kernel gtp mode, there's no way to re-inject into the network stack a packet we received from the gtp mode, like done when using the tun device mode. Prior to 38b607ece3ad248c7c864a50255f2a06ca383e19, a bug existed in tun_encaps() which would still try to use tun->fd (-1) when in gtp kernel module, which ended up in an error being printed. After the mentioned commit was applied, when in gtp kernel module it started accessing tun->tundev which is is NULL under that setup, hence making the bug consequences worse. Add a pointer guard with a log line to inform about the problem, while still discussing the originating problem in OS#6600. Related: OS#6600 Change-Id: I508758696a0bcbb7c780a0ed33b28ba640602488 --- M lib/tun.c 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve; Verified diff --git a/lib/tun.c b/lib/tun.c index 055c4fc..5f73d32 100644 --- a/lib/tun.c +++ b/lib/tun.c @@ -202,9 +202,17 @@ int tun_encaps(struct tun_t *tun, void *pack, unsigned len) { - struct msgb *msg = msgb_alloc(PACKET_MAX, "tun_tx"); + struct msgb *msg; int rc; + if (!tun->tundev) { + LOGTUN(LOGL_ERROR, tun, + "Injecting decapsulated packet not supported in kernel gtp mode: %s\n", + osmo_hexdump(pack, len)); + return -ENOTSUP; + } + + msg = msgb_alloc(PACKET_MAX, "tun_tx"); OSMO_ASSERT(msg); memcpy(msgb_put(msg, len), pack, len); rc = osmo_tundev_send(tun->tundev, msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I508758696a0bcbb7c780a0ed33b28ba640602488 Gerrit-Change-Number: 38502 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ggsn[master]: tun: Fix null pointer derefence when in kernel gtp mode
by pespin 23 Oct '24

23 Oct '24
Attention is currently required from: fixeria, lynxis lazus. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email ) Change subject: tun: Fix null pointer derefence when in kernel gtp mode ...................................................................... Patch Set 2: Code-Review+2 (1 comment) Patchset: PS2: Merging to avoid crash. -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I508758696a0bcbb7c780a0ed33b28ba640602488 Gerrit-Change-Number: 38502 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 23 Oct 2024 16:15:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[master]: tun: assert tundev!=NULL in osmo_tundev_send
by pespin 23 Oct '24

23 Oct '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/38504?usp=email ) Change subject: tun: assert tundev!=NULL in osmo_tundev_send ...................................................................... tun: assert tundev!=NULL in osmo_tundev_send Change-Id: I892052f665d77bd01ac5a05649f8de40936f097f --- M src/core/tun.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/38504/1 diff --git a/src/core/tun.c b/src/core/tun.c index 28cec34..09a3f81 100644 --- a/src/core/tun.c +++ b/src/core/tun.c @@ -571,7 +571,10 @@ */ int osmo_tundev_send(struct osmo_tundev *tundev, struct msgb *msg) { - int rc = osmo_wqueue_enqueue(&tundev->wqueue, msg); + int rc; + + OSMO_ASSERT(tundev); + rc = osmo_wqueue_enqueue(&tundev->wqueue, msg); if (rc < 0) { LOGTUN(tundev, LOGL_ERROR, "Failed to enqueue the packet\n"); msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38504?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: I892052f665d77bd01ac5a05649f8de40936f097f Gerrit-Change-Number: 38504 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ggsn[master]: tun: Fix null pointer derefence when in kernel gtp mode
by osmith 23 Oct '24

23 Oct '24
Attention is currently required from: fixeria, lynxis lazus, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email ) Change subject: tun: Fix null pointer derefence when in kernel gtp mode ...................................................................... Patch Set 2: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I508758696a0bcbb7c780a0ed33b28ba640602488 Gerrit-Change-Number: 38502 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Wed, 23 Oct 2024 13:57:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: testenv: qemu: get coredump and show backtrace
by pespin 23 Oct '24

23 Oct '24
Attention is currently required from: osmith, pespin. pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38503?usp=email ) Change subject: testenv: qemu: get coredump and show backtrace ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38503?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a Gerrit-Change-Number: 38503 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Oct 2024 13:55:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: testenv: qemu: get coredump and show backtrace
by osmith 23 Oct '24

23 Oct '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38503?usp=email to look at the new patch set (#2). Change subject: testenv: qemu: get coredump and show backtrace ...................................................................... testenv: qemu: get coredump and show backtrace If the SUT crashes inside QEMU, copy the coredump via 9p to the outer system (either host or podman) where we have the same binaries and also debug symbols, and run gdb there to show the backtrace. Related: OS#6600 Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a --- M _testenv/data/scripts/qemu/qemu_functions.sh M _testenv/data/scripts/qemu/qemu_init.sh 2 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/38503/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38503?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a Gerrit-Change-Number: 38503 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[S] Change in osmo-ggsn[master]: tun: Fix null pointer derefence when in kernel gtp mode
by pespin 23 Oct '24

23 Oct '24
Attention is currently required from: osmith, pespin. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email ) Change subject: tun: Fix null pointer derefence when in kernel gtp mode ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38502?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I508758696a0bcbb7c780a0ed33b28ba640602488 Gerrit-Change-Number: 38502 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Oct 2024 13:54:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: testenv: qemu: get coredump and show backtrace
by osmith 23 Oct '24

23 Oct '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38503?usp=email ) Change subject: testenv: qemu: get coredump and show backtrace ...................................................................... testenv: qemu: get coredump and show backtrace Related: OS#6600 Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a --- M _testenv/data/scripts/qemu/qemu_functions.sh M _testenv/data/scripts/qemu/qemu_init.sh 2 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/38503/1 diff --git a/_testenv/data/scripts/qemu/qemu_functions.sh b/_testenv/data/scripts/qemu/qemu_functions.sh index c0dd8cc..e2014a1 100755 --- a/_testenv/data/scripts/qemu/qemu_functions.sh +++ b/_testenv/data/scripts/qemu/qemu_functions.sh @@ -1,5 +1,6 @@ #!/bin/sh -ex INITRD_DIR="$PWD/_initrd" +CORE_DIR="$PWD/_coredump" # Add one or more files to the initramfs, with parent directories. # usr-merge: resolve symlinks for /lib -> /usr/lib etc. so "cp --parents" does @@ -171,6 +172,8 @@ machine_arg="-machine pc" fi + mkdir -p "$CORE_DIR" + # sudo is required to set up networking in qemu_ifup.sh # </dev/null to deatch stdin, so qemu doesn't capture ^C sudo sh -c " @@ -186,6 +189,13 @@ -serial stdio \ -netdev 'tap,id=nettest,script=$TESTENV_QEMU_SCRIPTS/qemu_ifup.sh' \ -device 'virtio-net-pci,netdev=nettest,mac=$(qemu_random_mac)' \ + -virtfs 'local,path=$CORE_DIR,mount_tag=coredir,security_model=passthrough,fmode=666,writeout=immediate' \ </dev/null " + + # Show coredump backtrace + if [ -e "$CORE_DIR/coredump" ]; then + execfn="$(file "$CORE_DIR/coredump" | grep -o "execfn: '.*'" | cut -d "'" -f 2)" + gdb --batch "$execfn" "$CORE_DIR/coredump" -ex bt + fi } diff --git a/_testenv/data/scripts/qemu/qemu_init.sh b/_testenv/data/scripts/qemu/qemu_init.sh index 1c8b39b..1c100f8 100755 --- a/_testenv/data/scripts/qemu/qemu_init.sh +++ b/_testenv/data/scripts/qemu/qemu_init.sh @@ -1,6 +1,7 @@ #!/bin/busybox sh echo "Running initrd-init.sh" set -ex +COREDUMP=/tmp/coredump export HOME=/root export LD_LIBRARY_PATH=/usr/local/lib @@ -27,10 +28,20 @@ ip link set lo up ip link set eth0 up +sysctl -w kernel.core_pattern="$COREDUMP" +ulimit -c unlimited + echo "KERNEL_TEST_VM_IS_READY" # Use '|| true' to avoid "attempting to kill init" kernel panic on failure /cmd.sh || true +if [ -e "$COREDUMP" ]; then + mkdir -p /mnt/coredir + mount -t 9p -o trans=virtio coredir /mnt/coredir -oversion=9p2000.L + chmod 666 "$COREDUMP" + cp "$COREDUMP" /mnt/coredir +fi + # Avoid kernel panic when init exits poweroff -f -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38503?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia08ac58c43388b5ea4d3712c5ef83f54b538b10a Gerrit-Change-Number: 38503 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: netdev: Explicit cast time() to uint32_t seq_nr
by pespin 23 Oct '24

23 Oct '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/38501?usp=email ) Change subject: netdev: Explicit cast time() to uint32_t seq_nr ...................................................................... netdev: Explicit cast time() to uint32_t seq_nr Make coverity happy and also inform readers of the code that we are fine dropping the most significat part of the return value of time() when using it to set up a nl seq_nr. Related: Coverity CID#426078 Change-Id: Ia4c1c9b2dcc751b6cbd01a957627f882bc63ba87 --- M src/core/netdev.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/38501/1 diff --git a/src/core/netdev.c b/src/core/netdev.c index 8e7fc28..1e886f9 100644 --- a/src/core/netdev.c +++ b/src/core/netdev.c @@ -479,7 +479,7 @@ nlh->nlmsg_type = RTM_GETLINK; nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; - nlh->nlmsg_seq = time(NULL); + nlh->nlmsg_seq = (uint32_t)time(NULL); ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); ifm->ifi_family = AF_UNSPEC; @@ -512,7 +512,7 @@ nlh->nlmsg_type = RTM_NEWLINK; nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; - nlh->nlmsg_seq = time(NULL); + nlh->nlmsg_seq = (uint32_t)time(NULL); ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); ifm->ifi_family = AF_UNSPEC; @@ -542,7 +542,7 @@ nlh->nlmsg_type = RTM_NEWLINK; nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; - nlh->nlmsg_seq = time(NULL); + nlh->nlmsg_seq = (uint32_t)time(NULL); ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); ifm->ifi_family = AF_UNSPEC; @@ -568,7 +568,7 @@ nlh->nlmsg_type = RTM_NEWADDR; nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE | NLM_F_ACK; - nlh->nlmsg_seq = time(NULL); + nlh->nlmsg_seq = (uint32_t)time(NULL); ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); ifm->ifa_family = osa->u.sa.sa_family; @@ -616,7 +616,7 @@ nlh->nlmsg_type = RTM_NEWROUTE; nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_ACK; - nlh->nlmsg_seq = time(NULL); + nlh->nlmsg_seq = (uint32_t)time(NULL); rtm = mnl_nlmsg_put_extra_header(nlh, sizeof(*rtm)); rtm->rtm_family = dst_osa->u.sa.sa_family; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38501?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: Ia4c1c9b2dcc751b6cbd01a957627f882bc63ba87 Gerrit-Change-Number: 38501 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • ...
  • 164
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.