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:   Mon, 11 May 2020 10:03:31 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     netdev@...r.kernel.org, andrew@...n.ch,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2] checkpatch: warn about uses of ENOTSUPP

On Mon, 2020-05-11 at 09:53 -0700, Jakub Kicinski wrote:
> ENOTSUPP often feels like the right error code to use, but it's
> in fact not a standard Unix error. E.g.:
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -4199,6 +4199,17 @@ sub process {
>  			     "ENOSYS means 'invalid syscall nr' and nothing else\n" . $herecurr);
>  		}
>  
> +# ENOTSUPP is not a standard error code and should be avoided in new patches.
> +# Folks usually mean EOPNOTSUPP (also called ENOTSUP), when they type ENOTSUPP.
> +# Similarly to ENOSYS warning a small number of false positives is expected.
> +		if (~$file && $line =~ /\bENOTSUPP\b/) {

It's probably my typo or my brain thinking "not" and hitting
the tilde and not the bang, but this should be

		if (!$file & ...)

Otherwise:

Acked-by: Joe Perches <joe@...ches.com>

> +			if (WARN("ENOTSUPP",
> +				 "ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP\n" . $herecurr) &&
> +			    $fix) {
> +				$fixed[$fixlinenr] =~ s/\bENOTSUPP\b/EOPNOTSUPP/;
> +			}
> +		}
> +
>  # function brace can't be on same line, except for #defines of do while,
>  # or if closed on same line
>  		if ($perl_version_ok &&

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ