Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-19 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of June 20, 2021 1:50 am: > > > On Fri, Jun 18, 2021, at 11:02 PM, Nicholas Piggin wrote: >> Excerpts from Mathieu Desnoyers's message of June 19, 2021 6:09 am: >> > - On Jun 18, 2021, at 3:58 PM, Andy Lutomirski l...@kernel.org wrote: >> > >> >> On

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-19 Thread Andy Lutomirski
On Fri, Jun 18, 2021, at 11:02 PM, Nicholas Piggin wrote: > Excerpts from Mathieu Desnoyers's message of June 19, 2021 6:09 am: > > - On Jun 18, 2021, at 3:58 PM, Andy Lutomirski l...@kernel.org wrote: > > > >> On Fri, Jun 18, 2021, at 9:31 AM, Mathieu Desnoyers wrote: > >>> - On Jun

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-19 Thread Nicholas Piggin
Excerpts from Mathieu Desnoyers's message of June 19, 2021 6:09 am: > - On Jun 18, 2021, at 3:58 PM, Andy Lutomirski l...@kernel.org wrote: > >> On Fri, Jun 18, 2021, at 9:31 AM, Mathieu Desnoyers wrote: >>> - On Jun 17, 2021, at 8:12 PM, Andy Lutomirski l...@kernel.org wrote: >>> >>> >

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-18 Thread Mathieu Desnoyers
- On Jun 18, 2021, at 3:58 PM, Andy Lutomirski l...@kernel.org wrote: > On Fri, Jun 18, 2021, at 9:31 AM, Mathieu Desnoyers wrote: >> - On Jun 17, 2021, at 8:12 PM, Andy Lutomirski l...@kernel.org wrote: >> >> > On 6/17/21 7:47 AM, Mathieu Desnoyers wrote: >> > >> >> Please change back

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-18 Thread Andy Lutomirski
On Fri, Jun 18, 2021, at 9:31 AM, Mathieu Desnoyers wrote: > - On Jun 17, 2021, at 8:12 PM, Andy Lutomirski l...@kernel.org wrote: > > > On 6/17/21 7:47 AM, Mathieu Desnoyers wrote: > > > >> Please change back this #ifndef / #else / #endif within function for > >> > >> if

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-18 Thread Mathieu Desnoyers
- On Jun 17, 2021, at 8:12 PM, Andy Lutomirski l...@kernel.org wrote: > On 6/17/21 7:47 AM, Mathieu Desnoyers wrote: > >> Please change back this #ifndef / #else / #endif within function for >> >> if (!IS_ENABLED(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)) { >> ... >> } else { >> ... >> } >>

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-18 Thread Christophe Leroy
Le 16/06/2021 à 20:52, Andy Lutomirski a écrit : On 6/15/21 9:45 PM, Nicholas Piggin wrote: Excerpts from Andy Lutomirski's message of June 16, 2021 1:21 pm: The old sync_core_before_usermode() comments suggested that a non-icache-syncing return-to-usermode instruction is x86-specific and

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-17 Thread Andy Lutomirski
On 6/17/21 8:16 AM, Mathieu Desnoyers wrote: > - On Jun 15, 2021, at 11:21 PM, Andy Lutomirski l...@kernel.org wrote: > > [...] > >> +# An architecture that wants to support >> +# MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE needs to define precisely what >> it >> +# is supposed to do and

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-17 Thread Andy Lutomirski
On 6/17/21 7:47 AM, Mathieu Desnoyers wrote: > Please change back this #ifndef / #else / #endif within function for > > if (!IS_ENABLED(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)) { > ... > } else { > ... > } > > I don't think mixing up preprocessor and code logic makes it more readable. I

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-17 Thread Mathieu Desnoyers
- On Jun 15, 2021, at 11:21 PM, Andy Lutomirski l...@kernel.org wrote: [...] > +# An architecture that wants to support > +# MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE needs to define precisely what > it > +# is supposed to do and implement membarrier_sync_core_before_usermode() to > +#

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-17 Thread Mathieu Desnoyers
- On Jun 15, 2021, at 11:21 PM, Andy Lutomirski l...@kernel.org wrote: > The old sync_core_before_usermode() comments suggested that a > non-icache-syncing > return-to-usermode instruction is x86-specific and that all other > architectures automatically notice cross-modified code on return

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-16 Thread Andy Lutomirski
On Wed, Jun 16, 2021, at 3:20 AM, Will Deacon wrote: > > For the arm64 bits (docs and asm/sync_core.h): > > Acked-by: Will Deacon > Thanks. Per Nick's suggestion, I renamed the header to membarrier.h. Unless I hear otherwise, I'll keep the ack. > Will >

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-16 Thread Andy Lutomirski
On Wed, Jun 16, 2021, at 11:52 AM, Andy Lutomirski wrote: > On 6/15/21 9:45 PM, Nicholas Piggin wrote: > > Excerpts from Andy Lutomirski's message of June 16, 2021 1:21 pm: > >> The old sync_core_before_usermode() comments suggested that a > >> non-icache-syncing > >> return-to-usermode

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-16 Thread Andy Lutomirski
On 6/15/21 9:45 PM, Nicholas Piggin wrote: > Excerpts from Andy Lutomirski's message of June 16, 2021 1:21 pm: >> The old sync_core_before_usermode() comments suggested that a >> non-icache-syncing >> return-to-usermode instruction is x86-specific and that all other >> architectures automatically

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-16 Thread Will Deacon
On Tue, Jun 15, 2021 at 08:21:13PM -0700, Andy Lutomirski wrote: > The old sync_core_before_usermode() comments suggested that a > non-icache-syncing > return-to-usermode instruction is x86-specific and that all other > architectures automatically notice cross-modified code on return to >

Re: [PATCH 8/8] membarrier: Rewrite sync_core_before_usermode() and improve documentation

2021-06-15 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of June 16, 2021 1:21 pm: > The old sync_core_before_usermode() comments suggested that a > non-icache-syncing > return-to-usermode instruction is x86-specific and that all other > architectures automatically notice cross-modified code on return to >