From: akpm@linux-foundation.org
To: adobriyan@gmail.com, avagin@gmail.com, bernd.edlinger@hotmail.de,
christian.brauner@ubuntu.com, ckennelly@google.com,
ebiederm@xmission.com, figiel@google.com,
gladkov.alexey@gmail.com, keescook@chromium.org,
mathieu.desnoyers@efficios.com, mm-commits@vger.kernel.org,
pjt@google.com, posk@google.com, walken@google.com
Subject: [to-be-updated] fs-proc-expose-rseq-configuration.patch removed from -mm tree
Date: Sun, 17 Jan 2021 13:42:47 -0800 [thread overview]
Message-ID: <20210117214247.qmdxVsqY-%akpm@linux-foundation.org> (raw)
The patch titled
Subject: fs/proc: expose RSEQ configuration
has been removed from the -mm tree. Its filename was
fs-proc-expose-rseq-configuration.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Piotr Figiel <figiel@google.com>
Subject: fs/proc: expose RSEQ configuration
For userspace checkpoint and restore (C/R) some way of getting process
state containing RSEQ configuration is needed.
There are two ways this information is going to be used:
- to re-enable RSEQ for threads which had it enabled before C/R
- to detect if a thread was in a critical section during C/R
Since C/R preserves TLS memory and addresses RSEQ ABI will be restored
using the address registered before C/R.
Detection whether the thread is in a critical section during C/R is needed
to enforce behavior of RSEQ abort during C/R. Attaching with ptrace()
before registers are dumped itself doesn't cause RSEQ abort. Restoring
the instruction pointer within the critical section is problematic because
rseq_cs may get cleared before the control is passed to the migrated
application code leading to RSEQ invariants not being preserved.
Link: https://lkml.kernel.org/r/20210113174127.2500051-1-figiel@google.com
Signed-off-by: Piotr Figiel <figiel@google.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Alexey Gladkov <gladkov.alexey@gmail.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Bernd Edlinger <bernd.edlinger@hotmail.de>
Cc: Andrei Vagin <avagin@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Oskolkov <posk@google.com>
Cc: Chris Kennelly <ckennelly@google.com>
Cc: Paul Turner <pjt@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/proc/base.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
--- a/fs/proc/base.c~fs-proc-expose-rseq-configuration
+++ a/fs/proc/base.c
@@ -659,6 +659,20 @@ static int proc_pid_syscall(struct seq_f
return 0;
}
+
+#ifdef CONFIG_RSEQ
+static int proc_pid_rseq(struct seq_file *m, struct pid_namespace *ns,
+ struct pid *pid, struct task_struct *task)
+{
+ int res = lock_trace(task);
+
+ if (res)
+ return res;
+ seq_printf(m, "0x%llx 0x%x\n", (uint64_t)task->rseq, task->rseq_sig);
+ unlock_trace(task);
+ return 0;
+}
+#endif /* CONFIG_RSEQ */
#endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
/************************************************************************/
@@ -3179,6 +3193,9 @@ static const struct pid_entry tgid_base_
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
ONE("syscall", S_IRUSR, proc_pid_syscall),
+#ifdef CONFIG_RSEQ
+ ONE("rseq", S_IRUSR, proc_pid_rseq),
+#endif
#endif
REG("cmdline", S_IRUGO, proc_pid_cmdline_ops),
ONE("stat", S_IRUGO, proc_tgid_stat),
@@ -3519,6 +3536,9 @@ static const struct pid_entry tid_base_s
&proc_pid_set_comm_operations, {}),
#ifdef CONFIG_HAVE_ARCH_TRACEHOOK
ONE("syscall", S_IRUSR, proc_pid_syscall),
+#ifdef CONFIG_RSEQ
+ ONE("rseq", S_IRUSR, proc_pid_rseq),
+#endif
#endif
REG("cmdline", S_IRUGO, proc_pid_cmdline_ops),
ONE("stat", S_IRUGO, proc_tid_stat),
_
Patches currently in -mm which might be from figiel@google.com are
reply other threads:[~2021-01-17 21:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210117214247.qmdxVsqY-%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=avagin@gmail.com \
--cc=bernd.edlinger@hotmail.de \
--cc=christian.brauner@ubuntu.com \
--cc=ckennelly@google.com \
--cc=ebiederm@xmission.com \
--cc=figiel@google.com \
--cc=gladkov.alexey@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mm-commits@vger.kernel.org \
--cc=pjt@google.com \
--cc=posk@google.com \
--cc=walken@google.com \
/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).