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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gH6XF1tD7=8O1Qb8OA2U-8MOS7EiLUUN-TBOo69+qQhg@mail.gmail.com>
Date:   Thu, 21 Sep 2023 20:52:37 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Su Hui <suhui@...china.com>
Cc:     rafael@...nel.org, lenb@...nel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] ACPI: OSL: add __printf format attribute to acpi_os_vprintf

On Thu, Aug 31, 2023 at 9:35 AM Su Hui <suhui@...china.com> wrote:
>
> With gcc and W=1 option to compile kernel, warning happends:
>
> drivers/acpi/osl.c:156:2: error:
> function ‘acpi_os_vprintf’ might be a candidate for ‘gnu_printf’
> format attribute [-Werror=suggest-attribute=format].
>
> Allow the compiler to recognize and check format strings is safer.
>
> Signed-off-by: Su Hui <suhui@...china.com>
> ---
>  drivers/acpi/osl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index f725813d0cce..357f1325485d 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -149,7 +149,7 @@ void acpi_os_printf(const char *fmt, ...)
>  }
>  EXPORT_SYMBOL(acpi_os_printf);
>
> -void acpi_os_vprintf(const char *fmt, va_list args)
> +void __printf(1, 0) acpi_os_vprintf(const char *fmt, va_list args)
>  {
>         static char buffer[512];
>
> --

Applied (with some subject and changelog edits) as 6.7 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ