From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796158405; b=O16EBL03i0G8zERiiM5zh/gU6NcYOxNlvRAFhtz7g/lri+TswsdQFJRF0h3xIgzI1/Iz uYFhSKs5Yi1s2m193VGWUFNiWrtpwr/wITAZwKFHcLoKakWp6kQo0T2Fz9DHCw2J0uaNX FEPTJ+KO20l4BiuxcDALDypVQScRTaCR8BmAkBXjxpDIG1y6qWH/h//q90oEnAu0NHAUN IWKKwYvx2s0Akm90JopvAwNZF6G9rkdRuaadbYwODaqvcA5VweeiCMQxmLQLTG68YT/b7 lFHK7eHdjGrvPVgHKw8h9oF7+GPk8K/QvQBI39y5fxCA9uyG5u3M4N48Ymwok2QaITQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796158405; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=XeheTqBgPQirSDFyF1JpyOFzoiDu/mlAfmCOnPb7nlA=; b=uwvCepskbl4AbARYytV0vzxbPOnhXvXP1/uIapnBn0fN2ZNANOjIxiefXtRLwgI1k4/f yuVvczCeq6Xpqj5MWeTzbXcSmt9auwIHniJIgyY75Sp93XHWE00Ta2ZVQMuIlLikePxOR PvNIg9nXuUxER4Cyn663MazTXJmvXZu27oNEg/ZIx0rBFnXOVQ9jtwb/jwrS/ooU4IXRY lmHigI2YQxwXGsIq/di+R/07Hrcc6jTUmpDuzazGKn2VS2oy0Rbd40fCVMo73+YCHgdk6 8sbPw2xAfKHyceJMOuqpxW9va+ZX/6TqEaMO2DTYpXb1EIOOHlb4QAvnDQmMtrMw/Ug== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SRogdXAv; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 871A8606A322; Tue, 1 Dec 2026 20:53:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SRogdXAv Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93FB71F000C1; Tue, 1 Dec 2026 20:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796158405; bh=XeheTqBgPQirSDFyF1JpyOFzoiDu/mlAfmCOnPb7nlA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=SRogdXAvm1Ny8JfJk59YWyi7qWnT9LPIpKdg86lHsgySaYSYIAfY9FdbkxjKsxV7i HbbbxH8i0f1tALSlUItxbbEnXsxYPJYMzKV2paAxVKxfzIEm6XDBiSMCginczscUXj oHsVgfzBchA67e7Ep64yR5Pbf6BiMxB+gwCNnZiSDqz2QEFNbNbj8dK76dn1WlZzaq QgZfQZi3y5zsrhoTSXNrJU8VjK7pf2tOUJ3MzRip8TkIwhg8zmo2+U+x+3FzdBWeUu DzRwdZwrhe5ASF8qvexgODMdtZlQ175mNWeQPDAFrOs+TRJrYFotwfviP9h1S9JjNH XsgFvv/zVohaw== Subject: Re: [PATCH can-next v11 6/9] can: gs_usb: add support for context analysis From: netdev-bot+sashiko@kernel.org To: mkl@pengutronix.de Cc: mailhol@kernel.org, pfink@christ-es.de, eric@evenchick.com, max@schneidersoft.net, wg@grandegger.com, kernel@pengutronix.de, linux-can@vger.kernel.org, stable@vger.kernel.org, kuba@kernel.org Date: Tue, 01 Dec 2026 20:53:24 +0000 Message-ID: <179615840412.3142.6919158939421503268@kernel.org> In-Reply-To: <20261130-gs_usb-fixes-v11-6-3f052bb620d4@pengutronix.de> References: <20261130-gs_usb-fixes-v11-6-3f052bb620d4@pengutronix.de> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-can@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] The commit message of "can: gs_usb: add support for context analysis" describes changes that the patch does not contain. -- can: gs_usb: add support for context analysis This commit enables context analysis for the gs_usb driver by setting CONTEXT_ANALYSIS_gs_usb.o in drivers/net/can/usb/Makefile. It also marks the tc_snapshot member of struct gs_usb as guarded by tc_lock. > Tag the hardware timestamp counter infrastructure in struct gs_usb as > guarded by the tc_lock. Fix the existing annotation for > gs_usb_timestamp_read(), add context analysis annotation regarding the > tc_lock to the low level timestamp reading functions. [Severity: Medium] Does this paragraph still match the diff? The patch makes only two changes. In drivers/net/can/usb/Makefile: CONTEXT_ANALYSIS_gs_usb.o := y In struct gs_usb in drivers/net/can/usb/gs_usb.c: struct gs_usb_timer tc_snapshot __guarded_by(&tc_lock); The old __must_hold(&dev->tc_lock) on gs_usb_timestamp_read() seems to be gone already. It was removed by the previous patch in the series, "can: gs_usb: fix hardware timestamp state for mixed channels". That leaves no existing annotation for this patch to fix. This patch also adds no tc_lock annotation to gs_usb_get_timestamp() or gs_usb_timestamp_read(). Both functions end up in a sleeping usb_control_msg_recv(..., GFP_KERNEL), so maybe the intent was something like __must_not_hold(&parent->tc_lock)? A grep of gs_usb.c at this commit and at the end of the series finds no __must_hold, __must_not_hold, __acquires, __releases or __context_unsafe. The only annotation is the new __guarded_by on tc_snapshot. The current code does not sleep under tc_lock. gs_usb_timestamp_work() calls timecounter_read() before gs_usb_timestamp_do_snapshot() takes write_seqlock_irqsave(). But without a contract on these functions, context analysis would not catch a later change that calls them inside the write section. Only tc_snapshot is tagged, which covers less than "the hardware timestamp counter infrastructure". Leaving tc_active untagged looks right, because it is accessed outside tc_lock. Could the commit message be updated to describe what the patch actually does? Or were the annotation hunks for the low-level timestamp read functions meant to be part of this patch? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130-gs_usb-fixes-v11-0-3f052bb620d4%40pengutronix.de