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: <87zge0rvki.fsf@intel.com>
Date:   Thu, 13 Oct 2022 11:12:29 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>, keescook@...omium.org
Cc:     luc.vanoostenryck@...il.com, nathan@...nel.org,
        ndesaulniers@...gle.com, trix@...hat.com, dlatypov@...gle.com,
        vitor@...saru.org, gustavoars@...nel.org,
        linux-hardening@...r.kernel.org, llvm@...ts.linux.dev,
        joonas.lahtinen@...ux.intel.com, rodrigo.vivi@...el.com,
        tvrtko.ursulin@...ux.intel.com, airlied@...ux.ie, daniel@...ll.ch,
        linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, linux-sparse@...r.kernel.org,
        arnd@...nel.org
Subject: Re: [PATCH v3] overflow: Introduce overflows_type() and
 castable_to_type()

On Thu, 13 Oct 2022, Gwan-gyeong Mun <gwan-gyeong.mun@...el.com> wrote:
> diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.c
> index 0d98c9bc75da..44da9d190057 100644
> --- a/lib/overflow_kunit.c
> +++ b/lib/overflow_kunit.c
> @@ -16,6 +16,11 @@
>  #include <linux/types.h>
>  #include <linux/vmalloc.h>
>  
> +/* We're expecting to do a lot of "always true" or "always false" tests. */
> +#ifdef CONFIG_CC_IS_CLANG
> +#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
> +#endif

I thought #pragma was discouraged. I didn't try this, but would
something like this work in the Makefile instead:

CFLAGS_overflow_kunit.o = $(call cc-disable-warning, tautological-constant-out-of-range-compare)

Sorry for not noticing before. If you all think pragma is fine, sorry
for the noise.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ