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=1796177278; b=eZ2MIctJ7bacROwivsBVNVuD+TAOm2F8DGtjm3SiOML8BtAa6MpXVNipCSYXWrU3R0Lh xGf2KyXTmyP/LyX5nrtUw2pvide6rlJDXBYS3GY+o1es3qNxCzmWIH55ni169G2YQfH72 nV8Vptj+XEYq8AwYWHdn+z8XFcu/m87X1w/V9MVF5c4ZC15qcJR6FeunJHFo68Q2RLx+Q 276WRBqjCx/2bidK3z9GClhdsWNeYnD8ou1ZnHrIaz2sxEpkaY7Xpb4NsnGdKyettvILL TbxGw60ohdnhNplsZzjNCBm/D8mZnSsMFra8h/ym7rNb+2W0c8pLcG0AxxtUK33/E3A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796177278; 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=O2l3CSGhmHi6zbl9dkgeh1MpBYqGC3bSmtH55zT/3ps=; b=iODQstp0YaTeQaNvXE278VXD2bQUqw68N9juDVs5SLrRSbQdPMntLMa2IgF00wgMzGqT ycRQuLho5Vpqvt+d7sdZ7Ym/mpZrxAssCudJs8eGbLNi7Ure/UewLW/NkLufAiErPw5HF hgEwPUngX4p3JlbVv1g4q9XcuL7oxFzkSr10xig+bZAsyKpKP5hyE6R+igErmZj+FMwYW utTQUhju7/PQMRE+7Pyt2r0UBL3GAJ+I985yiSBAr+YSUxyydrtc4LvCz4Glta3xlXmWe +pw208L8PC5LZGXGgHlZ3rdECck6q+3M5vhnCxj3wWaR/Qek0qytKRL5HLpqNsHGnbg== 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=PXMl6y+c; 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 0D45F606A323; Wed, 2 Dec 2026 02:07:57 +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=PXMl6y+c Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D5181F000C1; Wed, 2 Dec 2026 02:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796177277; bh=O2l3CSGhmHi6zbl9dkgeh1MpBYqGC3bSmtH55zT/3ps=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=PXMl6y+cyc7Z9bFVEFzQVfoYl7bbQvPmv1UYWHnF5thkGkYMnS8rTGR7ezj5ZxsR+ /DxFLjpQui6uvZm9IXnQWPqBBSg3KHwL6O85QA2+ede4QnXNK+42IYd967oQPvU+Eo eURwnUCSEN/V6mSlXdS07srHhbO+E7bHMGVpLZYztlCsnYcbCgqHQLLPoTZKx8Dez0 dgSyY18l9LIVxeNUBuE+heRbEd1uXFA0/jG48m6mSR5M3twCwAlzUxTMkv3ZhW2poR +JFJSvnl652M7rNNrEzaNNMTm2TKIS6mWT1bUXFb2KYk8MJatJwO3jdxxakT/BFUHY 05XilcNoFzVtQ== Subject: Re: [PATCH can-next v3 4/6] can: bittiming: register_candev(): reject unusable bit-timing constants From: netdev-bot+sashiko@kernel.org To: mkl@pengutronix.de Cc: mailhol@kernel.org, socketcan@hartkopp.net, wg@grandegger.com, davem@davemloft.net, kernel@pengutronix.de, linux-can@vger.kernel.org, 25031212351@stu.xidian.edu.cn, stable@vger.kernel.org, byu@xidian.edu.cn, wencheng@xidian.edu.cn, kuba@kernel.org Date: Wed, 02 Dec 2026 02:07:56 +0000 Message-ID: <179617727666.3142.12661724725529519319@kernel.org> In-Reply-To: <20261130-bittiming-fix-conversion-v3-4-e61f92dc76d0@pengutronix.de> References: <20261130-bittiming-fix-conversion-v3-4-e61f92dc76d0@pengutronix.de> X-sashiko-severity: Low 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 more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The commit message says "Also limit the bit time to CAN_MAX_BIT_TIME_TQ", but the patch defines and uses a macro named… -- can: bittiming: register_candev(): reject unusable bit-timing constants This commit extends can_bittiming_const_valid() so that register_candev() rejects bit-timing constants that would cause a division by zero or an unbounded loop in can_calc_bittiming(). It also adds can_pwm_const_valid(), requires a non-zero clock frequency, and checks that the CAN-CC, CAN-FD, CAN XL and XL PWM constants are registered in the required order. > Also limit the bit time to CAN_MAX_BIT_TIME_TQ. The loop in > can_calc_bittiming() walks all time segment candidates from the maxima down > to the minima; with a bit time near U32_MAX its bounds wrap around and the > loop does not terminate while RTNL is held. The bit times of the currently > supported controllers stay well below the limit. [Severity: Low] This isn't a bug, but the macro name in the commit message doesn't match the code. The patch defines and uses CAN_BIT_TIME_TQ_MAX in drivers/net/can/dev/dev.c: #define CAN_BIT_TIME_TQ_MAX 1024 and can_bittiming_const_valid() checks: bit_time > CAN_BIT_TIME_TQ_MAX No symbol named CAN_MAX_BIT_TIME_TQ exists in the tree. Could the changelog use CAN_BIT_TIME_TQ_MAX instead? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130-bittiming-fix-conversion-v3-0-e61f92dc76d0%40pengutronix.de