RE: [PATCH v1 1/1] Firstly, as Andy mentioned, this should be smp_rmb() instead of rmb(). considering that TSYNC is a cross-thread situation, and rmb() is a mandatory barrier which should not be used

2021-02-04 Thread Wanghongzhe (Hongzhe, EulerOS)
> Let's start with a patch that just replaces rmb() with smp_rmb() and then work > on optimizing. Can you provide performance numbers that show > rmb() (and soon smp_rmb()) is causing actual problems here? Ok, I will send a patch that just replaces rmb() with smp_rmb() and give performance numbers

Re: [PATCH v1 1/1] Firstly, as Andy mentioned, this should be smp_rmb() instead of rmb(). considering that TSYNC is a cross-thread situation, and rmb() is a mandatory barrier which should not be used

2021-02-02 Thread Kees Cook
On Tue, Feb 02, 2021 at 06:13:07PM +0800, wanghongzhe wrote: > Secondly, the smp_rmb() should be put between reading SYSCALL_WORK_SECCOMP > and reading > seccomp.mode, not between reading seccomp.mode and seccomp->filter, to make > sure that any changes to mode from another thread have been seen a

Re: [PATCH v1 1/1] Firstly, as Andy mentioned, this should be smp_rmb() instead of rmb(). considering that TSYNC is a cross-thread situation, and rmb() is a mandatory barrier which should not be used

2021-02-02 Thread kernel test robot
Hi wanghongzhe, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v5.11-rc6] [also build test WARNING on next-20210125] [cannot apply to kees/for-next/seccomp] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we su

Re: [PATCH v1 1/1] Firstly, as Andy mentioned, this should be smp_rmb() instead of rmb(). considering that TSYNC is a cross-thread situation, and rmb() is a mandatory barrier which should not be used

2021-02-02 Thread Greg KH
On Tue, Feb 02, 2021 at 06:13:07PM +0800, wanghongzhe wrote: > Secondly, the smp_rmb() should be put between reading SYSCALL_WORK_SECCOMP > and reading Your subject line of the patch is a bit odd :)