mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] lib/string: search for NUL with strchr/strnchr
@ 2019-05-06 12:42 Peter Rosin
  2019-05-06 12:42 ` [PATCH 1/3] lib/string: allow searching for NUL with strnchr Peter Rosin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Rosin @ 2019-05-06 12:42 UTC (permalink / raw)
  To: linux-kernel; +Cc: Peter Rosin, Matthew Wilcox, Andrew Morton, Linus Torvalds

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-06 12:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 12:42 [PATCH 0/3] lib/string: search for NUL with strchr/strnchr Peter Rosin
2019-05-06 12:42 ` [PATCH 1/3] lib/string: allow searching for NUL with strnchr Peter Rosin
2019-05-06 12:42 ` [PATCH 2/3] lib/test_string: avoid masking memset16/32/64 failures Peter Rosin
2019-05-06 12:42 ` [PATCH 3/3] lib/test_string: add some testcases for strchr and strnchr Peter Rosin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®