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: <aLnw0L3ncTsQm2eD@shikoro>
Date: Thu, 4 Sep 2025 22:04:32 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Mohammad Gomaa <midomaxgomaa@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org, kenalba@...gle.com,
	hbarnor@...omium.org, rayxu@...gle.com
Subject: Re: [PATCH WIP v2] i2c: add tracepoints to aid debugging in
 i2c-core-base

Hi Mohammad,

On Sun, Aug 17, 2025 at 10:55:14AM +0300, Mohammad Gomaa wrote:
> Add tracepoints to i2c-core-base.c file to help trace
> and debug I2C device probe failures.
> 
> The new trace points are:
> - i2c_device_probe_debug: records non-failure routines
>   e.g. IRQ 0.
> - i2c_device_probe_complete: records failed & successful
>   probbes with appropriate trace message.
> 
> To support operation of these tracepoints an enum
> was added that stores log message for debug and failure.
> 
> Signed-off-by: Mohammad Gomaa <midomaxgomaa@...il.com>
> ---
> Hello,
> 
> This patch adds tracepoints to i2c-core-base to aid with debugging I2C probing failrues.
> 
> The motivation for this comes from my work in Google Summer of Code (GSoC) 2025:
> "ChromeOS Platform Input Device Quality Monitoring"
> https://summerofcode.withgoogle.com/programs/2025/projects/uCdIgK7K
> 
> This is my first submission to the Linux kernel, so any feedback is welcome.

Welcome to Kernel hacking!

I understand from the link above that this patch is intended for quality
assurance. With automatic testing, you can find regression of firmware
updates much easier.

The drawback is that it is quite some code for such a niche use case.
Also, I would think this code is very fragile because whenever the code
path in probe changes, one must ensure that err_reason is still set
accordingly. This adds maintenance burden.

I wonder if you can't use the output in the kernel log to identify
problems? We could add some if they are really missing. I know such
strings are not static. Still, my gut feeling says some application
should handle the complexity, not the kernel. Wouldn't we need a patch
like this for each and every subsystem if we follow that route?

Happy hacking,

   Wolfram

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ