[PATCH 3/3] RFC: net: apply __GFP_NOINIT to AF_UNIX sk_buff allocations
Kees Cook
keescook at chromium.org
Tue Apr 23 19:17:33 UTC 2019
On Thu, Apr 18, 2019 at 8:42 AM Alexander Potapenko <glider at google.com> wrote:
>
> Add sock_alloc_send_pskb_noinit(), which is similar to
> sock_alloc_send_pskb(), but allocates with __GFP_NOINIT.
> This helps reduce the slowdown on hackbench from 9% to 0.1%.
I would include a detailed justification about why this is safe to do.
I imagine (but haven't looked) that the skb is immediately written to
after allocation, so this is basically avoiding a "double init". Is
that correct?
--
Kees Cook
More information about the Linux-security-module-archive
mailing list