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: <YlK4SYXV6zbDa1Lq@zn.tnic>
Date:   Sun, 10 Apr 2022 12:58:17 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:     tglx@...utronix.de, mingo@...hat.com, dave.hansen@...el.com,
        luto@...nel.org, peterz@...radead.org,
        sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
        ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
        hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
        joro@...tes.org, jpoimboe@...hat.com, knsathya@...nel.org,
        pbonzini@...hat.com, sdeep@...are.com, seanjc@...gle.com,
        tony.luck@...el.com, vkuznets@...hat.com, wanpengli@...cent.com,
        thomas.lendacky@....com, brijesh.singh@....com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCHv8 14/30] x86: Consolidate port I/O helpers

On Wed, Apr 06, 2022 at 02:29:23AM +0300, Kirill A. Shutemov wrote:
> There are two implementations of port I/O helpers: one in the kernel and
> one in the boot stub.
> 
> Move the helpers required for both to <asm/shared/io.h> and use the one
> implementation everywhere.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  arch/x86/boot/boot.h             | 35 +-------------------------------
>  arch/x86/boot/compressed/misc.h  |  2 +-
>  arch/x86/include/asm/io.h        | 22 ++------------------
>  arch/x86/include/asm/shared/io.h | 34 +++++++++++++++++++++++++++++++
>  4 files changed, 38 insertions(+), 55 deletions(-)
>  create mode 100644 arch/x86/include/asm/shared/io.h

This complains with clang-13 here, config attached.

And yap, this is the damn include hell I keep talking about. That
lib/kalsr.c thing includes the kernel proper io.h header ...

fs/reiserfs/ibalance.o: warning: objtool: balance_internal()+0x11d5: stack state mismatch: cfa1=4+264 cfa2=4+288
In file included from arch/x86/boot/compressed/kaslr.c:72:
In file included from arch/x86/boot/compressed/../../lib/kaslr.c:14:
./arch/x86/include/asm/io.h:308:1: warning: implicit declaration of function 'inw' is invalid in C99 [-Wimplicit-function-declaration]
BUILDIO(w, w, u16)
^
./arch/x86/include/asm/io.h:270:15: note: expanded from macro 'BUILDIO'
        type value = in##bwl(port);                                     \
                     ^
<scratch space>:262:1: note: expanded from here
inw
^
In file included from arch/x86/boot/compressed/kaslr.c:72:
In file included from arch/x86/boot/compressed/../../lib/kaslr.c:14:
./arch/x86/include/asm/io.h:308:1: warning: implicit declaration of function 'inw' is invalid in C99 [-Wimplicit-function-declaration]
./arch/x86/include/asm/io.h:296:13: note: expanded from macro 'BUILDIO'
                        *value = in##bwl(port);                         \
                                 ^
<scratch space>:266:1: note: expanded from here
inw
^
In file included from arch/x86/boot/compressed/kaslr.c:72:
In file included from arch/x86/boot/compressed/../../lib/kaslr.c:14:
./arch/x86/include/asm/io.h:309:1: warning: implicit declaration of function 'outl' is invalid in C99 [-Wimplicit-function-declaration]
BUILDIO(l,  , u32)
^
./arch/x86/include/asm/io.h:264:2: note: expanded from macro 'BUILDIO'
        out##bwl(value, port);                                          \
        ^
<scratch space>:271:1: note: expanded from here
outl
^
In file included from arch/x86/boot/compressed/kaslr.c:72:
In file included from arch/x86/boot/compressed/../../lib/kaslr.c:14:
./arch/x86/include/asm/io.h:309:1: warning: implicit declaration of function 'inl' is invalid in C99 [-Wimplicit-function-declaration]
./arch/x86/include/asm/io.h:270:15: note: expanded from macro 'BUILDIO'
        type value = in##bwl(port);                                     \
                     ^
<scratch space>:2:1: note: expanded from here
inl
^
In file included from arch/x86/boot/compressed/kaslr.c:72:
In file included from arch/x86/boot/compressed/../../lib/kaslr.c:14:
./arch/x86/include/asm/io.h:309:1: warning: implicit declaration of function 'outl' is invalid in C99 [-Wimplicit-function-declaration]
./arch/x86/include/asm/io.h:280:4: note: expanded from macro 'BUILDIO'
                        out##bwl(*value, port);                         \
                        ^
<scratch space>:4:1: note: expanded from here
outl
^
In file included from arch/x86/boot/compressed/kaslr.c:72:
In file included from arch/x86/boot/compressed/../../lib/kaslr.c:14:
./arch/x86/include/asm/io.h:309:1: warning: implicit declaration of function 'inl' is invalid in C99 [-Wimplicit-function-declaration]
./arch/x86/include/asm/io.h:296:13: note: expanded from macro 'BUILDIO'
                        *value = in##bwl(port);                         \
                                 ^
<scratch space>:6:1: note: expanded from here
inl
^
6 warnings generated.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

View attachment ".config" of type "text/plain" (157371 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ