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]
Message-ID: <CAJZ5v0jiDR+54S8tuWf1E8Fxaw+JNmK6ERbW5wh9DNV7SbhRJQ@mail.gmail.com>
Date:   Fri, 29 Oct 2021 19:51:38 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] ACPI fixes for v5.15-rc7

On Fri, Oct 22, 2021 at 9:13 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Fri, Oct 22, 2021 at 9:01 AM Rafael J. Wysocki <rafael@...nel.org> wrote:
> >
> >  - Fix an ACPI tools build issue introduced recently when the minimal
> >    stdarg.h was added (Miguel Bernal Marin).
>
> Hmm. ACPI already has that odd ACPI_USE_BUILTIN_STDARG case in
> acgcc.h, which ends up using _exactly_ the same macros as the
> <linux/stdarg.h> implementation does, and is basically exactly the
> same "minimal stdarg".
>
> Ok, so the macro argument names are different, and there are
> whitespace differences, but semantically identical.
>
> So maybe the ACPI code could drop one or the other in favor of the
> identical macros?

The ACPI_USE_BUILTIN_STDARG check comes from the upstream code
assuming that whoever doesn't use the "common" stdarg.h will set
ACPI_USE_BUILTIN_STDARG, but we don't set it and we provide our own
stdarg.h, so we can make the following change (on top of the -rc7):

---
 include/acpi/platform/acgcc.h |   13 -------------
 1 file changed, 13 deletions(-)

Index: linux-pm/include/acpi/platform/acgcc.h
===================================================================
--- linux-pm.orig/include/acpi/platform/acgcc.h
+++ linux-pm/include/acpi/platform/acgcc.h
@@ -10,25 +10,12 @@
 #ifndef __ACGCC_H__
 #define __ACGCC_H__

-/*
- * Use compiler specific <stdarg.h> is a good practice for even when
- * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
- */
 #ifndef va_arg
-#ifdef ACPI_USE_BUILTIN_STDARG
-typedef __builtin_va_list va_list;
-#define va_start(v, l)          __builtin_va_start(v, l)
-#define va_end(v)               __builtin_va_end(v)
-#define va_arg(v, l)            __builtin_va_arg(v, l)
-#define va_copy(d, s)           __builtin_va_copy(d, s)
-#else
 #ifdef __KERNEL__
 #include <linux/stdarg.h>
 #else
-/* Used to build acpi tools */
 #include <stdarg.h>
 #endif /* __KERNEL__ */
-#endif /* ACPI_USE_BUILTIN_STDARG */
 #endif /* ! va_arg */

 #define ACPI_INLINE             __inline__

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ