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: <f82860ef-71d4-42af-807a-94e33f58d769@wanadoo.fr>
Date: Tue, 30 Jul 2024 18:13:50 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Xueqin Luo <luoxueqin@...inos.cn>, rafael@...nel.org, pavel@....cz,
 len.brown@...el.com
Cc: linux-pm@...r.kernel.org, xiongxin@...inos.cn,
 linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH 1/2] PM: hibernate: Use sysfs_emit() and
 sysfs_emit_at() in "show" functions

Le 30/07/2024 à 08:54, Xueqin Luo a écrit :
> As Documentation/filesystems/sysfs.rst suggested,
> show() should only use sysfs_emit() or sysfs_emit_at() when formatting
> the value to be returned to user space.
> 
> No functional change intended.
> 
> Signed-off-by: Xueqin Luo <luoxueqin@...inos.cn>
> ---

Hi,
...

> @@ -1210,7 +1210,7 @@ power_attr(disk);
>   static ssize_t resume_show(struct kobject *kobj, struct kobj_attribute *attr,
>   			   char *buf)
>   {
> -	return sprintf(buf, "%d:%d\n", MAJOR(swsusp_resume_device),
> +	return sysfs_emit(buf, "%d:%d\n", MAJOR(swsusp_resume_device),
>   		       MINOR(swsusp_resume_device));

Nitpick: now the alignment with the '(' is not correct anymore.

>   }
>   

...

CJ


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ