This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196)


On 05/22/2018 04:12 PM, Andreas Schwab wrote:
On Mai 22 2018, Florian Weimer <fweimer@redhat.com> wrote:

My test machine had an L2 cache size of 1 MiB.

Then you should be safe, a 64K mempcpy is enough to trigger it.

Our memcpy has:


L(512bytesormore):
#ifdef SHARED_CACHE_SIZE_HALF
        mov     $SHARED_CACHE_SIZE_HALF, %r8
#else
        mov     __x86_64_shared_cache_size_half(%rip), %r8
#endif
        cmp     %r8, %rdx
        jae     L(preloop_large)
        cmp     $1024, %rdx
        ja      L(1024bytesormore)

And with the original reproducer, we wouldn't hit preloop_large, where the bug is.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]