Commit fe717e19 authored by Hsuan-Chi Kuo's avatar Hsuan-Chi Kuo Committed by Zheng Zengkai
Browse files

seccomp: Fix setting loaded filter count during TSYNC

stable inclusion
from stable-5.10.60
commit 561d13128bb825f4e628d03c4f64a2cddb958ac8
bugzilla: 177018 https://gitee.com/openeuler/kernel/issues/I4EAUG

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=561d13128bb825f4e628d03c4f64a2cddb958ac8



--------------------------------

commit b4d8a58f upstream.

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: default avatarHsuan-Chi Kuo <hsuanchikuo@gmail.com>
Link: https://lore.kernel.org/r/20210304233708.420597-1-hsuanchikuo@gmail.com


Co-developed-by: default avatarWiktor Garbacz <wiktorg@google.com>
Signed-off-by: default avatarWiktor Garbacz <wiktorg@google.com>
Link: https://lore.kernel.org/lkml/20210810125158.329849-1-wiktorg@google.com


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Fixes: c818c03b ("seccomp: Report number of loaded filters in /proc/$pid/status")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent f305603e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment