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: <b3596c1fb07e4c6bbe347e742dbb7126@AcuMS.aculab.com>
Date: Sun, 8 Dec 2024 11:03:23 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'liujing' <liujing@...s.chinamobile.com>, "davem@...emloft.net"
	<davem@...emloft.net>, "andreas@...sler.com" <andreas@...sler.com>
CC: "sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] sparc: Move va_end() before exit()

From: liujing
> Sent: 06 December 2024 09:24
> 
> There is a static checker warning, so move the va_end call before
> exit(1). Since the exit(1) function terminates the program, any code
> after exit(1) is unreachable thus notexecuted. Placing va_end() before
> exit() ensures that the va_list is properly cleaned up.

Aren't you just adding 'bloat' to the vdso?
(It might even be space limited?)

If you are calling exit() then there is no need to tidy up the va_list.
Much the same as there is no need to call free() or close() all fd.

I'd probably have written it as:
	// va_end(ap);
	exit(1);

	David
> 
> Signed-off-by: liujing <liujing@...s.chinamobile.com>
> ---
> V1 -> V2: Modify the commit information and title description
> 
> diff --git a/arch/sparc/vdso/vdso2c.c b/arch/sparc/vdso/vdso2c.c
> index dc81240aab6f..372e3330850a 100644
> --- a/arch/sparc/vdso/vdso2c.c
> +++ b/arch/sparc/vdso/vdso2c.c
> @@ -90,8 +90,8 @@ static void fail(const char *format, ...)
>  	vfprintf(stderr, format, ap);
>  	if (outfilename)
>  		unlink(outfilename);
> -	exit(1);
>  	va_end(ap);
> +	exit(1);
>  }
> 
>  /*
> --
> 2.27.0
> 
> 
> 

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ