linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Mathias Krause <minipli@googlemail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	minipli@googlemail.com, suresh.b.siddha@intel.com,
	tglx@linutronix.de
Subject: [tip:x86/debug] x86/fpu/xsave: Keep __user annotation in casts
Date: Wed, 5 Sep 2012 03:58:13 -0700	[thread overview]
Message-ID: <tip-5c7d03e99cb1ed449328ed9fba0c632944d39e7e@git.kernel.org> (raw)
In-Reply-To: <1346621506-30857-6-git-send-email-minipli@googlemail.com>

Commit-ID:  5c7d03e99cb1ed449328ed9fba0c632944d39e7e
Gitweb:     http://git.kernel.org/tip/5c7d03e99cb1ed449328ed9fba0c632944d39e7e
Author:     Mathias Krause <minipli@googlemail.com>
AuthorDate: Sun, 2 Sep 2012 23:31:44 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 5 Sep 2012 10:52:25 +0200

x86/fpu/xsave: Keep __user annotation in casts

Don't remove the __user annotation of the fpstate pointer, but
drop the superfluous void * cast instead.

This fixes the following sparse warnings:

  xsave.c:135:15: warning: cast removes address space of expression
  xsave.c:135:15: warning: incorrect type in argument 1 (different address spaces)
  xsave.c:135:15:    expected void const volatile [noderef] <asn:1>*<noident>
  [...]

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1346621506-30857-6-git-send-email-minipli@googlemail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/xsave.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 3d3e207..9e1a8a7 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -132,9 +132,9 @@ int check_for_xstate(struct i387_fxsave_struct __user *buf,
 	    fx_sw_user->xstate_size > fx_sw_user->extended_size)
 		return -EINVAL;
 
-	err = __get_user(magic2, (__u32 *) (((void *)fpstate) +
-					    fx_sw_user->extended_size -
-					    FP_XSTATE_MAGIC2_SIZE));
+	err = __get_user(magic2, (__u32 __user *) (fpstate +
+						   fx_sw_user->extended_size -
+						   FP_XSTATE_MAGIC2_SIZE));
 	if (err)
 		return err;
 	/*

  reply	other threads:[~2012-09-05 10:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02 21:31 [PATCH 0/7] x86: fix sparse warnings Mathias Krause
2012-09-02 21:31 ` [PATCH 1/7] x86: fix __user annotations in asm/sys_ia32.h Mathias Krause
2012-09-05 10:54   ` [tip:x86/debug] x86: Fix " tip-bot for Mathias Krause
2012-09-02 21:31 ` [PATCH 2/7] x86, vdso: add __user annotation to VDSO32_SYMBOL Mathias Krause
2012-09-05 10:55   ` [tip:x86/debug] x86/vdso: Add " tip-bot for Mathias Krause
2012-09-02 21:31 ` [PATCH 3/7] x86: ia32_signal.c: add __user casts to fix sparse warnings Mathias Krause
2012-09-05 10:56   ` [tip:x86/debug] x86/signals: " tip-bot for Mathias Krause
2012-09-02 21:31 ` [PATCH 4/7] x86, probe_roms: add missing __iomem annotation to pci_map_biosrom() Mathias Krause
2012-09-05 10:57   ` [tip:x86/debug] x86/pci/probe_roms: Add " tip-bot for Mathias Krause
2012-09-02 21:31 ` [PATCH 5/7] x86, xsave: keep __user annotation in casts Mathias Krause
2012-09-05 10:58   ` tip-bot for Mathias Krause [this message]
2012-09-02 21:31 ` [PATCH 6/7] x86, iommu: drop duplicate const in __IOMMU_INIT Mathias Krause
2012-09-05 10:59   ` [tip:x86/debug] x86/iommu: Drop " tip-bot for Mathias Krause
2012-09-02 21:31 ` [PATCH 7/7] x86, iommu: use NULL instead of plain 0 for __IOMMU_INIT Mathias Krause
2012-09-05 11:00   ` [tip:x86/debug] x86/iommu: Use " tip-bot for Mathias Krause

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=tip-5c7d03e99cb1ed449328ed9fba0c632944d39e7e@git.kernel.org \
    --to=minipli@googlemail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).