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: <fff520e9-4bbc-9a48-f3a7-fb76c443d7b9@codeaurora.org>
Date:   Fri, 29 Mar 2019 13:02:44 +0530
From:   Mukesh Ojha <mojha@...eaurora.org>
To:     Jann Horn <jannh@...gle.com>, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH] x86: define LOADED_MM_SWITCHING with pointer-sized number


On 3/29/2019 4:39 AM, Jann Horn wrote:
> sparse complains that LOADED_MM_SWITCHING's definition casts an int to a
> pointer:
>
> arch/x86/mm/tlb.c:409:17: warning: non size-preserving integer to pointer
> cast
>
> Use a pointer-sized integer constant instead.
>
> Signed-off-by: Jann Horn <jannh@...gle.com>


Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>

-Mukesh

> ---
>   arch/x86/include/asm/tlbflush.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
> index f4204bf377fc..90926e8dd1f8 100644
> --- a/arch/x86/include/asm/tlbflush.h
> +++ b/arch/x86/include/asm/tlbflush.h
> @@ -167,7 +167,7 @@ struct tlb_state {
>   	 */
>   	struct mm_struct *loaded_mm;
>   
> -#define LOADED_MM_SWITCHING ((struct mm_struct *)1)
> +#define LOADED_MM_SWITCHING ((struct mm_struct *)1UL)
>   
>   	/* Last user mm for optimizing IBPB */
>   	union {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ