All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [GIT PULL] cgroup fixes for v4.15-rc7
Date: Mon, 8 Jan 2018 11:28:01 -0800	[thread overview]
Message-ID: <20180108192801.GZ3668920@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <CA+55aFxSbAJe9gnL7jXHUO8KzY8TbrvSt7+jWsTZTJt7EMMzuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Jan 08, 2018 at 11:23:03AM -0800, Linus Torvalds wrote:
> On Mon, Jan 8, 2018 at 11:20 AM, Linus Torvalds
> <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:
> >
> > Use "strscpy()", which got this _right_.
> 
> Oh Christ.
> 
> It actually did that initially. And then it was changed to the broken
> code due to some idiotic broken warning by tools that don't do the
> right thing.

Dang, I was reading the different str*cpy() functions and suggested
strscpy() and then forgot about it and blindly applied strlcpy()
blindly after the build warning report.  It'd be great to weed out the
useless ones.  These are places where truncation is fine.  Would the
right thing to do be adding (void) in front, which is kinda ugly?

Thanks.

-- 
tejun

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Li Zefan <lizefan@huawei.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	cgroups <cgroups@vger.kernel.org>
Subject: Re: [GIT PULL] cgroup fixes for v4.15-rc7
Date: Mon, 8 Jan 2018 11:28:01 -0800	[thread overview]
Message-ID: <20180108192801.GZ3668920@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <CA+55aFxSbAJe9gnL7jXHUO8KzY8TbrvSt7+jWsTZTJt7EMMzuw@mail.gmail.com>

On Mon, Jan 08, 2018 at 11:23:03AM -0800, Linus Torvalds wrote:
> On Mon, Jan 8, 2018 at 11:20 AM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Use "strscpy()", which got this _right_.
> 
> Oh Christ.
> 
> It actually did that initially. And then it was changed to the broken
> code due to some idiotic broken warning by tools that don't do the
> right thing.

Dang, I was reading the different str*cpy() functions and suggested
strscpy() and then forgot about it and blindly applied strlcpy()
blindly after the build warning report.  It'd be great to weed out the
useless ones.  These are places where truncation is fine.  Would the
right thing to do be adding (void) in front, which is kinda ugly?

Thanks.

-- 
tejun

  parent reply	other threads:[~2018-01-08 19:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 14:52 [GIT PULL] cgroup fixes for v4.15-rc7 Tejun Heo
     [not found] ` <20180108145223.GS3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-08 19:20   ` Linus Torvalds
2018-01-08 19:20     ` Linus Torvalds
2018-01-08 19:23     ` Linus Torvalds
     [not found]       ` <CA+55aFxSbAJe9gnL7jXHUO8KzY8TbrvSt7+jWsTZTJt7EMMzuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-08 19:28         ` Tejun Heo [this message]
2018-01-08 19:28           ` Tejun Heo
2018-01-08 19:41           ` Linus Torvalds
     [not found]             ` <CA+55aFyQu8wTOJ8HdUjRA2NnLLdXRPvPyEyaws=5VULVJrDSxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-09 15:21               ` [PATCH] string: drop __must_check from strscpy() and restore strscpy() usages in cgroup Tejun Heo
2018-01-09 15:21                 ` Tejun Heo
2018-01-12 19:38                 ` Tejun Heo
     [not found]                 ` <20180109152115.GH3668920-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-19 16:50                   ` Tejun Heo
2018-01-19 16:50                     ` Tejun Heo
     [not found]                     ` <20180119165044.GA3460072-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-19 17:27                       ` Linus Torvalds
2018-01-19 17:27                         ` Linus Torvalds
2018-01-19 17:31                         ` Tejun Heo
     [not found]                           ` <20180119173141.GF3460072-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-01-19 17:35                             ` Linus Torvalds
2018-01-19 17:35                               ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180108192801.GZ3668920@devbig577.frc2.facebook.com \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.