[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87imman36g.fsf@mid.deneb.enyo.de>
Date: Fri, 20 Dec 2019 21:37:59 +0100
From: Florian Weimer <fw@...eb.enyo.de>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
"Paul E . McKenney" <paulmck@...ux.ibm.com>,
Boqun Feng <boqun.feng@...il.com>,
"H . Peter Anvin" <hpa@...or.com>, Paul Turner <pjt@...gle.com>,
linux-api@...r.kernel.org, stable@...r.kernel.org,
Dmitry Vyukov <dvyukov@...gle.com>,
Neel Natu <neelnatu@...gle.com>
Subject: Re: [PATCH for 5.5 1/2] rseq: Fix: Clarify rseq.h UAPI rseq_cs memory reclaim requirements
* Mathieu Desnoyers:
> diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h
> index 9a402fdb60e9..6f26b0b148a6 100644
> --- a/include/uapi/linux/rseq.h
> +++ b/include/uapi/linux/rseq.h
> @@ -100,7 +100,9 @@ struct rseq {
> * instruction sequence block, as well as when the kernel detects that
> * it is preempting or delivering a signal outside of the range
> * targeted by the rseq_cs. Also needs to be set to NULL by user-space
> - * before reclaiming memory that contains the targeted struct rseq_cs.
> + * before reclaiming memory that contains the targeted struct rseq_cs
> + * or reclaiming memory that contains the code refered to by the
> + * start_ip and post_commit_offset fields of struct rseq_cs.
Maybe mention that it's good practice to clear rseq_cs before
returning from a function that contains a restartable sequence?
That will deal with the dlclose issue because even if the function
calls dlclose itself, unmapping something on call stack for dlclose is
already undefined.
Powered by blists - more mailing lists