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: <6267a1fe-0073-4aca-ab19-a63a7565f116@stanley.mountain>
Date: Wed, 4 Sep 2024 21:55:07 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Konrad Dybcio <konradybcio@...nel.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>,
	Yu Jiaoliang <yujiaoliang@...o.com>,
	Bjorn Andersson <andersson@...nel.org>,
	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
	opensource.kernel@...o.com
Subject: Re: [PATCH v1] soc: qcom: pbs: Simplify with dev_err_probe()

On Fri, Aug 30, 2024 at 05:31:14PM +0200, Konrad Dybcio wrote:
> > 
> > There are a few things which we could do:
> > 
> > 1) Returning -EPROBE_DEFER to an ioctl or something besides a probe()
> >    This is a bug right?  -EPROBE_DEFER is basically kernel internal for probe()
> >    functions.  It tried to write this but it was complicated so I gave up.
> 
> Maybe call_tree.pl can somehow be used with an if name[-5:] == "probe"
> or something along those lines..
> 

I wrote the call_tree.pl script before I had the database.  These days I tend to
use the database instead.

I've implemented this check but it only looks at ioctls.  I'll test it tonight.

> > 
> > 2) Printing an error message for -EPROBE_DEFER warnings
> >    I've written this check and I can test it tonight.
> > 

I've done this.  See the attached check and the dont_print.list file attached.
The line numbers are based on linux next.  The false positives from here are
pretty harmless because calling dev_err_probe() is fine.

> > 3) Not propagating the -EPROBE_DEFER returns
> >    This shouldn't be too hard to write.
> > 

I've done this too.  The false positives from this could be bad, because we only
want to propagate -EPROBE_DEFER back from probe() functions.

See propagate.list.

regards,
dan carpenter

View attachment "check_returning_EPROBE_DEFER.c" of type "text/x-csrc" (1633 bytes)

View attachment "check_eprobe_defer_is_silent.c" of type "text/x-csrc" (2412 bytes)

View attachment "dont_print.list" of type "text/plain" (16698 bytes)

View attachment "check_propagate_EPROBE_DEFER2.c" of type "text/x-csrc" (1713 bytes)

View attachment "propagate.list" of type "text/plain" (6357 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ