|
 |
195495 |
From 0c34164a245bdd03085e906bc9b3327d559535a4 Mon Sep 17 00:00:00 2001
|
|
 |
195495 |
From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= <snemec@redhat.com>
|
|
 |
195495 |
Date: Wed, 1 Dec 2021 12:12:00 +0100
|
|
 |
195495 |
Subject: [PATCH] tests: shell: better parameters for the interval stack
|
|
 |
195495 |
overflow test
|
|
 |
195495 |
MIME-Version: 1.0
|
|
 |
195495 |
Content-Type: text/plain; charset=UTF-8
|
|
 |
195495 |
Content-Transfer-Encoding: 8bit
|
|
 |
195495 |
|
|
 |
195495 |
Wider testing has shown that 128 kB stack is too low (e.g. for systems
|
|
 |
195495 |
with 64 kB page size), leading to false failures in some environments.
|
|
 |
195495 |
|
|
 |
195495 |
Based on results from a matrix of RHEL 8 and RHEL 9 systems across
|
|
 |
195495 |
x86_64, aarch64, ppc64le and s390x architectures as well as some
|
|
 |
195495 |
anecdotal testing of other Linux distros on x86_64 machines, 400 kB
|
|
 |
195495 |
seems safe: the normal nft stack (which should stay constant during
|
|
 |
195495 |
this test) on all tested systems doesn't exceed 200 kB (stays around
|
|
 |
195495 |
100 kB on typical systems with 4 kB page size), while always growing
|
|
 |
195495 |
beyond 500 kB in the failing case (nftables before baecd1cf2685) with
|
|
 |
195495 |
the increased set size.
|
|
 |
195495 |
|
|
 |
195495 |
Fixes: d8ccad2a2b73 ("tests: cover baecd1cf2685 ("segtree: Fix segfault when restoring a huge interval set")")
|
|
 |
195495 |
Signed-off-by: Štěpán Němec <snemec@redhat.com>
|
|
 |
195495 |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
 |
195495 |
(cherry picked from commit 7b81d9cb094ffa96ad821528cf19269dc348f617)
|
|
 |
195495 |
---
|
|
 |
195495 |
tests/shell/testcases/sets/0068interval_stack_overflow_0 | 4 ++--
|
|
 |
195495 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
 |
195495 |
|
|
 |
195495 |
diff --git a/tests/shell/testcases/sets/0068interval_stack_overflow_0 b/tests/shell/testcases/sets/0068interval_stack_overflow_0
|
|
 |
195495 |
index 6620572449c3c..2cbc986802644 100755
|
|
 |
195495 |
--- a/tests/shell/testcases/sets/0068interval_stack_overflow_0
|
|
 |
195495 |
+++ b/tests/shell/testcases/sets/0068interval_stack_overflow_0
|
|
 |
195495 |
@@ -9,7 +9,7 @@ trap 'rm -f "$ruleset_file"' EXIT
|
|
 |
195495 |
{
|
|
 |
195495 |
echo 'define big_set = {'
|
|
 |
195495 |
for ((i = 1; i < 255; i++)); do
|
|
 |
195495 |
- for ((j = 1; j < 80; j++)); do
|
|
 |
195495 |
+ for ((j = 1; j < 255; j++)); do
|
|
 |
195495 |
echo "10.0.$i.$j,"
|
|
 |
195495 |
done
|
|
 |
195495 |
done
|
|
 |
195495 |
@@ -26,4 +26,4 @@ table inet test68_table {
|
|
 |
195495 |
}
|
|
 |
195495 |
EOF
|
|
 |
195495 |
|
|
 |
195495 |
-( ulimit -s 128 && $NFT -f "$ruleset_file" )
|
|
 |
195495 |
+( ulimit -s 400 && $NFT -f "$ruleset_file" )
|
|
 |
195495 |
--
|
|
 |
195495 |
2.33.0
|
|
 |
195495 |
|