Re: [PATCH 0/5] Add __alloc_size() for better bounds checking

From
Christoph Hellwig <hch@infradead.org>
Date
2021-08-19 09:10:21
Also in
linux-hardening, linux-kbuild, lkml
Reply to
Kees Cook, 2021-08-18
On Tue, Aug 17, 2021 at 10:08:36PM -0700, Kees Cook wrote:
Hi,

GCC and Clang both use the "alloc_size" attribute to assist with bounds
checking around the use of allocation functions. Add the attribute,
adjust the Makefile to silence needless warnings, and add the hints to
the allocators where possible. These changes have been in use for a
while now in GrapheneOS.
Can you explain how this attribute helps?  Should we flow it through
other allocating functions?
Thread (21 messages) 21 messages, 8 authors, last reply 2021-08-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help