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: <ZqNk9Y5lZm1Wl4Fr@pathway.suse.cz>
Date: Fri, 26 Jul 2024 10:57:25 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH printk v3 01/19] printk: nbcon: Clarify
 nbcon_get_default_prio() context

On Mon 2024-07-22 19:25:21, John Ogness wrote:
> Correct the kerneldoc and code comments that claimed migration must
> be disabled for nbcon_get_default_prio(). This is not true.
> 
> Add the explation in the kerneldoc.
> 
> Signed-off-by: John Ogness <john.ogness@...utronix.de>
> ---
>  kernel/printk/nbcon.c  | 5 ++++-
>  kernel/printk/printk.c | 2 --
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
> index ef6e76db0f5a..d8388faa6500 100644
> --- a/kernel/printk/nbcon.c
> +++ b/kernel/printk/nbcon.c
> @@ -970,9 +970,12 @@ static __ref unsigned int *nbcon_get_cpu_emergency_nesting(void)
>   * nbcon_get_default_prio - The appropriate nbcon priority to use for nbcon
>   *				printing on the current CPU
>   *
> - * Context:	Any context which could not be migrated to another CPU.
> + * Context:	Any context.
>   * Return:	The nbcon_prio to use for acquiring an nbcon console in this
>   *		context for printing.
> + *
> + * Allowing migration enabled relies on the fact that a context cannot be
> + * migrated to panic or emergency state CPUs.

The sentence sounds really cryptic to me. I personally prefer
straightforward descriptions for dummies ;-) What about the following?

 * The function reads per-CPU variables but it is safe in any context.
 * The CPU migration is disabled in panic or emergency CPU context
 * by definition.

>   */
>  enum nbcon_prio nbcon_get_default_prio(void)
>  {

I do not resist on the comment update. Feel free to use:

Reviewed-by: Petr Mladek <pmladek@...e.com>

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ