lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLhSq4cq4sddOKuKkKsHGVCO7ocMiQ-16VVDyHjCixwgQ@mail.gmail.com>
Date: Mon, 28 Jul 2025 23:45:40 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Vineeth Karumanchi <vineeth.karumanchi@....com>
Cc: git@....com, vinicius.gomes@...el.com, jhs@...atatu.com, 
	xiyou.wangcong@...il.com, jiri@...nulli.us, davem@...emloft.net, 
	kuba@...nel.org, pabeni@...hat.com, horms@...nel.org, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH net] net: taprio: Validate offload support using
 NETIF_F_HW_TC in hw_features

On Mon, Jul 28, 2025 at 11:10 PM Vineeth Karumanchi
<vineeth.karumanchi@....com> wrote:
>
> The current taprio offload validation relies solely on the presence of
> .ndo_setup_tc, which is insufficient. Some IP versions of a driver expose
> .ndo_setup_tc but lack actual hardware offload support for taprio.
>
> To address this, add a check for NETIF_F_HW_TC in netdev->hw_features.
> This ensures that taprio offload is only enabled on devices that
> explicitly advertise hardware traffic control capabilities.
>
> Note: Some drivers already set NETIF_F_HW_TC alongside .ndo_setup_tc.
> Follow-up patches will be submitted to update remaining drivers if this
> approach is accepted.

Hi Vineeth

Could you give more details ? "Some IP versions of a driver" and "Some
drivers" are rather vague.

Also what happens without your patch ? Freeze / crash, or nothing at all ?

>
> Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@....com>

Patches targeting net branch should include a Fixes: tag.

Thanks

> ---
>  net/sched/sch_taprio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
> index 2b14c81a87e5..a797995bdc8d 100644
> --- a/net/sched/sch_taprio.c
> +++ b/net/sched/sch_taprio.c
> @@ -1506,7 +1506,7 @@ static int taprio_enable_offload(struct net_device *dev,
>         struct tc_taprio_caps caps;
>         int tc, err = 0;
>
> -       if (!ops->ndo_setup_tc) {
> +       if (!ops->ndo_setup_tc || !(dev->hw_features & NETIF_F_HW_TC)) {
>                 NL_SET_ERR_MSG(extack,
>                                "Device does not support taprio offload");
>                 return -EOPNOTSUPP;
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ