This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH]: S390: Fix handling of needles crossing a page in strstr z15 ifunc-variant. [BZ #25226]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Stefan Liebler <stli at linux dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 27 Nov 2019 10:33:35 +0100
- Subject: Re: [PATCH]: S390: Fix handling of needles crossing a page in strstr z15 ifunc-variant. [BZ #25226]
- References: <56bab444-9d67-c9a3-6117-c8a94d024075@linux.ibm.com>
* Stefan Liebler:
> if the specified needle crosses a page-boundary, the s390-z15 ifunc
> variant of strstr truncates the needle which results in invalid
> results.
>
> This is fixed by loading the needle beyond the page boundary to v18
> instead of v16. The bug is sometimes observable in test-strstr.c in
> check1() and check2() as the haystack and needle is stored on
> stack. Thus the needle can be on a page boundary.
(GNU style is “check1 and check2”, no parentheses.)
> check2 is now extended to test haystack / needles located on stack, at
> end of page and on two pages.
The test change looks okay to me. I haven't reviewed the assembler
change. I think you can commit that as the architecture maintainer.
We will need help from your team with testing the downstream fix. Do
you think we should fix this proactively in Red Hat Enterprise Linux 8.1
as well? It received the backport of the new strstr implementation,
too.
Thanks,
Florian