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: <tip-a72a19327b92e09dab0eb9fd2bc83466465cbffb@git.kernel.org>
Date:   Fri, 29 Mar 2019 07:04:13 -0700
From:   tip-bot for Jann Horn <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org, mingo@...hat.com,
        luto@...nel.org, sai.praneeth.prakhya@...el.com,
        peterz@...radead.org, bigeasy@...utronix.de, x86@...nel.org,
        hpa@...or.com, mojha@...eaurora.org, dave.hansen@...el.com,
        jannh@...gle.com, tglx@...utronix.de, bp@...e.de, riel@...riel.com
Subject: [tip:x86/cleanups] x86/mm/tlb: Define LOADED_MM_SWITCHING with
 pointer-sized number

Commit-ID:  a72a19327b92e09dab0eb9fd2bc83466465cbffb
Gitweb:     https://git.kernel.org/tip/a72a19327b92e09dab0eb9fd2bc83466465cbffb
Author:     Jann Horn <jannh@...gle.com>
AuthorDate: Fri, 29 Mar 2019 00:09:39 +0100
Committer:  Borislav Petkov <bp@...e.de>
CommitDate: Fri, 29 Mar 2019 14:55:31 +0100

x86/mm/tlb: Define LOADED_MM_SWITCHING with pointer-sized number

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>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...riel.com>
Cc: Sai Praneeth <sai.praneeth.prakhya@...el.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20190328230939.15711-1-jannh@google.com
---
 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