This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] S390: Do not clobber r13 with memcpy on 31bit with copies >1MB.
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 19 Jul 2016 10:12:19 -0300
- Subject: Re: [PATCH] S390: Do not clobber r13 with memcpy on 31bit with copies >1MB.
- Authentication-results: sourceware.org; auth=none
- References: <5786162A.7080605@linux.vnet.ibm.com> <578DC81E.7000209@linux.vnet.ibm.com>
Sorry Stefan, for some reason I missed this thread. I think it is
ok for 2.24.
On 19/07/2016 03:26, Stefan Liebler wrote:
> PING.
>
> If there is no objection, I'll commit this patch the next days
> as it is an s390 related regression compared to glibc 2.23 release.
>
> On 07/13/2016 12:21 PM, Stefan Liebler wrote:
>> Hi,
>>
>> If the default memcpy variant is called with a length of >1MB on 31bit,
>> r13 is clobbered as the algorithm is switching to mvcle. The mvcle code
>> returns without restoring r13. All other cases are restoring r13.
>>
>> If memcpy is called from outside libc the ifunc resolver will only
>> select this variant if running on machines older than z10.
>> Otherwise or if memcpy is called from inside libc,
>> this default memcpy variant is called.
>> The testcase timezone/tst-tzset is triggering this issue in some
>> combinations of gcc versions and optimization levels.
>>
>> This bug was introduced in commit 04bb21ac93e90d7696bcaf8febe2b2dd2d83585a
>> and thus is a regression compared to glibc 2.23 release. It should
>> be committed before glibc 2.24 release.
>>
>> This patch removes the usage of r13 at all. Thus it is not saved
>> and restored. The base address for execute-instruction is now stored
>> in r5 which is obtained after r5 is not needed anymore as
>> 256byte block counter.
>>
>> Okay to commit before release 2.24?
>>
>> Bye
>> Stefan
>>
>> ChangeLog:
>>
>> * sysdeps/s390/s390-32/memcpy.S (memcpy): Eliminate the usage
>> of r13 as it is not restored in mvcle case.
>