|
|
Subscribe / Log in / New account

Strict memcpy() bounds checking for the kernel

Strict memcpy() bounds checking for the kernel

Posted Jul 31, 2021 13:27 UTC (Sat) by jengelh (guest, #33263)
In reply to: Strict memcpy() bounds checking for the kernel by pbonzini
Parent article: Strict memcpy() bounds checking for the kernel

Yes, it will also optimize for uint8_t. You just need enough bytes overall (looks like >= 8) to make it worthwhile for gcc to switch to SIMD-based copying.
For bitfields there is a bit of a problem, for which I filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101705 .


to post comments

Strict memcpy() bounds checking for the kernel

Posted Aug 3, 2021 2:22 UTC (Tue) by willy (subscriber, #9762) [Link]

Of course, the kernel disables SIMD so that it doesn't use the XMM/YMM registers, and thus they don't have to be saved/restored at system call time.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds