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 > > +++ b/kernel/rseq.c > > @@ -32

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 "/proc//rseq" would be more informati

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

2021-01-26 Thread Mathieu Desnoyers
- 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 > +++ b/kernel/rseq.c > @@ -322,8 +322,10 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, > rseq_len,

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

2021-01-26 Thread Andrew Morton
On Tue, 26 Jan 2021 19:54:12 +0100 Piotr Figiel wrote: > 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 be

[PATCH v3] fs/proc: Expose RSEQ configuration

2021-01-26 Thread Piotr Figiel
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