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: <20210701141221.1d0b1fe0@oasis.local.home>
Date:   Thu, 1 Jul 2021 14:12:21 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Paul Burton <paulburton@...gle.com>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Joel Fernandes <joelaf@...gle.com>, stable@...r.kernel.org
Subject: Re: [PATCH v2 2/2] tracing: Resize tgid_map to pid_max, not
 PID_MAX_DEFAULT

On Thu,  1 Jul 2021 10:24:07 -0700
Paul Burton <paulburton@...gle.com> wrote:

> +static int *trace_find_tgid_ptr(int pid)
> +{
> +	// Pairs with the smp_store_release in set_tracer_flag() to ensure that
> +	// if we observe a non-NULL tgid_map then we also observe the correct
> +	// tgid_map_max.

BTW, it's against the Linux kernel coding style to use // for comments.

I can take this patch, but I need to change this to:

	/*
	 * Pairs with the smp_store_release in set_tracer_flag() to ensure that
	 * if we observe a non-NULL tgid_map then we also observe the correct
	 * tgid_map_max.
	 */

Same with the other comments. Please follow coding style that can be
found in:

   Documentation/process/coding-style.rst

And see section 8 on Commenting.

Thanks,

-- Steve


> +	int *map = smp_load_acquire(&tgid_map);
> +
> +	if (unlikely(!map || pid > tgid_map_max))
> +		return NULL;
> +
> +	return &map[pid];
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ