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: <CAH_-1qyg9xxCkRQWqMpughTzigBLfhVoAyZzyX32Rmq2t7YqrQ@mail.gmail.com>
Date:   Thu, 25 Mar 2021 16:49:56 -0700
From:   Catherine Sullivan <csully@...gle.com>
To:     Daode Huang <huangdaode@...wei.com>
Cc:     Sagi Shahar <sagis@...gle.com>, Jon Olson <jonolson@...gle.com>,
        David Miller <davem@...emloft.net>, kuba@...nel.org,
        David Awogbemila <awogbemila@...gle.com>,
        Yangchun Fu <yangchun@...gle.com>,
        Kuo Zhao <kuozhao@...gle.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: gve: convert strlcpy to strscpy

On Thu, Mar 25, 2021 at 1:01 AM Daode Huang <huangdaode@...wei.com> wrote:
>
> Usage of strlcpy in linux kernel has been recently deprecated[1], so
> convert gve driver to strscpy
>
> [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL
> =V6A6G1oUZcprmknw@...l.gmail.com/
>
> Signed-off-by: Daode Huang <huangdaode@...wei.com>

Reviewed-by: Catherine Sullivan <csully@...gle.com>

> ---
>  drivers/net/ethernet/google/gve/gve_ethtool.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
> index 0901fa6..e40e052 100644
> --- a/drivers/net/ethernet/google/gve/gve_ethtool.c
> +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
> @@ -14,9 +14,9 @@ static void gve_get_drvinfo(struct net_device *netdev,
>  {
>         struct gve_priv *priv = netdev_priv(netdev);
>
> -       strlcpy(info->driver, "gve", sizeof(info->driver));
> -       strlcpy(info->version, gve_version_str, sizeof(info->version));
> -       strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
> +       strscpy(info->driver, "gve", sizeof(info->driver));
> +       strscpy(info->version, gve_version_str, sizeof(info->version));
> +       strscpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
>  }
>
>  static void gve_set_msglevel(struct net_device *netdev, u32 value)
> --
> 2.8.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ