From: Ivan Vecera <ivecera@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com,
jiri@resnulli.us, donald.hunter@gmail.com
Subject: Re: [PATCH net-next 1/3] dpll: do not truncate the requested pin frequency before checking it
Date: Fri, 25 Sep 2026 19:59:31 +0200 [thread overview]
Message-ID: <702b7b8a-d9a2-4ceb-9013-b94aeaf85ee8@redhat.com> (raw)
In-Reply-To: <20260924231211.568213-2-kuba@kernel.org>
On 9/25/26 1:12 AM, Jakub Kicinski wrote:
> DPLL_A_PIN_FREQUENCY is a u64 on the wire and dpll_pin_freq_set() keeps it
> as one, but dpll_pin_is_freq_supported() takes a u32 while the ranges it
> compares against are u64. The supported-frequency check therefore only
> looks at the low 32 bits, and the full value is what reaches the driver.
>
> Nothing is hitting this today. Reaching it at all needs a pin-set above
> U32_MAX, which no sane caller sends, and the outcome is mild: a pin
> advertising 10 kHz accepts 0x1_0000_2710, ice narrows it straight back to
> 10 kHz in ice_dpll_pin_freq_set(), so the hardware still ends up on an
> advertised frequency and only the "frequency is not supported by the
> device" rejection goes missing. The other direction - a legitimate request
> above U32_MAX wrapping out of the pin's range - needs a driver advertising
> such a range, and none does; zl3073x_pin_check_freq() refuses one outright.
>
> So this is types rather than a live bug. Widen the check to match the
> attribute, the ranges and the driver callback instead of adding a U32_MAX
> rejection, so that the second case stays right if such a driver appears.
> dpll_pin_esync_set() already keeps u64 throughout its equivalent loop.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> drivers/dpll/dpll_netlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c
> index fb24fd53f2e1..e5380d95f238 100644
> --- a/drivers/dpll/dpll_netlink.c
> +++ b/drivers/dpll/dpll_netlink.c
> @@ -608,7 +608,7 @@ dpll_msg_add_pin_ref_sync(struct sk_buff *msg, struct dpll_pin *pin,
> return -EMSGSIZE;
> }
>
> -static bool dpll_pin_is_freq_supported(struct dpll_pin *pin, u32 freq)
> +static bool dpll_pin_is_freq_supported(struct dpll_pin *pin, u64 freq)
> {
> int fs;
>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
next prev parent reply other threads:[~2026-09-25 17:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 23:12 [PATCH net-next 0/3] dpll: fix LLM nit picks from the spec scan Jakub Kicinski
2026-09-24 23:12 ` [PATCH net-next 1/3] dpll: do not truncate the requested pin frequency before checking it Jakub Kicinski
2026-09-25 17:59 ` Ivan Vecera [this message]
2026-09-24 23:12 ` [PATCH net-next 2/3] netlink: specs: dpll: declare pad in the nests which carry 64-bit values Jakub Kicinski
2026-09-25 18:00 ` Ivan Vecera
2026-09-24 23:12 ` [PATCH net-next 3/3] netlink: specs: dpll: drop the reference to DPLL_MODE_DETACHED Jakub Kicinski
2026-09-25 18:00 ` Ivan Vecera
2026-09-26 1:20 ` [PATCH net-next 0/3] dpll: fix LLM nit picks from the spec scan patchwork-bot+netdevbpf
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=702b7b8a-d9a2-4ceb-9013-b94aeaf85ee8@redhat.com \
--to=ivecera@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@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