linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Peter Rosin <peda@axentia.se>,
	Matthew Wilcox <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH RESEND 0/3] lib/string: search for NUL with strchr/strnchr
Date: Mon, 6 May 2019 12:46:42 +0000	[thread overview]
Message-ID: <20190506124634.6807-1-peda@axentia.se> (raw)

[With better address for Matthew?]

Hi!

I noticed an inconsistency where strchr and strnchr do not behave the
same with respect to the trailing NUL. strchr is standardised and the
kernel function conforms, and the kernel relies on the behavior.
So, naturally strchr stays as-is and strnchr is what I change.

While writing a few tests to verify that my new strnchr loop was sane, I
noticed that the tests for memset16/32/64 had a problem. Since it's all
about the lib/string.c file I made a short series of it all...

But where to send it? get_maintainer suggests no victim, so I'm aiming
at those that signed-off on the memset16/32/64 bug...

Cheers,
Peter

Peter Rosin (3):
  lib/string: allow searching for NUL with strnchr
  lib/test_string: avoid masking memset16/32/64 failures
  lib/test_string: add some testcases for strchr and strnchr

 lib/string.c      | 11 +++++++-
 lib/test_string.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 90 insertions(+), 4 deletions(-)

-- 
2.11.0


             reply	other threads:[~2019-05-06 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 12:46 Peter Rosin [this message]
2019-05-06 12:47 ` [PATCH RESEND 1/3] lib/string: allow searching for NUL with strnchr Peter Rosin
2019-05-06 12:47 ` [PATCH RESEND 2/3] lib/test_string: avoid masking memset16/32/64 failures Peter Rosin
2019-05-06 12:47 ` [PATCH RESEND 3/3] lib/test_string: add some testcases for strchr and strnchr Peter Rosin

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=20190506124634.6807-1-peda@axentia.se \
    --to=peda@axentia.se \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).