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: <20250726113743.0e9aad80@kernel.org>
Date: Sat, 26 Jul 2025 11:37:43 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Takamitsu Iwai <takamitz@...zon.co.jp>
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>, Jamal Hadi Salim
 <jhs@...atatu.com>, Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko
 <jiri@...nulli.us>, <netdev@...r.kernel.org>, Kuniyuki Iwashima
 <kuniyu@...gle.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
 <horms@...nel.org>, Vladimir Oltean <olteanv@...il.com>,
 <takamitz@...zon.com>,
 <syzbot+398e1ee4ca2cac05fddb@...kaller.appspotmail.com>
Subject: Re: [PATCH v2 net] net/sched: taprio: enforce minimum value for
 picos_per_byte

On Sat, 26 Jul 2025 10:08:15 +0900 Takamitsu Iwai wrote:
>  #define TAPRIO_FLAGS_INVALID U32_MAX
> +/* Minimum value for picos_per_byte to ensure non-zero duration
> + * for minimum-sized Ethernet frames (ETH_ZLEN = 60).
> + * 60 * 17 > PSEC_PER_NSEC (1000)
> + */
> +#define TAPRIO_PICOS_PER_BYTE_MIN 17
> +

unnecessary new line

>  struct sched_entry {
>  	/* Durations between this GCL entry and the GCL entry where the
> @@ -1300,6 +1306,11 @@ static void taprio_set_picos_per_byte(struct net_device *dev,
>  
>  skip:
>  	picos_per_byte = (USEC_PER_SEC * 8) / speed;
> +	if (picos_per_byte < TAPRIO_PICOS_PER_BYTE_MIN) {
> +		pr_warn("Link speed %d is too high. Schedule may be inaccurate.\n",
> +			speed);
> +		picos_per_byte = TAPRIO_PICOS_PER_BYTE_MIN;

for the path coming in from taprio_change() you should use the extack
to report the warning (if return value is 0 but extack was set CLIs
will print that message as a warning directly to the user)
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ