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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240915170010.55840e27@kernel.org>
Date: Sun, 15 Sep 2024 17:00:10 +0200
From: Jakub Kicinski <kuba@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
 thepacketgeek@...il.com, horms@...nel.org, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, davej@...emonkey.org.uk, vlad.wing@...il.com,
 max@...sevol.com
Subject: Re: [PATCH net-next v3 06/10] net: netconsole: track explicitly if
 msgbody was written to buffer

On Tue, 10 Sep 2024 03:04:01 -0700 Breno Leitao wrote:
> @@ -1128,6 +1128,7 @@ static void send_msg_fragmented(struct netconsole_target *nt,
>  	 */
>  	while (offset < body_len) {
>  		int this_header = header_len;
> +		bool msgbody_written = false;
>  		int this_offset = 0;
>  		int this_chunk = 0;
>  
> @@ -1146,12 +1147,22 @@ static void send_msg_fragmented(struct netconsole_target *nt,
>  			this_offset += this_chunk;
>  		}
>  
> +		if (offset + this_offset >= msgbody_len)
> +			/* msgbody was finally written, either in the previous
> +			 * messages and/or in the current buf. Time to write
> +			 * the userdata.
> +			 */
> +			msgbody_written = true;

nit: this could be:

		msgbody_written |= offset + this_offset >= msgbody_len;

?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ