From: Dmitry Safonov <dsafonov@virtuozzo.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: <luto@kernel.org>, <tglx@linutronix.de>, <mingo@kernel.org>,
<hpa@zytor.com>, <linux-kernel@vger.kernel.org>,
<linux-tip-commits@vger.kernel.org>
Subject: Re: [tip:x86/vdso] x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*
Date: Wed, 26 Oct 2016 15:49:38 +0300 [thread overview]
Message-ID: <eb8256dc-a1f1-4ba6-d57d-0db94cbbba1b@virtuozzo.com> (raw)
In-Reply-To: <1477485030.1951.13.camel@tiscali.nl>
On 10/26/2016 03:30 PM, Paul Bolle wrote:
> This is bit late, but we're still on v4.9-rc2, so anyhow.
>
> On Wed, 2016-09-14 at 12:34 -0700, tip-bot for Dmitry Safonov wrote:
>> Commit-ID: 2eefd8789698e89c4a5d610921dc3c1b66e3bd0d
>> Gitweb: http://git.kernel.org/tip/2eefd8789698e89c4a5d610921dc3c1b66e3bd0d
>> Author: Dmitry Safonov <dsafonov@virtuozzo.com>
>> AuthorDate: Mon, 5 Sep 2016 16:33:05 +0300
>> Committer: Thomas Gleixner <tglx@linutronix.de>
>> CommitDate: Wed, 14 Sep 2016 21:28:09 +0200
>>
>> x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*
>>
>> Add API to change vdso blob type with arch_prctl.
>> As this is usefull only by needs of CRIU, expose
>> this interface under CONFIG_CHECKPOINT_RESTORE.
>>
>> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
>> Acked-by: Andy Lutomirski <luto@kernel.org>
>> Cc: 0x7f454c46@gmail.com
>> Cc: oleg@redhat.com
>> Cc: linux-mm@kvack.org
>> Cc: gorcunov@openvz.org
>> Cc: xemul@virtuozzo.com
>> Link: http://lkml.kernel.org/r/20160905133308.28234-4-dsafonov@virtuozzo.com
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
>> --- a/arch/x86/include/uapi/asm/prctl.h
>> +++ b/arch/x86/include/uapi/asm/prctl.h
>
>> #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
>> +
>> #endif /* _ASM_X86_PRCTL_H */
>
> On my machine this header ends up in /usr/include/asm/prctl.h. But in
> userspace CONFIG_CHECKPOINT_RESTORE is meaningless. I think if you
> actually want to export these three macros to userspace the guard
> should read:
> #if defined(CONFIG_CHECKPOINT_RESTORE) || !defined(__KERNEL__)
>
> And if you don't want to export these macros the guard should read:
> #if defined(CONFIG_CHECKPOINT_RESTORE) && defined(__KERNEL__)
>
> (In that case you're probably better of defining these macros outside
> of uapi.)
>
> I've only lightly tested those two alternatives, so please double
> check.
>
Hi Paul,
thanks for noting that!
Well, I think, I'll remove ifdeffery around those constants.
Let them be always defined, that would be the simplest solution.
Somehow I managed to forget that userspace knows nothing about enabled
kernel options.
Thanks again,
Dmitry
>
> Paul Bolle
>
next prev parent reply other threads:[~2016-10-26 12:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 13:33 [PATCHv5 0/6] x86: 32-bit compatible C/R on x86_64 Dmitry Safonov
2016-09-05 13:33 ` [PATCHv5 1/6] x86/vdso: unmap vdso blob on vvar mapping failure Dmitry Safonov
2016-09-14 19:33 ` [tip:x86/vdso] x86/vdso: Unmap " tip-bot for Dmitry Safonov
2016-09-05 13:33 ` [PATCHv5 2/6] x86/vdso: replace calculate_addr in map_vdso() with addr Dmitry Safonov
2016-09-14 19:34 ` [tip:x86/vdso] x86/vdso: Replace " tip-bot for Dmitry Safonov
2016-09-05 13:33 ` [PATCHv5 3/6] x86/arch_prctl/vdso: add ARCH_MAP_VDSO_* Dmitry Safonov
2016-09-05 17:01 ` Andy Lutomirski
2016-09-14 19:34 ` [tip:x86/vdso] x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_* tip-bot for Dmitry Safonov
2016-10-26 12:30 ` Paul Bolle
2016-10-26 12:49 ` Dmitry Safonov [this message]
2016-09-05 13:33 ` [PATCHv5 4/6] x86/coredump: use pr_reg size, rather that TIF_IA32 flag Dmitry Safonov
2016-09-14 19:35 ` [tip:x86/vdso] x86/coredump: Use " tip-bot for Dmitry Safonov
2016-09-05 13:33 ` [PATCHv5 5/6] x86/ptrace: down with test_thread_flag(TIF_IA32) Dmitry Safonov
2016-09-14 19:35 ` [tip:x86/vdso] x86/ptrace: Down " tip-bot for Dmitry Safonov
2016-09-05 13:33 ` [PATCHv5 6/6] x86/signal: add SA_{X32,IA32}_ABI sa_flags Dmitry Safonov
2016-09-14 19:36 ` [tip:x86/vdso] x86/signal: Add " tip-bot for Dmitry Safonov
2016-09-14 15:56 ` [PATCHv5 0/6] x86: 32-bit compatible C/R on x86_64 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=eb8256dc-a1f1-4ba6-d57d-0db94cbbba1b@virtuozzo.com \
--to=dsafonov@virtuozzo.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=pebolle@tiscali.nl \
--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
all inboxes | Powered by JetHome®