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: <20250104110955.GA2394@redhat.com>
Date: Sat, 4 Jan 2025 12:09:56 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	"David S . Miller" <davem@...emloft.net>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
	Naveen N Rao <naveen@...nel.org>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Jason Baron <jbaron@...mai.com>, Ard Biesheuvel <ardb@...nel.org>,
	linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] Provide __free(argv) for argv_split() users

On 01/04, Masami Hiramatsu (Google) wrote:
>
> +DEFINE_FREE(argv, char **, argv_free(_T))

This doesn't look right, I think we need

	DEFINE_FREE(argv, char **, if (_T) argv_free(_T))

?

>From the next patch

	@@ -73,24 +73,20 @@ int dyn_event_release(const char *raw_command, struct dyn_event_operations *type
		struct dyn_event *pos, *n;
		char *system = NULL, *event, *p;
		int argc, ret = -ENOENT;
	-	char **argv;
	+	char **argv __free(argv) = NULL;
	 
		argv = argv_split(GFP_KERNEL, raw_command, &argc);
		if (!argv)
			return -ENOMEM;

if argv_split() returns NULL, then __free_argv() will call argv_free(NULL) ?

Oleg.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ