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-next>] [day] [month] [year] [list]
Message-Id: <20251021-fix-module-info-json-v1-0-01d61b1973f6@a-eberle.de>
Date: Tue, 21 Oct 2025 16:00:11 +0200
From: Johannes Eigner <johannes.eigner@...berle.de>
To: netdev@...r.kernel.org
Cc: Michal Kubecek <mkubecek@...e.cz>, 
 Danielle Ratson <danieller@...dia.com>, 
 Stephan Wurm <stephan.wurm@...berle.de>, 
 Johannes Eigner <johannes.eigner@...berle.de>
Subject: [PATCH ethtool 0/2] fix module info JSON output

In one of our products we need to show the SFP diagnostics in a web
interface. Therefore we want to use the JSON output of the ethtool
module information. During integration I found two problems.

When using `ethtool -j -m sfpX` only the basic module information was
JSON formatted, the diagnostics part was not. First patch ensures whole
module information output is JSON formatted for SFP modules.

The same keys were used for both the actual and threshold values in the
diagnostics JSON output, which is not valid JSON. Second patch avoids
this by renaming the threshold keys.
This solution is not backward compatible. I don't see a possibility to
fix this in a backward compatible way. If anyone knows a solution,
please let me know so I can improve the patch.
Another solution for the second patch would be to rename the keys for
the actual values instead of the thresholds. But this is also not
backward compatible. I decided to rename the threshold keys, as this
aligns with the naming used for the warning and alarm flags.
Second bug is definitely affecting SFP modules and maybe also affecting
QSFP and CMIS modules. Possible bug for QSFP and CMIS modules are based
on my understanding of the code only. I have only access to hardware
supporting SFP modules.

Signed-off-by: Johannes Eigner <johannes.eigner@...berle.de>
---
Johannes Eigner (2):
      sfpid: Fix JSON output of SFP diagnostics
      sff-common: Fix naming of JSON keys for thresholds

 sff-common.c | 50 +++++++++++++++++++++++++-------------------------
 sfpid.c      |  4 ++--
 2 files changed, 27 insertions(+), 27 deletions(-)
---
base-commit: 422504811c13c245cd627be2718fbaa109bdd6ec
change-id: 20251021-fix-module-info-json-0424107771fe

Best regards,
-- 
Johannes Eigner <johannes.eigner@...berle.de>


Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (4153 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ