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: <YlNAGcXS1fmTu/WS@zn.tnic>
Date:   Sun, 10 Apr 2022 22:37:45 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        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 Sun, Apr 10, 2022 at 11:00:25PM +0300, Kirill A. Shutemov wrote:
> Right. <asm/shared/io.h> is enough for lib/kaslr.c.
> 
> What about this:
> 
> From 164de295599f8befa2ee1ff05dc03542c02b0800 Mon Sep 17 00:00:00 2001
> From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> Date: Sun, 10 Apr 2022 22:49:28 +0300
> Subject: [PATCH] x86/kaslr: Fix build warning in KASLR code in boot stub
> 
> lib/kaslr.c used by both the main kernel and the boot stub. It includes
> <asm/io.h> that intended to be used in the main kernel. It leads to
> build warnings like this:
> 
> 	warning: implicit declaration of function 'outl' is invalid in
> 	C99 [-Wimplicit-function-declaration]
> 
> Replace <asm/io.h> with <asm/shared/io.h> which is suitable for both
> cases.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Fixes: 1e8f93e18379 ("x86: Consolidate port I/O helpers")

Reported-by: me

> ---
>  arch/x86/lib/kaslr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
> index 2b3eb8c948a3..a58f451a7dd3 100644
> --- a/arch/x86/lib/kaslr.c
> +++ b/arch/x86/lib/kaslr.c
> @@ -11,7 +11,7 @@
>  #include <asm/msr.h>
>  #include <asm/archrandom.h>
>  #include <asm/e820/api.h>
> -#include <asm/io.h>
> +#include <asm/shared/io.h>
>  
>  /*
>   * When built for the regular kernel, several functions need to be stubbed out
> -- 

Thanks, that works and looks nice too.

I'll queue it tomorrow.

-- 
Regards/Gruss,
    Boris.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ