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