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=1796489392; b=jdEZemvMfYR6CdCu/+kAsGBCrJg8H422IIT++kCxoN65000fUTwconTXkqySY2hWeC75 MbsFho9efH0SntmbNtGJMK0yYTYAvmZLiPs9segm9qPrqs84Aq/r78UkMfa2AQZd/OV5G Cav8I2hZxfgy08ZAZEqmxxV+jSgh6I7WghTvVBRK5C2dg23zK+1zQlyehX8SdF5W3+53Y s+RsWLUQYpHAX4n5yWrT6N0nduwGwmLfiQfHabO9Epji/4yAddq4zxrSWArI/Bwj2rDuV BWzUrVdzgpstfN/2MZ4LkKyrr2QMqwH4e7hY06V3nuBg+JrEuPMlCBeDqauwCWHfVUw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796489392; 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=Ttg7XZA1Tdfebs9dNi085OMkYUPZdsqUlmyto6jVktM=; b=3WILbqhgUWjB0RMzGiJEHjtXg2bHiFTaWCs+bTu05ozym8lttz9AwuRrlVQqQzrK4ECe EzF+k0HVsdGywh7/SceIh3IgegdxefVJDLyX+v3WY2cPKfdbA5Agkh0KbucZ+pvzap1hL nlxzL+sO21v6bBNc81VmOVb9U/lRhvTXZrABbHSo1WVxbvIg3OIm73yKFvyxrS4129cZF RMbCBCHG9nN5GKZi+6xXRpifU+BBr9bJKUu1Zkv2WKtxDeXvcuMTBFfBUxzhyXb3WLd3I 5zfYIT6ceKkWIwQuAquRNtUgLXLeEu6dY3evEVThbhWo7DElDGX8VuPyE2DiowOt7Bw== 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=RAjd5YQx; 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 BB858606A330 for ; Sat, 5 Dec 2026 16:49:52 +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=RAjd5YQx Received: by smtp.kernel.org (Postfix) with ESMTPSA id 836781F00936; Sat, 5 Dec 2026 16:49:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796489392; bh=Ttg7XZA1Tdfebs9dNi085OMkYUPZdsqUlmyto6jVktM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=RAjd5YQxfEV6Swd+uJlQ64m0B5q1juPB/gj5oMcRXP0C1gIm1UGKFcZfGH6MXLG5F wE+4HWDKNcvNg/cHl7a+gCCH99En/qX2PqCPlxj39ved8HaZObqbqkBdg6pgYvd89Y HuYnNHSk62RX7Zd9OBafSVL5fjGFTAgYYUZXzqu8n0MHhcH9G/9zvkHU4bWn+ibjWb hMW3P8XWIZjqVU6d5S43074Pp65lIE2VgIQ+2+qm59nAkrOne2ESAvzwO932dWJ4iT 6o103scKmizcLcFAua/u67urwlTfZl2Qmku4l5RuDsb5EbcD/8o9c9bNlHQDOgnTII CONQ3kuYtTnlQ== Subject: Re: [PATCH net] dpll: do not overwrite extack messages set by drivers From: netdev-bot+sashiko@kernel.org To: ivecera@redhat.com Cc: netdev@vger.kernel.org, sashiko-bot@kernel.org, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, willemb@google.com, horms@kernel.org, aleksandr.loktionov@intel.com, przemyslaw.kitszel@intel.com, milena.olech@intel.com Date: Sat, 05 Dec 2026 16:49:51 +0000 Message-ID: <179648939103.3146.1181556187853222723@kernel.org> In-Reply-To: <20261204155246.425636-1-ivecera@redhat.com> References: <20261204155246.425636-1-ivecera@redhat.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@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 2 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 1 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 fix is incomplete against its own subject line ("do not overwrite extack messages set by drivers"). - [Low] netlink: missing NL_SET_ERR_MSG_FMT_WEAK in newline_in_nl_msg.cocci -- dpll: do not overwrite extack messages set by drivers When the frequency_set(), esync_set(), ref_sync_set() or phase_adjust_set() pin callbacks fail, the DPLL core now keeps any extack message the driver already set. Before, its generic "... set failed for dpll_id:N" message replaced it. The patch adds NL_SET_ERR_MSG_FMT_WEAK() to include/linux/netlink.h for this and uses it in the four set paths of drivers/dpll/dpll_netlink.c. > diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c > index e5380d95f238b..422e3fa3a632a 100644 > --- a/drivers/dpll/dpll_netlink.c > +++ b/drivers/dpll/dpll_netlink.c [ ... ] > @@ -1186,9 +1186,9 @@ dpll_pin_esync_set(struct dpll_pin *pin, struct nlattr *a, > ret = ops->esync_set(pin, dpll_pin_on_dpll_priv(dpll, pin), dpll, > dpll_priv(dpll), freq, extack); > if (ret) { > - NL_SET_ERR_MSG_FMT(extack, > - "embedded sync frequency set failed for dpll_id: %u", > - dpll->id); > + NL_SET_ERR_MSG_FMT_WEAK(extack, > + "embedded sync frequency set failed for dpll_id: %u", > + dpll->id); > return ret; > } > __dpll_pin_change_ntf(pin); [Severity: Medium] The subject says the core no longer overwrites extack messages set by drivers. Does that also hold for the get callback that runs just before esync_set() in this function? Earlier in dpll_pin_esync_set(): ret = ops->esync_get(pin, dpll_pin_on_dpll_priv(dpll, pin), dpll, dpll_priv(dpll), &esync, extack); if (ret) { NL_SET_ERR_MSG(extack, "unable to get current embedded sync frequency value"); return ret; } In ice, ice_dpll_input_esync_get(), ice_dpll_output_esync_get() and ice_dpll_input_ref_sync_get() all start with: if (ice_dpll_is_reset(pf, extack)) return -EBUSY; ice_dpll_is_reset() sets "PF reset in progress". These callbacks are wired as .esync_get and .ref_sync_get in the ice pin ops. So during a PF reset, a DPLL_CMD_PIN_SET request for esync or ref-sync on an ice pin would follow this path: dpll_pin_esync_set() -> ops->esync_get() -> ice_dpll_is_reset() The reply would still carry the generic "unable to get ..." string from the core, not the driver's reason. The other pin set paths call plain NL_SET_ERR_MSG() after their get callback in the same way: dpll_pin_freq_set(): "unable to get old frequency value" dpll_pin_ref_sync_state_set(): "unable to get old reference sync state" dpll_pin_phase_adj_set(): "unable to get old phase adjust value" The device-level paths dpll_mode_set(), dpll_phase_offset_monitor_set() and dpll_freq_monitor_set() do the same with their "unable to get ..." messages. Should these also switch to NL_SET_ERR_MSG_WEAK()? Or should the subject be narrowed to cover only the set callbacks? [ ... ] > diff --git a/include/linux/netlink.h b/include/linux/netlink.h > --- a/include/linux/netlink.h > +++ b/include/linux/netlink.h > @@ -143,6 +143,13 @@ struct netlink_ext_ack { > NL_SET_ERR_MSG_MOD((extack), msg); \ > } while (0) > > +#define NL_SET_ERR_MSG_FMT_WEAK(extack, fmt, args...) do { \ > + struct netlink_ext_ack *__extack_weak = (extack); \ > + \ > + if (__extack_weak && !__extack_weak->_msg) \ > + NL_SET_ERR_MSG_FMT(__extack_weak, fmt, ##args); \ > +} while (0) > + > #define NL_SET_BAD_ATTR_POLICY(extack, attr, pol) do { \ > if ((extack)) { \ > (extack)->bad_attr = (attr); \ > [Severity: Low] This adds a new member to the NL_SET_ERR_MSG* family, but scripts/coccinelle/misc/newline_in_nl_msg.cocci was not updated to know about it. That script lists the extack helpers from include/linux/netlink.h and include/net/genetlink.h. The list includes GENL_SET_ERR_MSG, NL_SET_ERR_MSG_FMT, NL_SET_ERR_MSG_WEAK, NL_SET_ERR_MSG_WEAK_MOD and NL_SET_ERR_MSG_ATTR_FMT, among others. The script flags message literals passed to those helpers that end in a newline. NL_SET_ERR_MSG_FMT_WEAK is not in that disjunction. A later caller that passes something like "frequency set failed\n" to the new macro would therefore not be reported by make coccicheck. There is no runtime impact, and the four dpll callers in this patch are fine. The list has been brought in sync with these headers before, though. Could you add NL_SET_ERR_MSG_FMT_WEAK to the newline_in_nl_msg.cocci match list, either in this patch or as a small follow-up? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204155246.425636-1-ivecera%40redhat.com