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: <CANiq72kEdD3hoHaxukkdzEJt+e_nptyO1GdgfUqWnSAog3k=JQ@mail.gmail.com>
Date:   Sat, 27 Oct 2018 14:06:09 +0200
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>
Cc:     Kees Cook <keescook@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 1/7] compiler_attributes.h: add __attribute__((format_arg))
 shorthand

Hi Rasmus,

On Sat, Oct 27, 2018 at 1:24 AM Rasmus Villemoes
<linux@...musvillemoes.dk> wrote:
>
> diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
> index 6b28c1b7310c..08264df52322 100644
> --- a/include/linux/compiler_attributes.h
> +++ b/include/linux/compiler_attributes.h
> @@ -32,6 +32,7 @@
>  # define __GCC4_has_attribute___assume_aligned__      (__GNUC_MINOR__ >= 9)
>  # define __GCC4_has_attribute___designated_init__     0
>  # define __GCC4_has_attribute___externally_visible__  1
> +# define __GCC4_has_attribute___format_arg__          1

Thank you Rasmus for doing this already on top of this tree!

>  # define __GCC4_has_attribute___noclone__             1
>  # define __GCC4_has_attribute___optimize__            1
>  # define __GCC4_has_attribute___nonstring__           0
> @@ -140,6 +141,18 @@
>  #define __printf(a, b)                  __attribute__((__format__(printf, a, b)))
>  #define __scanf(a, b)                   __attribute__((__format__(scanf, a, b)))
>
> +/*
> + * Optional

I did quick check and gcc >= 4.1, clang >= 3.0, icc >= 13 compilers
seem to support it (or at least recognize it, even if they just ignore
it), so we do not need to make it optional, no? Did I miss some case?

Thanks!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ