Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-11-14 Thread Christophe Leroy
Le 26/10/2022 à 06:27, Samuel Holland a écrit : > On 9/21/22 00:17, Christophe Leroy wrote: >> >> Instead of the patch from Michael, could you try by replacing >> preempt_enable() by preempt_enable_no_resched() in exit_vmx_usercopy() ? > > I finally got a chance to test this, and the simpler fix

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-10-25 Thread Samuel Holland
On 9/21/22 00:17, Christophe Leroy wrote: > Le 21/09/2022 à 05:33, Samuel Holland a écrit : >> On 9/19/22 07:37, Michael Ellerman wrote: >>> Christophe Leroy writes: Le 16/09/2022 à 07:05, Samuel Holland a écrit : > With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >>

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-21 Thread Michael Ellerman
Christophe Leroy writes: > Le 19/09/2022 à 14:37, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Le 16/09/2022 à 07:05, Samuel Holland a écrit : With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible to switch away from a task inside copy_{from,to}_user. This

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-20 Thread Christophe Leroy
Le 21/09/2022 à 05:33, Samuel Holland a écrit : > On 9/19/22 07:37, Michael Ellerman wrote: >> Christophe Leroy writes: >>> Le 16/09/2022 à 07:05, Samuel Holland a écrit : With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible to switch away from a task inside copy_{fro

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-20 Thread Samuel Holland
On 9/19/22 07:37, Michael Ellerman wrote: > Christophe Leroy writes: >> Le 16/09/2022 à 07:05, Samuel Holland a écrit : >>> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >>> to switch away from a task inside copy_{from,to}_user. This left the CPU >>> with userspace access

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-19 Thread Christophe Leroy
Le 19/09/2022 à 14:37, Michael Ellerman a écrit : > Christophe Leroy writes: >> Le 16/09/2022 à 07:05, Samuel Holland a écrit : >>> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >>> to switch away from a task inside copy_{from,to}_user. This left the CPU >>> with userspa

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-19 Thread Michael Ellerman
Christophe Leroy writes: > Le 16/09/2022 à 07:05, Samuel Holland a écrit : >> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >> to switch away from a task inside copy_{from,to}_user. This left the CPU >> with userspace access enabled until after the next IRQ or privilege >>

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-18 Thread Christophe Leroy
Le 17/09/2022 à 20:38, Samuel Holland a écrit : > On 9/17/22 03:16, Christophe Leroy wrote: >> Le 16/09/2022 à 07:05, Samuel Holland a écrit : >>> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >>> to switch away from a task inside copy_{from,to}_user. This left the CPU >>

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-17 Thread Samuel Holland
On 9/17/22 03:16, Christophe Leroy wrote: > Le 16/09/2022 à 07:05, Samuel Holland a écrit : >> With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible >> to switch away from a task inside copy_{from,to}_user. This left the CPU >> with userspace access enabled until after the next IRQ

Re: [PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-17 Thread Christophe Leroy
Le 16/09/2022 à 07:05, Samuel Holland a écrit : > With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible > to switch away from a task inside copy_{from,to}_user. This left the CPU > with userspace access enabled until after the next IRQ or privilege > level switch, when AMR/IAMR g

[PATCH] powerpc: Save AMR/IAMR when switching tasks

2022-09-15 Thread Samuel Holland
With CONFIG_PREEMPT=y (involuntary preemption enabled), it is possible to switch away from a task inside copy_{from,to}_user. This left the CPU with userspace access enabled until after the next IRQ or privilege level switch, when AMR/IAMR got reset to AMR_KU[AE]P_BLOCKED. Then, when switching back