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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200513174750.5ec971f0@hermes.lan>
Date:   Wed, 13 May 2020 17:47:50 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc:     dsahern@...il.com, netdev@...r.kernel.org, kiran.patil@...el.com
Subject: Re: [PATCH iproute2-next] tc: mqprio: reject queues count/offset
 pair count higher than num_tc

On Wed, 13 May 2020 21:47:17 +0200
Maciej Fijalkowski <maciej.fijalkowski@...el.com> wrote:

> Provide a sanity check that will make sure whether queues count/offset
> pair count will not exceed the actual number of TCs being created.
> 
> Example command that is invalid because there are 4 count/offset pairs
> whereas num_tc is only 2.
> 
>  # tc qdisc add dev enp96s0f0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
> queues 4@0 4@4 4@8 4@12 hw 1 mode channel
> 
> Store the parsed count/offset pair count onto a dedicated variable that
> will be compared against opt.num_tc after all of the command line
> arguments were parsed. Bail out if this count is higher than opt.num_tc
> and let user know about it.
> 
> Drivers were swallowing such commands as they were iterating over
> count/offset pairs where num_tc was used as a delimiter, so this is not
> a big deal, but better catch such misconfiguration at the command line
> argument parsing level.
> 
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

This doesn't have to wait for iproute2-next.
Can pick it up on the master side (after review).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ