mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
![]() In testing against the 4.1 kernel, the syscall_sysctl testcase started failing even in the unconfined case. What the test program does is attempt to adjust the kernel.threads-max sysctl to be slightly larger and see if the operation succeeds by reading the value back out. It also attempts to save the original value and restore it. The test was failing because (in VMs at least) the default value chosen by the kernel for the kernel.threads-max setting was high enough that attempts to increase it would be ignored (likely to prevent too much use of kernel memory by threads), helpfully without any message being report to dmesg. Thus, the initial read of the current value would succeed, the write of that value + 1024 would appear to succeed, but then reading the value back out and comparing it to the expected value would fail, as it would still be the original value, not the expected new value. This patch attempts to address this by first attempting to raise the value, and if that does not appear to work, to then attempt to lower it. It also refactors the code a bit by creating helper functions to perform the actual sysctl(2) calls to make the code a bit easier to read. Signed-off-by: Steve Beattie <steve@nxnw.org> Acked-by: Seth Arnold <seth.arnold@canonical.com> |
||
---|---|---|
.. | ||
regression | ||
stress | ||
Makefile |