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]
Date: Thu, 08 Feb 2024 15:47:38 -0500
From: Gabriel Krisman Bertazi <krisman@...e.de>
To: Matthew Wilcox <willy@...radead.org>
Cc: Miklos Szeredi <miklos@...redi.hu>,  Jan Kara <jack@...e.cz>,  lsf-pc
 <lsf-pc@...ts.linux-foundation.org>,  linux-fsdevel@...r.kernel.org,
  linux-kernel@...r.kernel.org
Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] tracing the source of errors

Matthew Wilcox <willy@...radead.org> writes:

> Option (b)
>
> -#define EINVAL		22
> +#define E_INVAL	22
> +#define EINVAL		ERR(E_INVAL)

Note there will surely be cases where EINVAL is used as a soft failure
and the kernel will just try something else, instead of propagating the
error up the stack.  In this case, there is no point in logging the
first case of error, as it will just be expected behavior.

So there's really no way around explicitly annotating (ERR (EINVAL))
in place where it really matters, instead of changing the definition
of -EINVAL itself or automatically converting check sites.

>
> and then change all code that does something like:
>
> 	if (err == -EINVAL)
> to
> 	if (err == -E_INVAL)
>
> Or have I misunderstood?



-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ