From: Dmitry Safonov <dsafonov@virtuozzo.com>
To: <linux-kernel@vger.kernel.org>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>, <0x7f454c46@gmail.com>,
"Cyrill Gorcunov" <gorcunov@openvz.org>,
Paul Bolle <pebolle@tiscali.nl>,
"Andy Lutomirski" <luto@kernel.org>, <oleg@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
<linux-mm@kvack.org>, <x86@kernel.org>
Subject: [PATCH 1/2] x86/prctl/uapi: remove ifdef for CHECKPOINT_RESTORE
Date: Thu, 27 Oct 2016 17:15:15 +0300 [thread overview]
Message-ID: <20161027141516.28447-2-dsafonov@virtuozzo.com> (raw)
In-Reply-To: <20161027141516.28447-1-dsafonov@virtuozzo.com>
As userspace knows nothing about kernel config, this ifdefs
will make prctl constants 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.
Fixes: 2eefd8789698 ("x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*")
Cc: 0x7f454c46@gmail.com
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: oleg@redhat.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-mm@kvack.org
Cc: x86@kernel.org
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
---
arch/x86/include/uapi/asm/prctl.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/uapi/asm/prctl.h b/arch/x86/include/uapi/asm/prctl.h
index ae135de547f5..835aa51c7f6e 100644
--- a/arch/x86/include/uapi/asm/prctl.h
+++ b/arch/x86/include/uapi/asm/prctl.h
@@ -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 */
--
2.10.1
next prev parent reply other threads:[~2016-10-27 17:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 14:15 [PATCH 0/2] x86/vdso: small fixups for map_vdso Dmitry Safonov
2016-10-27 14:15 ` Dmitry Safonov [this message]
2016-10-28 6:48 ` [tip:x86/asm] x86/prctl/uapi: Remove #ifdef for CHECKPOINT_RESTORE tip-bot for Dmitry Safonov
2016-10-27 14:15 ` [PATCH 2/2] x86/vdso: set vdso pointer only after success Dmitry Safonov
2016-10-27 22:25 ` Andy Lutomirski
2016-10-28 6:49 ` [tip:x86/asm] x86/vdso: Set vDSO " tip-bot for Dmitry Safonov
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=20161027141516.28447-2-dsafonov@virtuozzo.com \
--to=dsafonov@virtuozzo.com \
--cc=0x7f454c46@gmail.com \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=pebolle@tiscali.nl \
--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;
as well as URLs for NNTP newsgroup(s).