All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Andy Shevchenko <andy@kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
	Richard Weinberger <richard@nod.at>,
	Justin Stitt <justinstitt@google.com>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Jason Wang <jasowang@redhat.com>,
	kernel test robot <lkp@intel.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Azeem Shaikh <azeemshaikh38@gmail.com>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
	linux-um@lists.infradead.org
Subject: [PATCH v3 0/4] string: Allow 2-argument strscpy()
Date: Tue,  6 Feb 2024 06:22:15 -0800	[thread overview]
Message-ID: <20240206142027.make.107-kees@kernel.org> (raw)

v3:
 - add missed args.h include (andy)
v2: https://lore.kernel.org/all/20240205122916.it.909-kees@kernel.org/
v1: https://lore.kernel.org/all/20240131055340.work.279-kees@kernel.org/

Hi,

Make it possible for strscpy() and strscpy_pad() to use 2 arguments,
making "sizeof(dst)" be the the default 3rd argument for the destination
size. This can make future usage much easier to read. Additionally allows
treewide changes to save a bunch of lines:
 1177 files changed, 2455 insertions(+), 3026 deletions(-)

-Kees

Kees Cook (4):
  string: Redefine strscpy_pad() as a macro
  string: Allow 2-argument strscpy()
  string: Allow 2-argument strscpy_pad()
  um: Convert strscpy() usage to 2-argument style

 arch/um/drivers/net_kern.c               |  2 +-
 arch/um/drivers/vector_kern.c            |  2 +-
 arch/um/drivers/vector_user.c            |  4 +-
 arch/um/include/shared/user.h            |  3 +-
 arch/um/os-Linux/drivers/ethertap_user.c |  2 +-
 arch/um/os-Linux/drivers/tuntap_user.c   |  2 +-
 arch/um/os-Linux/umid.c                  |  6 +-
 include/linux/fortify-string.h           | 22 +------
 include/linux/string.h                   | 76 +++++++++++++++++++++++-
 lib/string.c                             |  4 +-
 lib/string_helpers.c                     | 34 -----------
 11 files changed, 88 insertions(+), 69 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-02-06 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 14:22 Kees Cook [this message]
2024-02-06 14:22 ` [PATCH v3 1/4] string: Redefine strscpy_pad() as a macro Kees Cook
2024-02-07  0:32   ` Justin Stitt
2024-02-06 14:22 ` [PATCH v3 2/4] string: Allow 2-argument strscpy() Kees Cook
2024-02-06 14:22 ` [PATCH v3 3/4] string: Allow 2-argument strscpy_pad() Kees Cook
2024-02-07  0:51   ` Justin Stitt
2024-02-07  9:18     ` Kees Cook
2024-02-10 12:34       ` David Laight
2024-02-06 14:22 ` [PATCH v3 4/4] um: Convert strscpy() usage to 2-argument style Kees Cook
2024-02-06 15:02   ` Andy Shevchenko
2024-02-07 10:42     ` Removing more str APIs (was Re: [PATCH v3 4/4] um: Convert strscpy() usage to 2-argument style) Kees Cook

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=20240206142027.make.107-kees@kernel.org \
    --to=keescook@chromium.org \
    --cc=andy@kernel.org \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=azeemshaikh38@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=justinstitt@google.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=nathan@kernel.org \
    --cc=richard@nod.at \
    --cc=willemdebruijn.kernel@gmail.com \
    /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.