mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
UPSTREAM: seccomp: Fix setting loaded filter count during TSYNC
The desired behavior is to set the caller's filter count to thread's. This value is reported via /proc, so this fixes the inaccurate count exposed to userspace; it is not used for reference counting, etc. Signed-off-by: Hsuan-Chi Kuo <hsuanchikuo@gmail.com> Link: https://lore.kernel.org/r/20210304233708.420597-1-hsuanchikuo@gmail.com Co-developed-by: Wiktor Garbacz <wiktorg@google.com> Signed-off-by: Wiktor Garbacz <wiktorg@google.com> Link: https://lore.kernel.org/lkml/20210810125158.329849-1-wiktorg@google.com Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Fixes: c818c03b661c ("seccomp: Report number of loaded filters in /proc/$pid/status") (cherry picked from commit b4d8a58f8dcfcc890f296696cadb76e77be44b5f) Bug: 187129171 Signed-off-by: Connor O'Brien <connoro@google.com> Change-Id: Ia3ee7ec71e9fdbb8d958f9b42b1c6e02c761503f
This commit is contained in:
parent
b3dbf34600
commit
c83d6f169d
1 changed files with 1 additions and 1 deletions
|
|
@ -567,7 +567,7 @@ static inline void seccomp_sync_threads(unsigned long flags)
|
|||
smp_store_release(&thread->seccomp.filter,
|
||||
caller->seccomp.filter);
|
||||
atomic_set(&thread->seccomp.filter_count,
|
||||
atomic_read(&thread->seccomp.filter_count));
|
||||
atomic_read(&caller->seccomp.filter_count));
|
||||
|
||||
/*
|
||||
* Don't let an unprivileged task work around
|
||||
|
|
|
|||
Loading…
Reference in a new issue