[tip: sched/core] rseq, ptrace: Add PTRACE_GET_RSEQ_CONFIGURATION request

2021-03-17 Thread tip-bot2 for Piotr Figiel
The following commit has been merged into the sched/core branch of tip: Commit-ID: 90f093fa8ea48e5d991332cee160b761423d55c1 Gitweb: https://git.kernel.org/tip/90f093fa8ea48e5d991332cee160b761423d55c1 Author:Piotr Figiel AuthorDate:Fri, 26 Feb 2021 14:51:56 +01:00

[tip: sched/core] rseq, ptrace: Add PTRACE_GET_RSEQ_CONFIGURATION request

2021-03-17 Thread tip-bot2 for Piotr Figiel
The following commit has been merged into the sched/core branch of tip: Commit-ID: 2c406d3f436db1deea55ec44cc4c3c0861c3c185 Gitweb: https://git.kernel.org/tip/2c406d3f436db1deea55ec44cc4c3c0861c3c185 Author:Piotr Figiel AuthorDate:Fri, 26 Feb 2021 14:51:56 +01:00

Re: [PATCH v4] fs/proc: Expose RSEQ configuration

2021-03-10 Thread Piotr Figiel
On Tue, Feb 02, 2021 at 06:37:09PM +0100, Piotr Figiel wrote: > For userspace checkpoint and restore (C/R) some way of getting process > state containing RSEQ configuration is needed. [...] > To achieve above goals expose the RSEQ ABI address and the signature > value with the new

Re: [PATCH v2] ptrace: add PTRACE_GET_RSEQ_CONFIGURATION request

2021-02-26 Thread Piotr Figiel
Hi, On Fri, Feb 26, 2021 at 10:32:35AM -0500, Mathieu Desnoyers wrote: > > +static long ptrace_get_rseq_configuration(struct task_struct *task, > > + unsigned long size, void __user *data) > > +{ > > + struct ptrace_rseq_configuration conf = { > > +

Re: [PATCH] ptrace: add PTRACE_GET_RSEQ_CONFIGURATION request

2021-02-26 Thread Piotr Figiel
Hi, On Mon, Feb 22, 2021 at 09:53:17AM -0500, Mathieu Desnoyers wrote: > I notice that other structures defined in this UAPI header are not > packed as well. Should we add an attribute packed on new structures ? > It seems like it is generally a safer course of action, even though > each field i

[PATCH v2] ptrace: add PTRACE_GET_RSEQ_CONFIGURATION request

2021-02-26 Thread Piotr Figiel
es in progress. Signed-off-by: Piotr Figiel Reviewed-by: Michal Miroslaw --- v2: Applied review comments: - changed return value from the ptrace request to the size of the configuration structure - expanded configuration structure with the flags field and the rseq abi structure siz

[PATCH] ptrace: add PTRACE_GET_RSEQ_CONFIGURATION request

2021-02-22 Thread Piotr Figiel
es in progress. Signed-off-by: Piotr Figiel Reviewed-by: Michal Miroslaw --- include/uapi/linux/ptrace.h | 8 kernel/ptrace.c | 23 +++ 2 files changed, 31 insertions(+) diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h

[PATCH v4] fs/proc: Expose RSEQ configuration

2021-02-02 Thread Piotr Figiel
s and the signature value with the new procfs file "/proc//rseq". Signed-off-by: Piotr Figiel --- v4: - added documentation and extended comment before task_lock() v3: - added locking so that the proc file always shows consistent pair of RSEQ ABI address and the signature -

Re: [PATCH v3] fs/proc: Expose RSEQ configuration

2021-01-27 Thread Piotr Figiel
On Tue, Jan 26, 2021 at 03:58:46PM -0500, Mathieu Desnoyers wrote: > - On Jan 26, 2021, at 1:54 PM, Piotr Figiel fig...@google.com wrote: > [...] > > diff --git a/kernel/rseq.c b/kernel/rseq.c > > index a4f86a9d6937..6aea67878065 100644 > > --- a/kernel/rseq.c

Re: [PATCH v3] fs/proc: Expose RSEQ configuration

2021-01-27 Thread Piotr Figiel
On Tue, Jan 26, 2021 at 11:25:47AM -0800, Andrew Morton wrote: > On Tue, 26 Jan 2021 19:54:12 +0100 Piotr Figiel wrote: > > To achieve above goals expose the RSEQ structure address and the > > signature value with the new per-thread procfs file "rseq". > Using

[PATCH v3] fs/proc: Expose RSEQ configuration

2021-01-26 Thread Piotr Figiel
cture address and the signature value with the new per-thread procfs file "rseq". Signed-off-by: Piotr Figiel --- v3: - added locking so that the proc file always shows consistent pair of RSEQ ABI address and the signature - changed string formatting to use %px for the RSEQ ABI addre

Re: [PATCH v2] fs/proc: Expose RSEQ configuration

2021-01-18 Thread Piotr Figiel
Hi, thanks for review. On Fri, Jan 15, 2021 at 10:44:20AM -0500, Mathieu Desnoyers wrote: > - On Jan 14, 2021, at 1:54 PM, Piotr Figiel fig...@google.com wrote: > Added PeterZ, Paul and Boqun to CC. They are also listed as maintainers of > rseq. > Please CC them in your next roun

Re: [PATCH] fs/proc: Expose RSEQ configuration

2021-01-14 Thread Piotr Figiel
On Thu, Jan 14, 2021 at 12:32:30AM +0300, Alexey Dobriyan wrote: > On Wed, Jan 13, 2021 at 06:41:27PM +0100, Piotr Figiel wrote: > > For userspace checkpoint and restore (C/R) some way of getting process > > state containing RSEQ configuration is needed. > > + seq_pri

[PATCH v2] fs/proc: Expose RSEQ configuration

2021-01-14 Thread Piotr Figiel
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. Signed-off-by: Piotr Figiel --- v2: - fixed s

[PATCH] fs/proc: Expose RSEQ configuration

2021-01-13 Thread Piotr Figiel
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. Signed-off-by: Piotr Figiel --- fs/proc/base.c