|
|
Subscribe / Log in / New account

Strict memcpy() bounds checking for the kernel

Strict memcpy() bounds checking for the kernel

Posted Jul 31, 2021 12:38 UTC (Sat) by Hello71 (subscriber, #103412)
In reply to: Strict memcpy() bounds checking for the kernel by pbonzini
Parent article: Strict memcpy() bounds checking for the kernel

no: https://gcc.godbolt.org/z/aP8GWb487

i don't understand what "running afoul of new members added to S" means anyways. it seems to me that in the vast majority of cases, when new members are added, one would want them to be copied too. otherwise, write memcpy(dest, src, sizeof(*dest) - offsetof(struct S, last_member) + sizeof(dest->last_member))?


to post comments


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