From: Andy Lutomirski <luto@amacapital.net>
To: Richard Larocque <rlarocque@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
filbranden@google.com, md@google.com, gthelen@google.com,
X86 ML <x86@kernel.org>, Linux API <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load
Date: Tue, 16 Sep 2014 17:27:42 -0700 [thread overview]
Message-ID: <CALCETrXtYV5xKkTxothuqNb7ra80Be7ZXJ-hDnC6p-bfEPZ=Lw@mail.gmail.com> (raw)
In-Reply-To: <1410912351-31273-1-git-send-email-rlarocque@google.com>
On Tue, Sep 16, 2014 at 5:05 PM, Richard Larocque <rlarocque@google.com> wrote:
> Adds new prctl calls to enable or disable VDSO loading for a process
> and its children.
>
> The PR_SET_DISABLE_VDSO call takes one argument, which is interpreted as
> a boolean value. If true, it disables the loading of the VDSO on exec()
> for this process and any children created after this call. A false
> value unsets the flag.
>
> The PR_GET_DISABLE_VDSO option returns a non-negative true value if VDSO
> loading has been disabled for this process, zero if it has not been
> disabled, and a negative value in case of error.
>
> These prctl calls are hidden behind a new Kconfig,
> CONFIG_VDSO_DISABLE_PRCTL. This feature is available only on x86.
>
> The command line option vdso=0 overrides the behavior of
> PR_SET_DISABLE_VDSO, however, PR_GET_DISABLE_VDSO will coninue to return
> whetever setting was last set with PR_SET_DISABLE_VDSO.
>
> Signed-off-by: Richard Larocque <rlarocque@google.com>
> ---
> This patch is part of some work to better handle times and CRIU migration.
> I suspect that there are other use cases out there, so I'm offering this
> patch separately.
>
> When considering CRIU migration and times, we put some thought into how
> to handle the rdtsc instruction. If we migrate between machines or across
> reboots, the migrated process will see values that could break its assumptions
> about how rdtsc is supposed to work.
I don't get it.
If __vdso_clock_gettime returns the wrong value in any scenario, we
should fix that. Simiarly, CRIU *already works*, unless there's
something I don't know of.
That being said, I would like an option to gate off RDTSC for a
process and its children in order to make PR_TSC_SIGSEGV more useful.
All the prerequisites are there now.
What problem are you trying to solve exactly?
--Andy
next prev parent reply other threads:[~2014-09-17 0:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 0:05 [PATCH] x86/vdso: Add prctl to set per-process VDSO load Richard Larocque
2014-09-17 0:13 ` Andi Kleen
2014-09-17 0:21 ` Richard Larocque
2014-09-17 0:27 ` Andy Lutomirski [this message]
2014-09-17 1:18 ` Richard Larocque
2014-09-17 5:00 ` Andy Lutomirski
2014-09-17 5:34 ` Andy Lutomirski
2014-09-17 6:21 ` Filipe Brandenburger
2014-09-17 8:46 ` H. Peter Anvin
2014-09-17 13:48 ` Filipe Brandenburger
2014-09-17 14:28 ` Andy Lutomirski
2014-09-19 19:27 ` Andy Lutomirski
2014-09-19 21:26 ` Richard Larocque
2014-09-19 22:02 ` Filipe Brandenburger
2014-09-19 22:09 ` Andy Lutomirski
2014-09-19 22:19 ` Filipe Brandenburger
2014-09-19 22:31 ` Andy Lutomirski
2014-09-20 3:10 ` Filipe Brandenburger
2014-09-20 3:27 ` Andy Lutomirski
2014-09-20 3:46 ` Filipe Brandenburger
2014-09-20 5:30 ` Andy Lutomirski
2014-09-17 11:36 ` Kevin Easton
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='CALCETrXtYV5xKkTxothuqNb7ra80Be7ZXJ-hDnC6p-bfEPZ=Lw@mail.gmail.com' \
--to=luto@amacapital.net \
--cc=filbranden@google.com \
--cc=gthelen@google.com \
--cc=hpa@zytor.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=md@google.com \
--cc=mingo@redhat.com \
--cc=rlarocque@google.com \
--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).