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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hLP4pzGzyHAXb9Ksox5_rT85_30B95yX0mqt6=vMmzaw@mail.gmail.com>
Date:   Thu, 10 Nov 2022 20:26:05 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     yang.yang29@....com.cn
Cc:     rafael@...nel.org, lenb@...nel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org, xu.panda@....com.cn
Subject: Re: [PATCH linux-next] ACPI: sysfs: use sysfs_emit() to instead of scnprintf()

On Wed, Nov 9, 2022 at 2:25 PM <yang.yang29@....com.cn> wrote:
>
> From: Xu Panda <xu.panda@....com.cn>
>
> Replace scnprintf() with sysfs_emit() to simplify the code.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Xu Panda <xu.panda@....com.cn>
> Signed-off-by: Yang Yang <yang.yang29@....com>
> ---
>  drivers/acpi/sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> index 2d81c742e4d2..e6fe1c02a138 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -198,7 +198,7 @@ static int param_set_trace_method_name(const char *val,
>
>  static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp)
>  {
> -       return scnprintf(buffer, PAGE_SIZE, "%s\n", acpi_gbl_trace_method_name);
> +       return sysfs_emit(buffer, "%s\n", acpi_gbl_trace_method_name);
>  }
>
>  static const struct kernel_param_ops param_ops_trace_method = {
> --

Applied as 6.2 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ