* [PATCH net] ipvs: fix shift-out-of-bounds in ip_vs_rht_desired_size
From: Julian Anastasov @ 2026-04-27 23:40 UTC (permalink / raw)
To: Simon Horman
Cc: Pablo Neira Ayuso, Florian Westphal, lvs-devel, netfilter-devel,
netdev
Calling roundup_pow_of_two() with 0 has undefined result:
UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13
shift exponent 64 is too large for 64-bit type 'unsigned long'
CPU: 1 UID: 0 PID: 77 Comm: kworker/u8:4 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: events_unbound conn_resize_work_handler
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
__ubsan_handle_shift_out_of_bounds+0x385/0x410 lib/ubsan.c:494
__roundup_pow_of_two include/linux/log2.h:57 [inline]
ip_vs_rht_desired_size+0x2cf/0x410 net/netfilter/ipvs/ip_vs_core.c:240
ip_vs_conn_desired_size net/netfilter/ipvs/ip_vs_conn.c:765 [inline]
conn_resize_work_handler+0x1b6/0x14c0 net/netfilter/ipvs/ip_vs_conn.c:822
process_one_work kernel/workqueue.c:3302 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385
worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Reported-by: syzbot+217f1db9c791e27fe54a@syzkaller.appspotmail.com
Fixes: b655388111cf ("ipvs: add resizable hash tables")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
net/netfilter/ipvs/ip_vs_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index f5b7a2047291..ea450944465f 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -237,7 +237,7 @@ int ip_vs_rht_desired_size(struct netns_ipvs *ipvs, struct ip_vs_rht *t, int n,
{
if (!t)
return 1 << min_bits;
- n = roundup_pow_of_two(n);
+ n = n ? roundup_pow_of_two(n) : 1;
if (lfactor < 0) {
int factor = min(-lfactor, max_bits);
--
2.53.0
^ permalink raw reply related
* [PATCH net-next v1 6/6] selftests: rds: Make rds selftests TAP compliant
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
This patch updates the rds selftests output to be TAP compliant.
Use ksft_pr() to mark debug output with a leading '# ' so that TAP
parsers treat it as commentary, and convert all informational print()
calls to use ksft_pr(). sys.exit(0) is changed to os._exit(0) to
avoid duplicate prints from the buffered TAP output. The console
output from the tcpdump subprocess is silenced, and the gcov console
output is redirected to a gcovr.log.
Finally adjust the exit path so that the hash check loop sets a
return code instead exiting directly. Then print the TAP results
and totals lines before exiting.
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/run.sh | 18 +++++----
tools/testing/selftests/net/rds/test.py | 53 ++++++++++++++++---------
2 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/run.sh
index 3fc116d23410..805cd0915585 100755
--- a/tools/testing/selftests/net/rds/run.sh
+++ b/tools/testing/selftests/net/rds/run.sh
@@ -205,8 +205,8 @@ if ! mountpoint -q /tmp 2>/dev/null; then
fi
set +e
-echo running RDS tests...
-echo Traces will be logged to "$TRACE_FILE"
+echo "# running RDS tests..."
+echo "# Traces will be logged to $TRACE_FILE"
rm -f "$TRACE_FILE"
strace -T -tt -o "$TRACE_FILE" python3 "$(dirname "$0")/test.py" \
-t "$TIMEOUT" -d "$LOG_DIR" -l "$PLOSS" -c "$PCORRUPT" \
@@ -216,7 +216,7 @@ test_rc=$?
dmesg > "${LOG_DIR}/dmesg.out"
if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then
- echo saving coverage data...
+ echo "# saving coverage data..."
# Ensure debugfs is mounted
if ! test -d /sys/kernel/debug/gcov; then
@@ -229,17 +229,19 @@ if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then
cat < "/sys/kernel/debug/gcov/$f" > "/$f"
done)
- echo running gcovr...
+ echo "# running gcovr..."
gcovr -s --html-details --gcov-executable "$GCOV_CMD" --gcov-ignore-parse-errors \
- --root "${ksrc_dir}" -o "${COVR_DIR}/gcovr" "${ksrc_dir}/net/rds/"
+ --root "${ksrc_dir}" -o "${COVR_DIR}/gcovr" "${ksrc_dir}/net/rds/" \
+ > "${LOG_DIR}/gcovr.log" 2>&1
+ echo "# gcovr log: ${LOG_DIR}/gcovr.log"
else
- echo "Coverage report will be skipped"
+ echo "# Coverage report will be skipped"
fi
if [ "$test_rc" -eq 0 ]; then
- echo "PASS: Test completed successfully"
+ echo "# PASS: Test completed successfully"
else
- echo "FAIL: Test failed"
+ echo "# FAIL: Test failed"
fi
exit "$test_rc"
diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index 6685b960d013..bef0b02c8d5c 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -18,6 +18,7 @@ import shutil
this_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(this_dir, "../"))
from lib.py.utils import ip
+from lib.py.ksft import ksft_pr
libc = ctypes.cdll.LoadLibrary('libc.so.6')
setns = libc.setns
@@ -57,7 +58,7 @@ def netns_socket(netns, *sock_args):
# send resulting socket to parent
socket.send_fds(u0, [], [sock.fileno()])
- sys.exit(0)
+ os._exit(0)
# receive socket from child
_, fds, _, _ = socket.recv_fds(u1, 0, 1)
@@ -67,7 +68,7 @@ def netns_socket(netns, *sock_args):
return socket.fromfd(fds[0], *sock_args)
def collect_pcaps():
- print("Stopping network packet captures")
+ ksft_pr("Stopping network packet captures")
for p, pcap_tmp, pcap, fd in tcpdump_procs:
p.terminate()
p.wait()
@@ -78,8 +79,9 @@ def signal_handler(_sig, _frame):
"""
Test timed out signal handler
"""
- print('Test timed out')
+ ksft_pr("Test timed out")
collect_pcaps()
+ print("not ok 1 rds selftest")
sys.exit(1)
#Parse out command line arguments. We take an optional
@@ -140,7 +142,8 @@ for net in [NET0, NET1]:
fd, pcap_tmp = tempfile.mkstemp(suffix=".pcap", prefix=f"{net}-", dir="/tmp")
p = subprocess.Popen(
['ip', 'netns', 'exec', net,
- '/usr/sbin/tcpdump', '-i', 'any', '-w', pcap_tmp])
+ '/usr/sbin/tcpdump', '-i', 'any', '-w', pcap_tmp],
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
tcpdump_procs.append((p, pcap_tmp, pcap, fd))
# simulate packet loss, duplication and corruption
@@ -149,6 +152,9 @@ for net, iface in [(NET0, VETH0), (NET1, VETH1)]:
corrupt {PACKET_CORRUPTION} loss {PACKET_LOSS} duplicate \
{PACKET_DUPLICATE}")
+print("TAP version 13")
+print("1..1")
+
# add a timeout
if args.timeout > 0:
signal.alarm(args.timeout)
@@ -187,7 +193,7 @@ nr_recv = 0
while nr_send < NUM_PACKETS:
# Send as much as we can without blocking
- print("sending...", nr_send, nr_recv)
+ ksft_pr("sending...", nr_send, nr_recv)
while nr_send < NUM_PACKETS:
send_data = hashlib.sha256(
f'packet {nr_send}'.encode('utf-8')).hexdigest().encode('utf-8')
@@ -209,7 +215,7 @@ while nr_send < NUM_PACKETS:
raise
# Receive as much as we can without blocking
- print("receiving...", nr_send, nr_recv)
+ ksft_pr("receiving...", nr_send, nr_recv)
while nr_recv < nr_send:
for fileno, eventmask in ep.poll():
receiver = fileno_to_socket[fileno]
@@ -231,7 +237,7 @@ while nr_send < NUM_PACKETS:
ip(f"netns exec {net} /usr/sbin/sysctl net.rds.tcp.rds_tcp_rcvbuf=10000")
ip(f"netns exec {net} /usr/sbin/sysctl net.rds.tcp.rds_tcp_sndbuf=10000")
-print("done", nr_send, nr_recv)
+ksft_pr("done", nr_send, nr_recv)
# the Python socket module doesn't know these
RDS_INFO_FIRST = 10000
@@ -254,25 +260,34 @@ for s in sockets:
# ignore
pass
-print(f"getsockopt(): {nr_success}/{nr_error}")
+ksft_pr(f"getsockopt(): {nr_success}/{nr_error}")
collect_pcaps()
# We're done sending and receiving stuff, now let's check if what
# we received is what we sent.
+ret = 0
for (sender, receiver), send_hash in send_hashes.items():
recv_hash = recv_hashes.get((sender, receiver))
if recv_hash is None:
- print("FAIL: No data received")
- sys.exit(1)
+ ksft_pr("FAIL: No data received")
+ ret = 1
+ break
if send_hash.hexdigest() != recv_hash.hexdigest():
- print("FAIL: Send/recv mismatch")
- print("hash expected:", send_hash.hexdigest())
- print("hash received:", recv_hash.hexdigest())
- sys.exit(1)
-
- print(f"{sender}/{receiver}: ok")
-
-print("Success")
-sys.exit(0)
+ ksft_pr("FAIL: Send/recv mismatch")
+ ksft_pr("hash expected:", send_hash.hexdigest())
+ ksft_pr("hash received:", recv_hash.hexdigest())
+ ret = 1
+ break
+
+ ksft_pr(f"{sender}/{receiver}: ok")
+
+if ret == 0:
+ ksft_pr("Success")
+ print("ok 1 rds selftest")
+else:
+ print("not ok 1 rds selftest")
+
+ksft_pr(f"Totals: pass:{1-ret} fail:{ret} skip:0")
+sys.exit(ret)
--
2.25.1
^ permalink raw reply related
* [PATCH net-next v1 5/6] selftests: rds: Collect pcaps on timeout
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
The timeout signal handler for the rds selftests currently just
exits when the time limit is exceeded, and forgets to collect the
network dumps. Which can be valueable for discerning why the test
timed out in the first place. Fix this by hoisting the network
dump collection into a helper function, and call it from the
signal handler before exiting
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/test.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index 90f9adad18b3..6685b960d013 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -66,11 +66,20 @@ def netns_socket(netns, *sock_args):
u1.close()
return socket.fromfd(fds[0], *sock_args)
+def collect_pcaps():
+ print("Stopping network packet captures")
+ for p, pcap_tmp, pcap, fd in tcpdump_procs:
+ p.terminate()
+ p.wait()
+ os.close(fd)
+ shutil.move(pcap_tmp, pcap)
+
def signal_handler(_sig, _frame):
"""
Test timed out signal handler
"""
print('Test timed out')
+ collect_pcaps()
sys.exit(1)
#Parse out command line arguments. We take an optional
@@ -246,13 +255,7 @@ for s in sockets:
pass
print(f"getsockopt(): {nr_success}/{nr_error}")
-
-print("Stopping network packet captures")
-for p, pcap_tmp, pcap, fd in tcpdump_procs:
- p.terminate()
- p.wait()
- os.close(fd)
- shutil.move(pcap_tmp, pcap)
+collect_pcaps()
# We're done sending and receiving stuff, now let's check if what
# we received is what we sent.
--
2.25.1
^ permalink raw reply related
* [PATCH net-next v1 4/6] selftests: rds: Fix gcov and pcap collection
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
The vng guest shares the host filesystem via 9p and runs a minimal
systemd inherited from the host's /lib/systemd/system/. As a result,
which filesystems get auto-mounted in the guest depends on the host OS
and its systemd version.
The tcpdump pcaps are initially saved to /tmp because 9p does not support
chown which tcpdump requires. But whether /tmp is already a tmpfs depends
on the host's systemd configuration and may still sometimes fail if /tmp
is not mounted by default. Fix this by mounting tmpfs on /tmp in run.sh
when it is not already a separately mounted filesystem.
A similar dependency exists for gcov. debugfs is not mounted automatically
in vng guest, so the gcov data copy from /sys/kernel/debug/gcov/
silently finds nothing depending on whether debugfs is mounted by default
on the host OS. Fix this by mounting debugfs in run.sh before copying the
gcda files.
Finally, when invoked through the kselftest runner, the working directory
is the test directory rather than the kernel source root. gcovr defaults
--root to the current working directory, causing it to filter out all
coverage data for files under net/rds/ since they are not under the test
directory. Fix this by passing --root to gcovr explicitly.
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/run.sh | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/run.sh
index bc2e53126aab..3fc116d23410 100755
--- a/tools/testing/selftests/net/rds/run.sh
+++ b/tools/testing/selftests/net/rds/run.sh
@@ -197,6 +197,13 @@ COVR_DIR="${LOG_DIR}/coverage/"
mkdir -p "$LOG_DIR"
mkdir -p "$COVR_DIR"
+# tcpdump saves pcaps to /tmp because it requires chown to save the
+# pcap but chown is not supported by 9p. Mount tmpfs on /tmp if it is
+# not already a separate filesystem
+if ! mountpoint -q /tmp 2>/dev/null; then
+ mount -t tmpfs tmpfs /tmp
+fi
+
set +e
echo running RDS tests...
echo Traces will be logged to "$TRACE_FILE"
@@ -210,6 +217,12 @@ dmesg > "${LOG_DIR}/dmesg.out"
if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then
echo saving coverage data...
+
+ # Ensure debugfs is mounted
+ if ! test -d /sys/kernel/debug/gcov; then
+ mount -t debugfs debugfs /sys/kernel/debug 2>/dev/null || true
+ fi
+
(set +x; cd /sys/kernel/debug/gcov; find ./* -name '*.gcda' | \
while read -r f
do
@@ -218,7 +231,7 @@ if [ "$GENERATE_GCOV_REPORT" -eq 1 ]; then
echo running gcovr...
gcovr -s --html-details --gcov-executable "$GCOV_CMD" --gcov-ignore-parse-errors \
- -o "${COVR_DIR}/gcovr" "${ksrc_dir}/net/rds/"
+ --root "${ksrc_dir}" -o "${COVR_DIR}/gcovr" "${ksrc_dir}/net/rds/"
else
echo "Coverage report will be skipped"
fi
--
2.25.1
^ permalink raw reply related
* [PATCH net-next v1 3/6] selftests: rds: Add timeout flag to run.sh
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
Add a -t flag to run.sh to optionally override the default
timeout. The --timeout flag is already supported in test.py,
so just add the shorthand -t flag
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/run.sh | 11 ++++++++---
tools/testing/selftests/net/rds/test.py | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/run.sh
index 73a9b986b0ef..bc2e53126aab 100755
--- a/tools/testing/selftests/net/rds/run.sh
+++ b/tools/testing/selftests/net/rds/run.sh
@@ -154,8 +154,9 @@ LOG_DIR="$current_dir"/rds_logs
PLOSS=0
PCORRUPT=0
PDUP=0
+TIMEOUT=$timeout
GENERATE_GCOV_REPORT=1
-while getopts "d:l:c:u:" opt; do
+while getopts "d:l:c:u:t:" opt; do
case ${opt} in
d)
LOG_DIR=${OPTARG}
@@ -166,12 +167,15 @@ while getopts "d:l:c:u:" opt; do
c)
PCORRUPT=${OPTARG}
;;
+ t)
+ TIMEOUT=${OPTARG}
+ ;;
u)
PDUP=${OPTARG}
;;
:)
echo "USAGE: run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]" \
- "[-u packet_duplicate]"
+ "[-u packet_duplicate] [-t timeout]"
exit 1
;;
?)
@@ -198,7 +202,8 @@ echo running RDS tests...
echo Traces will be logged to "$TRACE_FILE"
rm -f "$TRACE_FILE"
strace -T -tt -o "$TRACE_FILE" python3 "$(dirname "$0")/test.py" \
- --timeout "$timeout" -d "$LOG_DIR" -l "$PLOSS" -c "$PCORRUPT" -u "$PDUP"
+ -t "$TIMEOUT" -d "$LOG_DIR" -l "$PLOSS" -c "$PCORRUPT" \
+ -u "$PDUP"
test_rc=$?
dmesg > "${LOG_DIR}/dmesg.out"
diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index 93e23e8b256c..90f9adad18b3 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -79,7 +79,7 @@ parser = argparse.ArgumentParser(description="init script args",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("-d", "--logdir", action="store",
help="directory to store logs", default="/tmp")
-parser.add_argument('--timeout', help="timeout to terminate hung test",
+parser.add_argument('-t', '--timeout', help="timeout to terminate hung test",
type=int, default=0)
parser.add_argument('-l', '--loss', help="Simulate tcp packet loss",
type=int, default=0)
--
2.25.1
^ permalink raw reply related
* [PATCH net-next v1 2/6] selftests: rds: Update USAGE string for run.sh
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
The run.sh script does not have a -g flag. Update USAGE string with
correct flags. Aslo fix typo packet_duplcate -> packet_duplicate
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/run.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/run.sh
index 897d17d1b8db..73a9b986b0ef 100755
--- a/tools/testing/selftests/net/rds/run.sh
+++ b/tools/testing/selftests/net/rds/run.sh
@@ -171,7 +171,7 @@ while getopts "d:l:c:u:" opt; do
;;
:)
echo "USAGE: run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]" \
- "[-u packet_duplcate] [-g]"
+ "[-u packet_duplicate]"
exit 1
;;
?)
--
2.25.1
^ permalink raw reply related
* [PATCH net-next v1 1/6] selftests: rds: Increase selftest timeout
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
The 400s time out was originally developed under a leaner
kernel config that booted much faster than a default config.
Boot up is included as part of the over all test runtime, as
well as any log collection done when the test is complete.
A slower config combined with the gcov enabled test means
we'll need more time to accommodate the boot up and log
collection. So, bump time out to 800s.
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/settings | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/rds/settings b/tools/testing/selftests/net/rds/settings
index d2009a64589c..8cb41e6a83cc 100644
--- a/tools/testing/selftests/net/rds/settings
+++ b/tools/testing/selftests/net/rds/settings
@@ -1 +1 @@
-timeout=400
+timeout=800
--
2.25.1
^ permalink raw reply related
* [PATCH net-next v1 0/6] selftests: rds: Log collection, TAP compliance and cleanups
From: Allison Henderson @ 2026-04-27 23:29 UTC (permalink / raw)
To: netdev, pabeni, edumazet, kuba, horms, linux-rdma, achender
This series is a set of bug fixes and improvements for the rds
selftests.
Patch 1 bumps the kselftest timeout from 400s to 800s. The original
limit was developed against a lean config, but the kselftest harness
counts boot time and gcov log collection against the limit, so a
default config with gcov enabled needs more headroom. Patch 2 removes
an unused "-g" entry in run.sh's USAGE string, and patch 3 adds a -t
flag to run.sh so the timeout can be overridden if needed.
Patch 4 fixes log collection under vng. The vng guest inherits the
host's systemd config, so tmp and debugfs may not be mounted by
default; without them tcpdump can't write pcaps and gcov data is
silently dropped. The patch mounts each filesystem when it isn't
already mounted, and also specifies the --root folder so that gcov
can still find the kernel source when it is run from the ksft
test directory.
Patch 5 hoists pcap collection into a helper and calls it from the
timeout signal handler so dumps are preserved when a test times out.
Patch 6 makes the test output TAP compliant so the kselftest runner
parses results correctly.
Questions, comments and feedback appreciated!
Thanks everyone!
Allison
Allison Henderson (6):
selftests: rds: Increase selftest timeout
selftests: rds: Update USAGE string for run.sh
selftests: rds: Add timeout flag to run.sh
selftests: rds: Fix gcov and pcap collection
selftests: rds: Collect pcaps on timeout
selftests: rds: Make rds selftests TAP compliant
tools/testing/selftests/net/rds/run.sh | 42 ++++++++++----
tools/testing/selftests/net/rds/settings | 2 +-
tools/testing/selftests/net/rds/test.py | 70 +++++++++++++++---------
3 files changed, 76 insertions(+), 38 deletions(-)
--
2.25.1
^ permalink raw reply
* Re: CL37 autonegotiation not working on amd-xgbe
From: Jakub Kicinski @ 2026-04-27 23:28 UTC (permalink / raw)
To: Raju.Rangoju; +Cc: Patrick Oppenlander, netdev, Shyam-sundar.S-k
In-Reply-To: <CAEg67GmFS0Q4oSZkz8zWdOzckSth9_vBPiOy6a7-d697C2w2Xg@mail.gmail.com>
On Thu, 23 Apr 2026 10:18:49 +1000 Patrick Oppenlander wrote:
> A recent change [1] stopped CL37 autonegotiation from working on
> amd-xgbe hardware.
Hi Raju! Are you looking into this report?
^ permalink raw reply
* Re: [PATCH net-next] net: phy: realtek: replace magic number with register bit macros
From: Jakub Kicinski @ 2026-04-27 23:26 UTC (permalink / raw)
To: Aleksander Jan Bajkowski
Cc: andrew, hkallweit1, linux, davem, edumazet, pabeni, daniel,
vladimir.oltean, michael, ih, rmk+kernel, marek.vasut, netdev,
linux-kernel
In-Reply-To: <20260426222359.3443278-1-olek2@wp.pl>
On Mon, 27 Apr 2026 00:23:44 +0200 Aleksander Jan Bajkowski wrote:
> Replace magic number with register bit macros. The description of the
> RTL8211B interrupt register is obtained from the datasheet.
net-next wasn't open yet, when you posted.
Please resubmit in a couple of days.
--
pw-bot: defer
^ permalink raw reply
* Re: [PATCH net-next v3 0/2] Decouple flow operations from RTNL
From: Jakub Kicinski @ 2026-04-27 23:23 UTC (permalink / raw)
To: Adrian Moreno
Cc: netdev, aconole, pabeni, open list:OPENVSWITCH, open list,
Simon Horman
In-Reply-To: <20260427091153.3210301-1-amorenoz@redhat.com>
On Mon, 27 Apr 2026 11:11:46 +0200 Adrian Moreno wrote:
> When RTNL is contended, network-related control-plane operations can be
> delayed.
net-next wasn't open yet, when you posted.
Please resubmit in a couple of days.
--
pw-bot: defer
^ permalink raw reply
* Re: [PATCH net-next v2 0/5] Reimplement TCP-AO using crypto library
From: Eric Biggers @ 2026-04-27 23:20 UTC (permalink / raw)
To: Dmitry Safonov
Cc: netdev, linux-crypto, linux-kernel, Eric Dumazet, Neal Cardwell,
Kuniyuki Iwashima, David S . Miller, David Ahern, Jakub Kicinski,
Paolo Abeni, Simon Horman, Ard Biesheuvel, Jason A . Donenfeld,
Herbert Xu, Dmitry Safonov
In-Reply-To: <20260427200116.GA3454259@google.com>
On Mon, Apr 27, 2026 at 08:01:16PM +0000, Eric Biggers wrote:
> > - Ronald P. Bonica (the original RFC5925 author), together with Tony
> > Li do have an active RFC draft to support the additional algorithms
[...]
> > [1] https://www.ietf.org/archive/id/draft-bonica-tcpm-tcp-ao-algs-00.html
For what it's worth, that draft makes very little sense. For example,
it proposes three variants of HMAC-SHA3, instead of just making the
modern choice of KMAC256. And it proposes both HMAC-SHA384 and
HMAC-SHA512, despite them being redundant with each other after the
specified truncation to 128 bits.
Thus, it's clear that draft needs some work. That would include, for
example, input from people who may be more familiar with best practices
for choosing cryptographic algorithms in new designs.
So I don't think the Linux kernel's implementation should, or needs to,
already implement all the algorithms in that unofficial draft.
All that's needed is the flexibility to add new algorithms later,
whether from a fixed version of that draft or from somewhere else.
We'll still have that with the library.
And to emphasize again, the current code also isn't really generic. So
the support for new MACs doesn't necessarily come for free currently.
It probably works for arbitrary HMACs. But HMAC != MAC. If
AES-256-CMAC, BLAKE2, KMAC256, Poly1305-AES, or just about any other MAC
is ever needed, the code would have to be changed to support it anyway.
- Eric
^ permalink raw reply
* Re: [PATCH net-next v3 1/2] keys, dns: drop unused upayload->data NUL terminator
From: Jakub Kicinski @ 2026-04-27 23:21 UTC (permalink / raw)
To: Thorsten Blum
Cc: David Howells, Jarkko Sakkinen, David S. Miller, Eric Dumazet,
Paolo Abeni, Simon Horman, Kees Cook, Gustavo A. R. Silva,
Tim Bird, keyrings, linux-kernel, netdev, linux-hardening
In-Reply-To: <20260427114422.313356-3-thorsten.blum@linux.dev>
On Mon, 27 Apr 2026 13:44:23 +0200 Thorsten Blum wrote:
> Subject: [PATCH net-next v3 1/2] keys, dns: drop unused upayload->data NUL terminator
to be clear - I expect "keys" maintainers to handle this, not net-next
directly.
^ permalink raw reply
* Re: [PATCH net-next] net: mana: Force single RX buffer per page for CVM/encrypted guest memory
From: Jakub Kicinski @ 2026-04-27 23:21 UTC (permalink / raw)
To: Dipayaan Roy
Cc: kys, haiyangz, wei.liu, decui, andrew+netdev, davem, edumazet,
pabeni, leon, longli, kotaranov, horms, shradhagupta, ssengar,
ernis, shirazsaleem, linux-hyperv, netdev, linux-kernel,
linux-rdma, stephen, jacob.e.keller, dipayanroy, leitao, kees,
john.fastabend, hawk, bpf, daniel, ast, sdf, yury.norov
In-Reply-To: <ae9pxvJfkAZYfKMf@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
On Mon, 27 Apr 2026 06:51:02 -0700 Dipayaan Roy wrote:
> When page_pool allocates sub-page RX buffer fragments, the bounce buffer
> granularity may not align with these smaller fragment sizes, leading to
> failure in mana driver rx path.
>
> Refactor the RX buffer decision into mana_use_single_rxbuf_per_page().
> When cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT) is true, the driver is
> forced to use a single RX buffer per page. This ensures:
> - Each RX buffer is exactly one PAGE_SIZE.
> - The DMA offset is always 0.
> - SWIOTLB maps full, page-aligned blocks.
As commented on your RFC - I'm not sure why you need this.
^ permalink raw reply
* Re: [PATCH net-next v2 0/2] net: mana: Avoid queue struct allocation failure under memory fragmentation
From: Jakub Kicinski @ 2026-04-27 23:19 UTC (permalink / raw)
To: Aditya Garg
Cc: kys, haiyangz, wei.liu, decui, longli, andrew+netdev, davem,
edumazet, pabeni, kotaranov, horms, ssengar, jacob.e.keller,
dipayanroy, ernis, shirazsaleem, kees, sbhatta, leitao, netdev,
linux-hyperv, linux-kernel, linux-rdma, bpf, gargaditya
In-Reply-To: <20260427132807.1642290-1-gargaditya@linux.microsoft.com>
On Mon, 27 Apr 2026 06:23:33 -0700 Aditya Garg wrote:
> The MANA driver can fail to load on systems with high memory
> utilization because several allocations in the queue setup paths
> require large physically contiguous blocks via kmalloc. Under memory
> fragmentation these high-order allocations may fail, preventing the
> driver from creating queues at probe time or when reconfiguring
> channels, ring parameters or MTU at runtime.
net-next wasn't open yet, when you posted.
Please resubmit in a couple of days.
--
pw-bot: defer
^ permalink raw reply
* Re: [PATCH net-next 4/4] net/sched: speedup tc_dump_qdisc() when tcm_ifindex is provided
From: Jakub Kicinski @ 2026-04-27 23:18 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Paolo Abeni, Simon Horman, Jamal Hadi Salim,
Jiri Pirko, Kuniyuki Iwashima, netdev, eric.dumazet
In-Reply-To: <20260427132555.1791636-5-edumazet@google.com>
On Mon, 27 Apr 2026 13:25:55 +0000 Eric Dumazet wrote:
> static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
> {
> const struct nlmsghdr *nlh = cb->nlh;
> + const struct tcmsg *tcm = nlmsg_data(nlh);
nit: breaks reverse xmas tree
I added this tcm assignment after parsing:
err = nlmsg_parse_deprecated(nlh, sizeof(struct tcmsg), tca, TCA_MAX,
rtm_tca_policy, cb->extack);
if (err < 0)
return err;
+ tcm = nlmsg_data(nlh);
because nlmsg_parse validates the struct is in range of skb->len
> struct net *net = sock_net(skb->sk);
> struct nlattr *tca[TCA_MAX + 1];
> struct {
> @@ -1892,6 +1893,9 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
> if (err < 0)
> return err;
>
> + if (!ctx->ifindex)
> + ctx->ifindex = tcm->tcm_ifindex;
> +
> s_ifindex = ctx->ifindex;
> s_q_idx = ctx->q_idx;
>
> @@ -1899,8 +1903,13 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb)
> struct netdev_queue *dev_queue;
> struct Qdisc *q;
>
> - if (ctx->ifindex > s_ifindex)
> + if (ctx->ifindex > s_ifindex) {
> + if (tcm->tcm_ifindex) {
> + ctx->ifindex = ULONG_MAX;
> + break;
> + }
> s_q_idx = 0;
> + }
nit2: personal preference but I had before the loop:
if (tcm->tcm_ifindex && !ctx->ifindex)
ctx->ifindex = tcm->tcm_ifindex;
in the loop:
if (tcm->tcm_ifindex && ctx->ifindex != tcm->tcm_ifindex)
break;
^ permalink raw reply
* Re: [PATCH net-next 3/4] net/sched: switch tc_dump_qdisc() to for_each_netdev_dump()
From: Jakub Kicinski @ 2026-04-27 23:13 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Paolo Abeni, Simon Horman, Jamal Hadi Salim,
Jiri Pirko, Kuniyuki Iwashima, netdev, eric.dumazet
In-Reply-To: <20260427132555.1791636-4-edumazet@google.com>
On Mon, 27 Apr 2026 13:25:54 +0000 Eric Dumazet wrote:
> + for_each_netdev_dump(net, dev, ctx->ifindex) {
> struct netdev_queue *dev_queue;
> + struct Qdisc *q;
>
> - if (idx < s_idx)
> - goto cont;
> - if (idx > s_idx)
> + if (ctx->ifindex > s_ifindex)
> s_q_idx = 0;
I don't think we need this conditional now that we use for_each_netdev_dump()
We can just add
s_q_idx = 0;
right before closing bracket of the loop?
> q_idx = 0;
^ permalink raw reply
* Re: [PATCH net v4 4/4] ice: skip unnecessary VF reset when setting trust
From: Jacob Keller @ 2026-04-27 23:10 UTC (permalink / raw)
To: Jose Ignacio Tornos Martinez, aleksandr.loktionov
Cc: anthony.l.nguyen, davem, edumazet, horms, intel-wired-lan,
jesse.brandeburg, kuba, netdev, pabeni, przemyslaw.kitszel
In-Reply-To: <20260427075948.870208-1-jtornosm@redhat.com>
On 4/27/2026 12:59 AM, Jose Ignacio Tornos Martinez wrote:
> Hello Aleksandr,
>
>> One more nit, kdoc should end with '*/' not '**/'
> Ok, in the current code there are already some functions with headers
> ending in '**/' and others with '*/' , the functions I have added or
> changed the prototype in the series will all end in '*/' as you say,
> in the next version.
>
> Thanks
>
> Best regards
> Jose Ignacio
>
Yep, thanks! There are some legacy mistakes, but we (netdev) don't
typically do mass patch cleanups for changes like that because the churn
is considered more problematic than the fix.
However, the preference is to use the preferred/correct version on new
code or when changing existing code.
Thanks,
Jake
^ permalink raw reply
* Re: [PATCH net] net: psp: require admin permission for dev-set and key-rotate
From: Willem de Bruijn @ 2026-04-27 23:10 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
daniel.zahka, willemdebruijn.kernel, donald.hunter
In-Reply-To: <20260427195856.401223-1-kuba@kernel.org>
Jakub Kicinski wrote:
> The dev-set and key-rotate netlink operations modify shared device
> state (PSP version configuration and cryptographic key material,
> respectively) but do not require CAP_NET_ADMIN. The only access
> control is psp_dev_check_access() which merely verifies netns
> membership.
>
> Fixes: 00c94ca2b99e ("psp: base PSP device support")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
^ permalink raw reply
* Re: [Intel-wired-lan] [PATCH net] ice: fix stats array overflow when VF requests more queues
From: Jacob Keller @ 2026-04-27 23:08 UTC (permalink / raw)
To: Michal Schmidt, Loktionov, Aleksandr
Cc: Nguyen, Anthony L, Kitszel, Przemyslaw, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Oros, Petr, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <CADEbmW0m_4p9XZZYWnX8RmYjtj1YtV2FRVygac1QH8iN8+FpGQ@mail.gmail.com>
On 4/27/2026 12:32 PM, Michal Schmidt wrote:
> On Mon, Apr 27, 2026 at 5:30 PM Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com> wrote:
>> Why no Cc: stable@vger.kernel.org?
>
> Apparently I still have not internalized the removal of the netdev
> special stable handling from 5 years ago. Sorry!
>
> Michal
>
Old habbits take a while to change :D
^ permalink raw reply
* Re: [PATCH net-next 2/4] net/sched: tc_dump_qdisc_root() refactor
From: Jakub Kicinski @ 2026-04-27 23:08 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Paolo Abeni, Simon Horman, Jamal Hadi Salim,
Jiri Pirko, Kuniyuki Iwashima, netdev, eric.dumazet
In-Reply-To: <20260427132555.1791636-3-edumazet@google.com>
On Mon, 27 Apr 2026 13:25:53 +0000 Eric Dumazet wrote:
> - if (q_idx < s_q_idx) {
> - q_idx++;
> - } else {
> - if (!tc_qdisc_dump_ignore(q, dump_invisible) &&
> - tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).portid,
> - cb->nlh->nlmsg_seq, NLM_F_MULTI,
> - RTM_NEWQDISC, NULL) <= 0)
> - goto done;
> - q_idx++;
> + if (!(q_idx < s_q_idx) &&
> + !tc_qdisc_dump_ignore(q, dump_invisible)) {
> + ret = tc_fill_qdisc(skb, q, q->parent,
> + NETLINK_CB(cb->skb).portid,
> + cb->nlh->nlmsg_seq, NLM_F_MULTI,
> + RTM_NEWQDISC, NULL);
> + if (ret < 0)
> + goto out;
> }
> + q_idx++;
Probably subjective but I'm not sure the
if (!(q_idx < s_q_idx) &&
is more readable than the previous version?
Especially for:
> hash_for_each(qdisc_dev(root)->qdisc_hash, b, q, hash) {
> - if (q_idx < s_q_idx) {
> - q_idx++;
> - continue;
> + if (!(q_idx < s_q_idx) &&
> + !tc_qdisc_dump_ignore(q, dump_invisible)) {
> + ret = tc_fill_qdisc(skb, q, q->parent,
> + NETLINK_CB(cb->skb).portid,
> + cb->nlh->nlmsg_seq, NLM_F_MULTI,
> + RTM_NEWQDISC, NULL);
> + if (ret < 0)
> + goto out;
> }
I feel like checking the ID + continue in netlink dump loop is fairly
idiomatic.
^ permalink raw reply
* Re: [PATCH net-next 0/4] net/sched: tc_dump_qdisc() optimizations
From: Jakub Kicinski @ 2026-04-27 23:02 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Paolo Abeni, Simon Horman, Jamal Hadi Salim,
Jiri Pirko, Kuniyuki Iwashima, netdev, eric.dumazet
In-Reply-To: <20260427132555.1791636-1-edumazet@google.com>
On Mon, 27 Apr 2026 13:25:51 +0000 Eric Dumazet wrote:
> Before converting tc_dump_qdisc() to RCU, we make the following changes:
>
> - Use for_each_netdev_dump() instead of for_each_netdev()
>
> - Only dump qdiscs of a single device at user space request.
Hah, what are the chances, I've been sitting on something like patch 4
since Apr 15th..
^ permalink raw reply
* Re: [PATCH v4 net-next 0/3] Implement PTP support in netdevsim
From: Jakub Kicinski @ 2026-04-27 22:57 UTC (permalink / raw)
To: Maciek Machnikowski
Cc: netdev, richardcochran, milena.olech, willemdebruijn.kernel,
andrew, vadim.fedorenko, horms
In-Reply-To: <20260427164727.15418-1-maciek@machnikowski.net>
On Mon, 27 Apr 2026 18:47:24 +0200 Maciek Machnikowski wrote:
> This patchset adds support to the PTP HW timestamping emulation in the
> netdevsim. It uses existing binding between netdevsim and ptp_mock
> driver to generate transmit and receive timestamps.
>
> It also adds the selftest to verify the hw timestamping functionality
> running over netdevsim.
net-next wasn't open yet, when you posted.
Please resubmit in a couple of days.
BTW the patches don't seem to apply.
--
pw-bot: defer
^ permalink raw reply
* Re: [PATCH net-next] selftests: drv-net: Enable ntuple-filters if supported
From: Jakub Kicinski @ 2026-04-27 22:56 UTC (permalink / raw)
To: Dimitri Daskalakis
Cc: David S . Miller, Andrew Lunn, Eric Dumazet, Paolo Abeni,
Shuah Khan, Dimitri Daskalakis, David Wei, Joe Damato,
Dragos Tatulea, Vishwanath Seshagiri, Pavel Begunkov,
Simon Horman, Pavan Chebbi, Michael Chan, Gal Pressman, netdev
In-Reply-To: <20260427165829.3898229-1-dimitri.daskalakis1@gmail.com>
On Mon, 27 Apr 2026 09:58:29 -0700 Dimitri Daskalakis wrote:
> Certain devices which support ntuple-filters do not enable the feature
> by default. The existing tests will skip (if they check for the feature),
> or fail if they blindly attempt to install rules. Therefore, attempt to turn
> on ntuple-filters if the device supports them.
net-next wasn't open yet, when you posted.
Please resubmit in a couple of days.
--
pw-bot: defer
^ permalink raw reply
* Re: [PATCH net-next v2 0/5] Reimplement TCP-AO using crypto library
From: Jakub Kicinski @ 2026-04-27 22:55 UTC (permalink / raw)
To: Dmitry Safonov
Cc: Eric Biggers, netdev, linux-crypto, linux-kernel, Eric Dumazet,
Neal Cardwell, Kuniyuki Iwashima, David S . Miller, David Ahern,
Paolo Abeni, Simon Horman, Ard Biesheuvel, Jason A . Donenfeld,
Herbert Xu, Dmitry Safonov
In-Reply-To: <CAJwJo6Z9oJSMMBUL_pbYWN6ha3n4MRpKV_aVut8E+af3JUDFkw@mail.gmail.com>
On Mon, 27 Apr 2026 20:09:05 +0100 Dmitry Safonov wrote:
> I do like these numbers quite much! Yet, as I mentioned in version 1,
> removing a fallback for other algorithms' support does not sound good
> to me. There are two reasons:
> - Ronald P. Bonica (the original RFC5925 author), together with Tony
> Li do have an active RFC draft to support the additional algorithms
> [1], potentially in addition to TCP Extended Options [2]
> - There is at least one open-source BGP implementation (BIRD) that
> allows using the algorithms that you are removing [3]. Without a
> deprecation period and communication with at least known open source
> users, it implies intentionally breaking them, which I can't agree
> with.
>
> I don't feel like Naking as we don't have any customers using anything
> other than the 3 algorithms above (and BGP implementation is
> [unfortunately] closed-source, so that would not feel appropriate even
> if we had such customers), yet I do feel like it's worth and
> appropriate to express my thoughts/concerns.
What do you want to happen? You are the maintainer of this code,
you don't get so say "i don't want to nack it but also no" :)
Like Eric says if there are no real users code can be deleted.
Adding deprecation warnings upstream is quite slow, IDK if injecting
deprecation warnings to stable has been discussed..
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox