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]
Date:   Mon, 24 Apr 2023 21:41:18 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Beau Belgrave <beaub@...ux.microsoft.com>
Cc:     mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
        dcook@...ux.microsoft.com, alanau@...ux.microsoft.com,
        linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] tracing/user_events: Prevent same address and bit
 per process

On Tue, 11 Apr 2023 14:17:09 -0700
Beau Belgrave <beaub@...ux.microsoft.com> wrote:

> +static bool user_event_enabler_exists(struct user_event_mm *mm,
> +				      unsigned long uaddr, unsigned char bit)
> +{
> +	struct user_event_enabler *enabler;
> +	struct user_event_enabler *next;
> +
> +	list_for_each_entry_safe(enabler, next, &mm->enablers, link)
> +		if (enabler->addr == uaddr &&
> +		    (enabler->values & ENABLE_VAL_BIT_MASK) == bit)
> +			return true;
> +

Please add brackets around complex calls like the above. The no bracket
rule is not if you can get away without using it, but if there's only a
single line.

	list_for_each_entry_safe(enabler, next, &mm->enablers, link) {
		if (enabler->addr == uaddr &&
		    (enabler->values & ENABLE_VAL_BIT_MASK) == bit)
			return true;
	}

-- Steve



> +	return false;
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ