Skip to contentSkip to conversation

Patch "x86/mpx: Use compatible types in comparison to fix sparse error" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

x86/mpx: Use compatible types in comparison to fix sparse error

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
x86-mpx-use-compatible-types-in-comparison-to-fix-sparse-error.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Jul 3 13:33:55 CEST 2017

From: Tobias Klauser <[email protected]>
Date: Thu, 12 Jan 2017 16:53:11 +0100
Subject: x86/mpx: Use compatible types in comparison to fix sparse error

From: Tobias Klauser <[email protected]>

[ Upstream commit 453828625731d0ba7218242ef6ec88f59408f368 ]

info->si_addr is of type void __user *, so it should be compared against something from the same address space.

This fixes the following sparse error:

arch/x86/mm/mpx.c:296:27: error: incompatible types in comparison expression (different address spaces)

---
 arch/x86/mm/mpx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/mpx.c +1 -1
@@ -293,7 +293,7 @@ siginfo_t *mpx_generate_siginfo(struct p
 	 * We were not able to extract an address from the instruction,
 	 * probably because there was something invalid in it.
 	 */
-	if (info->si_addr == (void *)-1) {
+	if (info->si_addr == (void __user *)-1) {
 		err = -EINVAL;
 		goto err_out;
 	}

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/x86-mpx-use-compatible-types-in-comparison-to-fix-sparse-error.patch