1:
- replace rmb() with smp_rmb()
- move the smp_rmb() logic to the middle between TIF_SECCOMP and mode
Signed-off-by: wanghongzhe
---
kernel/seccomp.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 1d60fc2c9987..64
> > On Feb 24, 2021, at 12:03 AM, wanghongzhe
> wrote:
> >
> > As Kees haved accepted the v2 patch at a381b70a1 which just replaced
> > rmb() with smp_rmb(), this patch will base on that and just adjust the
> > smp_rmb() to the correct position.
> >
> &
_SECCOMP and mode
Signed-off-by: wanghongzhe
---
kernel/seccomp.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 1d60fc2c9987..64b236cb8a7f 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -1160,12 +116
_SECCOMP and mode
Signed-off-by: wanghongzhe
---
kernel/seccomp.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 1d60fc2c9987..64b236cb8a7f 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -1160,12 +116
> From: Leon Romanovsky [mailto:l...@kernel.org]
> Sent: Monday, February 8, 2021 2:44 PM
> To: Wanghongzhe (Hongzhe, EulerOS)
> Cc: keesc...@chromium.org; l...@amacapital.net; w...@chromium.org;
> a...@kernel.org; dan...@iogearbox.net; and...@kernel.org; ka...@fb.com;
> songli
or the next optimize patch, if you guys thinks this
smp_rmb() refactor is appropriate.
v1 -> v2:
- only replace rmb() with smp_rmb()
- provide the performance test number
RFC -> v1:
- replace rmb() with smp_rmb()
- move the smp_rmb() logic to the middle between TIF_SECCOMP and mode
Sign
e
performance numbers.
> BUG() should never be used[1]. This is a recoverable situation, I think, and
> should be handled as such.
I just follow the default case behind. Let's discuss this issue in next
patches.
--
wanghongzhe
first TSYNCed time, and if
the new mode don't equals to SECCOMP_MODE_FILTER, do BUG(), go to FILTER path
otherwise.
RFC -> v1:
- replace rmb() with smp_rmb()
- move the smp_rmb() logic to the middle between SYSCALL_WORK_SECCOMP and mode
Signed-off-by: wanghongzhe
Reviewed-by: Andy Lu
>> On Feb 1, 2021, at 4:06 AM, wanghongzhe wrote:
>>
>> If a thread(A)'s TSYNC flag is set from seccomp(), then it will
>> synchronize its seccomp filter to other threads(B) in same thread
>> group. To avoid race condition, seccomp puts rmb() between
te memory barrier between writing
the filter and mode in smp_mb__before_atomic(), to avoid
the race condition in TSYNC case.
Signed-off-by: wanghongzhe
---
kernel/seccomp.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/kernel/seccomp.c
te memory barrier between writing
the filter and mode in smp_mb__before_atomic(), to avoid
the race condition in TSYNC case.
Signed-off-by: wanghongzhe
---
kernel/seccomp.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/kernel/seccomp.c
11 matches
Mail list logo