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: <CAFhGd8oaLC3Q=eopGb2=VPnhNVM4vb9rkGP0hM-gdT2C4m7c=g@mail.gmail.com>
Date: Thu, 12 Sep 2024 13:46:38 -0700
From: Justin Stitt <justinstitt@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, horms@...nel.org
Subject: Re: [PATCH net-next] net: caif: remove unused name

Hi,

On Tue, Sep 10, 2024 at 6:52 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> Justin sent a patch to use strscpy_pad() instead of strncpy()
> on the name field. Simon rightly asked why the _pad() version
> is used, and looking closer name seems completely unused,
> the last code which referred to it was removed in
> commit 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and flow control")

Thanks for looking into this a bit deeper.

>
> Link: https://lore.kernel.org/20240909-strncpy-net-caif-chnl_net-c-v1-1-438eb870c155@google.com
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: justinstitt@...gle.com
> CC: horms@...nel.org
>
> It's a bit unusual to take over patch submissions but the initial
> submission was too low effort to count :|
> ---
>  net/caif/chnl_net.c | 2 --
>  1 file changed, 2 deletions(-)

the best kind of diff :)

>
> diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
> index 47901bd4def1..94ad09e36df2 100644
> --- a/net/caif/chnl_net.c
> +++ b/net/caif/chnl_net.c
> @@ -47,7 +47,6 @@ struct chnl_net {
>         struct caif_connect_request conn_req;
>         struct list_head list_field;
>         struct net_device *netdev;
> -       char name[256];
>         wait_queue_head_t netmgmt_wq;
>         /* Flow status to remember and control the transmission. */
>         bool flowenabled;
> @@ -347,7 +346,6 @@ static int chnl_net_init(struct net_device *dev)
>         struct chnl_net *priv;
>         ASSERT_RTNL();
>         priv = netdev_priv(dev);
> -       strncpy(priv->name, dev->name, sizeof(priv->name));
>         INIT_LIST_HEAD(&priv->list_field);
>         return 0;
>  }
> --
> 2.46.0
>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ