From: Sven Eckelmann <sven@narfation.org>
To: sashiko-reviews@lists.linux.dev, b.a.t.m.a.n@lists.open-mesh.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 09/15] batman-adv: annotate originator last_seen with READ/WRITE_ONCE
Date: Thu, 12 Nov 2026 11:57:37 +0100 [thread overview]
Message-ID: <1831685.QkHrqEjB74@ripper> (raw)
In-Reply-To: <sashiko-outbox-210959@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 958 bytes --]
On Thursday, 12 November 2026 11:34:43 CET sashiko-bot@kernel.org wrote:
[...]
> [Severity: Medium]
> This problem wasn't introduced by this patch, but can
> batadv_v_neigh_dump_neigh() and batadv_iv_neigh_dump_neigh()
batadv_iv_neigh_dump_neigh? There is no function with this name in the source
code. There is only batadv_iv_ogm_neigh_dump_neigh()
> suffer from
> the same timestamp underflow [1]?
>
> net/batman-adv/bat_v.c:batadv_v_neigh_dump_neigh() {
> ...
> last_seen_msecs = jiffies_to_msecs(jiffies - hardif_neigh->last_seen);
> ...
> }
>
> Because hardif_neigh->last_seen is updated locklessly on packet reception
> and read without READ_ONCE() or jiffies_delta_to_msecs(), a concurrent
> update can leave hardif_neigh->last_seen ahead of the sampled jiffies
> value, wrapping the subtraction and exporting a huge last_seen_msecs
> value over netlink.
This is adjusted in the next two patches in this patchset.
Regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-11-12 10:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 10:27 [PATCH net-next 00/15] pull request for net-next: batman-adv 2026-11-11 Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 01/15] batman-adv: mcast: explicitly initialize mcast.num_want_all_rtr{4,6) Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 02/15] batman-adv: mcast: explicitly initialize mcast.want_all_rtr{4,6}_list Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 03/15] batman-adv: uapi: add note/clarification on access of reserved bytes/bits Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 04/15] batman-adv: avoid torn u64 counter reads on 32-bit systems Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 05/15] batman-adv: bat_v: initialize last_unicast_tx on neighbor creation Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 06/15] batman-adv: dat: annotate last_update with READ/WRITE_ONCE Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 07/15] batman-adv: bla: avoid negative reported BATADV_ATTR_LAST_SEEN_MSECS Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 08/15] batman-adv: tt: annotate last_seen with READ/WRITE_ONCE Simon Wunderlich
[not found] ` <sashiko-outbox-210958@kernel.org>
2026-11-12 10:57 ` Sven Eckelmann
2026-11-11 10:27 ` [PATCH net-next 09/15] batman-adv: annotate originator " Simon Wunderlich
[not found] ` <sashiko-outbox-210959@kernel.org>
2026-11-12 10:57 ` Sven Eckelmann [this message]
2026-11-11 10:27 ` [PATCH net-next 10/15] batman-adv: annotate neigh_node " Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 11/15] batman-adv: annotate hardif_neigh_node " Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 12/15] batman-adv: use matching return types for bool and void functions Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 13/15] batman-adv: mark read-only MAC address parameters as const Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 14/15] batman-adv: use bool for boolean flags Simon Wunderlich
2026-11-11 10:27 ` [PATCH net-next 15/15] batman-adv: mcast: document the value stored in is_routable Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1831685.QkHrqEjB74@ripper \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=netdev@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox