Skip to contentSkip to conversation

Patch "x86/prctl/uapi: Remove #ifdef for CHECKPOINT_RESTORE" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 9, 2017

Subsystems (2)
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/prctl/uapi: Remove #ifdef for CHECKPOINT_RESTORE

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-prctl-uapi-remove-ifdef-for-checkpoint_restore.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 a01aa6c9f40fe03c82032e7f8b3bcf1e6c93ac0e Mon Sep 17 00:00:00 2001

From: Dmitry Safonov <[email protected]>
Date: Thu, 27 Oct 2016 17:15:15 +0300
Subject: x86/prctl/uapi: Remove #ifdef for CHECKPOINT_RESTORE

From: Dmitry Safonov <[email protected]>

commit a01aa6c9f40fe03c82032e7f8b3bcf1e6c93ac0e upstream.

As userspace knows nothing about kernel config, thus #ifdefs around ABI prctl constants makes them invisible to userspace.

Let it be clean'n'simple: remove #ifdefs.

If kernel has CONFIG_CHECKPOINT_RESTORE disabled, sys_prctl() will return -EINVAL for those prctls.

Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Cyrill Gorcunov <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes 2eefd8789698 ("x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*")
---
 arch/x86/include/uapi/asm/prctl.h |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
arch/x86/include/uapi/asm/prctl.h +3 -5
@@ -6,10 +6,8 @@
 #define ARCH_GET_FS 0x1003
 #define ARCH_GET_GS 0x1004
 
-#ifdef CONFIG_CHECKPOINT_RESTORE
-# define ARCH_MAP_VDSO_X32	0x2001
-# define ARCH_MAP_VDSO_32	0x2002
-# define ARCH_MAP_VDSO_64	0x2003
-#endif
+#define ARCH_MAP_VDSO_X32	0x2001
+#define ARCH_MAP_VDSO_32	0x2002
+#define ARCH_MAP_VDSO_64	0x2003
 
 #endif /* _ASM_X86_PRCTL_H */

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

queue-4.9/x86-prctl-uapi-remove-ifdef-for-checkpoint_restore.patch