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: <CAFhGd8rdziUZXH4=CxnZZKuS3X2EpTajxBgat+fvr-5RRzAekg@mail.gmail.com>
Date: Mon, 30 Oct 2023 10:40:09 -0700
From: Justin Stitt <justinstitt@...gle.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev <netdev@...r.kernel.org>, Alexander Duyck <alexanderduyck@...com>, 
	stable@...r.kernel.org
Subject: Re: [PATCH v1 net] net: ethtool: Fix documentation of ethtool_sprintf()

On Sat, Oct 28, 2023 at 12:25 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> This function takes a pointer to a pointer, unlike sprintf() which is
> passed a plain pointer. Fix up the documentation to make this clear.
>
> Fixes: 7888fe53b706 ("ethtool: Add common function for filling out strings")
> Cc: Alexander Duyck <alexanderduyck@...com>
> Cc: Justin Stitt <justinstitt@...gle.com>
> Cc: stable@...r.kernel.org
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
> ---
>  include/linux/ethtool.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 62b61527bcc4..1b523fd48586 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -1045,10 +1045,10 @@ static inline int ethtool_mm_frag_size_min_to_add(u32 val_min, u32 *val_add,
>
>  /**
>   * ethtool_sprintf - Write formatted string to ethtool string data
> - * @data: Pointer to start of string to update
> + * @data: Pointer to a pointer to the start of string to update
>   * @fmt: Format of string to write
>   *
> - * Write formatted string to data. Update data to point at start of
> + * Write formatted string to *data. Update *data to point at start of
>   * next string.
>   */
>  extern __printf(2, 3) void ethtool_sprintf(u8 **data, const char *fmt, ...);
> --
> 2.42.0
>

Great! Now the docs more appropriately describe the behavior. My patch [1]
for ethtool_puts() will use this same wording you've introduced.

Reviewed-by: Justin Stitt <justinstitt@...gle.com>

[1]: https://lore.kernel.org/all/20231027-ethtool_puts_impl-v3-0-3466ac679304@google.com/

Thanks
Justin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ