lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260120-nbcon-v2-5-b61f960587a8@debian.org>
Date: Tue, 20 Jan 2026 08:23:51 -0800
From: Breno Leitao <leitao@...ian.org>
To: Breno Leitao <leitao@...ian.org>, Andrew Lunn <andrew+netdev@...n.ch>, 
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
 pmladek@...e.com, john.ogness@...utronix.de
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 Steven Rostedt <rostedt@...dmis.org>, 
 Sergey Senozhatsky <senozhatsky@...omium.org>, 
 Andrew Morton <akpm@...ux-foundation.org>, netdev@...r.kernel.org, 
 linux-kernel@...r.kernel.org, asantostc@...il.com, efault@....de, 
 gustavold@...il.com, calvin@...nvd.org, jv@...sburgh.net, 
 mpdesouza@...e.com, kernel-team@...a.com
Subject: [PATCH net-next v2 5/5] netconsole: pass wctxt to send_msg_udp()
 for consistency

Refactor send_msg_udp() to take a struct nbcon_write_context pointer
instead of separate msg and len parameters. This makes its signature
consistent with send_ext_msg_udp() and prepares the function for
future use of execution context information from wctxt.

No functional change.

Signed-off-by: Breno Leitao <leitao@...ian.org>
---
 drivers/net/netconsole.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index d89ff01bc9658..ab547a0da5e0d 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -1713,16 +1713,16 @@ static void send_ext_msg_udp(struct netconsole_target *nt,
 				   sysdata_len);
 }
 
-static void send_msg_udp(struct netconsole_target *nt, const char *msg,
-			 unsigned int len)
+static void send_msg_udp(struct netconsole_target *nt,
+			 struct nbcon_write_context *wctxt)
 {
-	const char *tmp = msg;
-	int frag, left = len;
+	const char *msg = wctxt->outbuf;
+	int frag, left = wctxt->len;
 
 	while (left > 0) {
 		frag = min(left, MAX_PRINT_CHUNK);
-		send_udp(nt, tmp, frag);
-		tmp += frag;
+		send_udp(nt, msg, frag);
+		msg += frag;
 		left -= frag;
 	}
 }
@@ -1756,7 +1756,7 @@ static void netconsole_write(struct nbcon_write_context *wctxt, bool extended)
 		if (extended)
 			send_ext_msg_udp(nt, wctxt);
 		else
-			send_msg_udp(nt, wctxt->outbuf, wctxt->len);
+			send_msg_udp(nt, wctxt);
 
 		nbcon_exit_unsafe(wctxt);
 	}

-- 
2.47.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ