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] [day] [month] [year] [list]
Date:	Mon, 15 Jun 2015 16:06:33 -0700
From:	Greg KH <greg@...ah.com>
To:	Bilel DRIRA <bilel.dr@...il.com>
Cc:	linux-api@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] include/uapi/linux/swab.h: define a silent macro to
 avoid sparse error

On Sun, Jun 14, 2015 at 11:23:32PM +0100, Bilel DRIRA wrote:
> define a silent macro when _CHECKER_ is defined.
> This change fixes the following sparse errors:
> 
> include/uapi/linux/swab.h:60:16: error: undefined identifier '__builtin_bswap32'
> include/uapi/linux/swab.h:60:33: error: not a function <noident>
> include/uapi/linux/swab.h:71:16: error: undefined identifier '__builtin_bswap64'
> include/uapi/linux/swab.h:71:33: error: not a function <noident>
> include/uapi/linux/swab.h:60:33: error: not a function <noident>
> 
> Signed-off-by: Bilel DRIRA <bilel.dr@...il.com>
> ---
>  include/uapi/linux/swab.h |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
> index 0e011eb..c04de49 100644
> --- a/include/uapi/linux/swab.h
> +++ b/include/uapi/linux/swab.h
> @@ -5,6 +5,18 @@
>  #include <linux/compiler.h>
>  #include <asm/swab.h>
>  
> +#ifdef __CHECKER__
> +
> +#ifdef __HAVE_BUILTIN_BSWAP64__
> +#define __builtin_bswap64(val) (0)
> +#endif
> +
> +#ifdef __HAVE_BUILTIN_BSWAP32__
> +#define __builtin_bswap32(val) (0)
> +#endif
> +
> +#endif	/* __CHECKER__ */

Shouldn't the tool be fixed instead of papering over the issue with
random defines like this?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ