mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Jann Horn <jannh@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH] x86: define LOADED_MM_SWITCHING with pointer-sized number
Date: Fri, 29 Mar 2019 13:02:44 +0530	[thread overview]
Message-ID: <fff520e9-4bbc-9a48-f3a7-fb76c443d7b9@codeaurora.org> (raw)
In-Reply-To: <20190328230939.15711-1-jannh@google.com>


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@google.com>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.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 {

  reply	other threads:[~2019-03-29  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 23:09 Jann Horn
2019-03-29  7:32 ` Mukesh Ojha [this message]
2019-03-29 13:57 ` Borislav Petkov
2019-03-29 14:47   ` Jann Horn
2019-03-29 14:04 ` [tip:x86/cleanups] x86/mm/tlb: Define " tip-bot for Jann Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fff520e9-4bbc-9a48-f3a7-fb76c443d7b9@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®