]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp: Fix setting loaded filter count during TSYNC
authorHsuan-Chi Kuo <hsuanchikuo@gmail.com>
Thu, 4 Mar 2021 23:37:08 +0000 (17:37 -0600)
committerKees Cook <keescook@chromium.org>
Wed, 11 Aug 2021 18:48:28 +0000 (11:48 -0700)
commit4515a1a176e7e648427e0ce49b4e0817c58eb3bf
tree5ea7ce2adf796c1ae64f516dac67cfcc16a8f5a3
parentb3dac737f5108600f2150b4a0f1fa54d9718457e
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: ea125b586578 ("seccomp: Report number of loaded filters in /proc/$pid/status")
kernel/seccomp.c