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] [day] [month] [year] [list]
Message-ID: <8698fad4-c406-4bd8-bfe3-33e5fda641e2@lunn.ch>
Date: Sat, 7 Feb 2026 16:09:13 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Deren Teo <deren.teo@...look.com>
Cc: "jhs@...atatu.com" <jhs@...atatu.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [tc] Invalid JSON output from hfsc qdisc

On Sat, Feb 07, 2026 at 02:01:01AM +0000, Deren Teo wrote:
> Dear Jamal,
> 
> I apologise if you have received this email twice. My first attempt mistakenly contained an HTML part and so was not delivered to the netdev mailing list. The original content follows.
> 
> 
> The JSON output for the hfsc qdisc is not parseable when a default class is specified; `hfsc_print_opt` uses `fprintf` to print the default class.
>  
> 
> Environment:
> 
> - Fedora 42
> - Linux 6.19.0-rc4+
> - iproute-tc-6.12.0-3.fc42.x86_64
> 
> Reproduce:
> 
> 1. Add a hfsc qdisc with any default class. For example, from the tc-hfsc man page:
>     # tc qdisc add dev eth0 root handle 1:0 hfsc default 1
> 
> 2. Show the qdisc with the `-j` flag:
>     # tc -j qdisc show dev eth0
> 
> Actual results:
> 
> [{"kind":"hfsc","handle":"1:","root":true,"refcnt":17,"options":{default 1 }}]
> 
> Expected results:
> 
> [{"kind":"hfsc","handle":"1:","root":true,"refcnt":17,"options":{"default":1}}]

Just an idea...

Could the self tests in tools/testing/selftests/tc-testing/tc-tests be
extended to dump the configuration in json and test the output is at
least readable by the python json parser? That should catch simple
formatting errors like this.

     Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ