|
|
Subscribe / Log in / New account

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


to post comments

Strict memcpy() bounds checking for the kernel

Posted Aug 1, 2021 13:23 UTC (Sun) by HenrikH (subscriber, #31152) [Link]

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.


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