Strict memcpy() bounds checking for the kernel
Strict memcpy() bounds checking for the kernel
Posted Jul 31, 2021 13:22 UTC (Sat) by CAFxX (guest, #153510)In reply to: Strict memcpy() bounds checking for the kernel by pbonzini
Parent article: Strict memcpy() bounds checking for the kernel
Seems like it can do even better than memcpy, in that it can handle cases where memcpy would waste work: https://godbolt.org/z/aa31McEjx
Posted Aug 1, 2021 13:23 UTC (Sun)
by HenrikH (subscriber, #31152)
[Link]
Strict memcpy() bounds checking for the kernel
replacing that with a pure memset (yes I know that your example didn't clear all the members, but still) resulted in even less code.