Article View: linux.kernel.netdev
Article #15097Re: [PATCH net-next 09/15] batman-adv: annotate originator last_seen with READ/WRITE_ONCE
From: Sven Eckelmann
Date: Thu, 12 Nov 2026 10:57
Date: Thu, 12 Nov 2026 10:57
52 lines
9727 bytes
9727 bytes
--nextPart4751616.8F6SAcFxjW
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Sven Eckelmann <sven@narfation.org>
Date: Thu, 12 Nov 2026 11:57:37 +0100
Message-ID: <1831685.QkHrqEjB74@ripper>
In-Reply-To: <sashiko-outbox-210959@kernel.org>
MIME-Version: 1.0
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
--nextPart4751616.8F6SAcFxjW
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCavWboQAKCRBND3cr0xT1
y30qAQCxM2pzrCpWwjtmdG17Uozu4UXuGHZ7Y558+4W2pqCO7wD/dz9ukJGdb+Jv
qjF9rkCqVOr4xg+aDzhwJ5Pan1aQGww=
=hGQR
-----END PGP SIGNATURE-----
--nextPart4751616.8F6SAcFxjW--
Technical Details
Message-ID:
<1831685.QkHrqEjB74@ripper>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361742-linux-kernel-netdev=dewy.ruReferences:
<20261111102729.2096241-1-sw@simonwunderlich.de> <20261111102729.2096241-10-sw@simonwunderlich.de> <sashiko-outbox-210959@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361742-linux-kernel-netdev=dewy.ru From: sven@narfation.org (Sven Eckelmann) Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <1831685.QkHrqEjB74@ripper> References: <20261111102729.2096241-1-sw@simonwunderlich.de> <20261111102729.2096241-10-sw@simonwunderlich.de> <sashiko-outbox-210959@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4751616.8F6SAcFxjW"; micalg="pgp-sha512"; protocol="application/pgp-signature" Injection-Info: usenet.network; logging-data="1074619"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:2WXYFL8qpD68jtqEYvVdzRsrk0c= sha256:ftzZmxaVqSCwc9mIaTzohfWU2LsrHKjHD7r1xqo4RdU= sha1:JcJe5Y7bw79chAmrz7Du+D6cf9Q= sha256:Dwgn0ZbL6IWf8/OHzph68COLpvx/uIGei4unWBEpDwo= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 666701141F9; Thu, 12 Nov 2026 14:34:18 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=narfation.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VdVvMDybMFWX; Thu, 12 Nov 2026 14:34:14 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-361742-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=narfation.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 2E85B1140A8; Thu, 12 Nov 2026 14:34:05 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id E036A125DA1; Thu, 12 Nov 2026 10:57:47 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794481063; b=woG7SjS8NEynuUzpF+dFSS1M0ngeLzcpHGxgChXXEfhvOMSDIkuroKPIStIexdU4eIaZ fVYWoF67X2F3iM06BWqT/ngLfXc2UHRG8DhAvNWPKHs977USSi7BPS42sYkH2n3cSM8DN CFa9rbm0CtiQqaDHcZRFHdNuNZu/wTjTG2IE0OUYKvibOVUQTInnpKwIUiTH/0bXaCzA/ nq2ZLZ457MK7pmzFDdAbQfeTAgtWOokcgxqacUQK9LDS/FQXGyF/9RzxzKl6hZ1Ahj3Ax i1gxJZnroFo6UVXvJN4TtLcIqrQ40sswTaFyaIEDyPr8uC4KDroXWhSR6rMOOboyI2w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794481063; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Subject:Date:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type; bh=8P9ng6dnAOZ1uLRwI2Xyior8nl1Uol/mP/8AoZqdZUo=; b=ggIKJsXFDMkl85pREr5BSt8kJDtnTw7ljtJsES/PTQyE0lMTKfujmmWy/GLGLoks80q6 FYmozzDiAFZJsgMPBCXYN1W+z0p7WoMnhp3IPWSkpdNwTTbMkZZvkit3m0lEf04i4CUum 5fNJ+epc2qoG4qaQ6SR6AeYLw9de/wUEw1ishRUOBjX6rSzSeMSZEbPM9jPUNIKJUOl+N fSiabm2wHrCzGjoQ3u4C7FVjJDChLKM5SwX9q7scS8+a+Z1zCtDFRMpp7Hx2xa8rWmaF2 JW7pnFE6+gTZPjY0SvOuy/qbHartO3h+h8YMopfJ1IIjDR1DX82M/vXcZWkhUEm0PGw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=aZBIcGHd; dmarc=pass header.from=narfation.org; spf=pass smtp.mailfrom=narfation.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68087606A333; Thu, 12 Nov 2026 10:57:43 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=aZBIcGHd X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.160.73.56 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794481062; b=cSQRNqknHrON0Ue4ZC5Nonbo2JPLhvitwY7OvqwtqIggXRSSrBRZvo9PuP+qJchOHRhd aLcz258rZLKbjDxc09BL/NcMtsny5G2nJ/u62587+LwsCdOTSNmIp5a6KJRJ+lJujvdtL EQ2k8WUBUkwEKtv5QP0GXXqopM7gyNgr+P9HLZeMQi+5Iq3ZrtQJBiesdzD3SsOFVdXRi AP6wbmDsvru9GviXW6ms6YKlaqObhTpBoDd2AnjzJinaAGo2G+odHIxJZLA0vLNMGPscs Wj6V5nbJoYtB5Q24ct+NZCNb7jytqrsRDD7W1HTTbzsNvCLGVxiZMl3mDu0yrixDrlQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794481062; h=DMARC-Filter:Received:DKIM-Signature:From:To:Subject:Date:Message-ID: In-Reply-To:References:MIME-Version:Content-Type; bh=8P9ng6dnAOZ1uLRwI2Xyior8nl1Uol/mP/8AoZqdZUo=; b=WARinW6u+uXojqxRDImtfW6YdKbswKZmQG7uWGtRce3NnESFJ/MQ4gWTaG8R5k1/Oy2f zjcRA0+B1ZbsRg0ePltcc/eV8yFPsMCm40YngGgbAgYUyuWAUdPPYc8QNSgw6fxKpK0aj XgmNg7rixbYqDvQigyPLI5GFoekGu2YU4LzvnN3SvNEUnBSHFw1CA9rO7MCgVGFD8obig h7M6rqUnYv48Wdgw1xDMCUlKthF8YKZEN7b1zICT1BSCgGUEzOOzi8j8f8ZgrOniFD7R/ Ehyz9g9Nk1txAt8t/tMDEs4SztkpJpHZEoSghn3ckb8WqWY7OG3+whJUPXslz1WyjBQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=narfation.org; spf=pass smtp.mailfrom=narfation.org; dkim=pass header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=aZBIcGHd; arc=none smtp.remote-ip=213.160.73.56 X-Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21F3E606A31C for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 10:57:41 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21F3E606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=narfation.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=narfation.org X-Received: by dvalin.narfation.org (Postfix) id 46F7F1FEF7; Thu, 12 Nov 2026 10:57:40 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org; s=20121; t=1794481060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8P9ng6dnAOZ1uLRwI2Xyior8nl1Uol/mP/8AoZqdZUo=; b=aZBIcGHdgmTgfk0JcPXJLdRysccdxIvZ/gaPvXpts6Ofv5Y3eOzvbwWlk3Cs5A0WFSNdlC aXjzjLzKCOIB85shL/DCf4ggsC9869mYZ9NSWOp2K5ht2NFUHFIfa1J1JkBsqpC+2fk3dO uiewdbMYQkq+6nYDyjZ4z8TL97QIwfo= X-In-Reply-To: <sashiko-outbox-210959@kernel.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list