lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <rf7i4y4zsm5yspnvebn6msj5r5dfvde3qvkti65fnhngcueqj3@landndtl6she>
Date: Tue, 8 Oct 2024 14:39:31 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Rik van Riel <riel@...riel.com>
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org, 
	kernel-team@...a.com, Alexei Starovoitov <ast@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, 
	Andrii Nakryiko <andrii@...nel.org>
Subject: Re: [PATCH] bpf: use kvzmalloc to allocate BPF  verifier environment

On Tue, Oct 08, 2024 at 05:07:35PM GMT, Rik van Riel wrote:
> The kzmalloc call in bpf_check can fail when memory is very fragmented,
> which in turn can lead to an OOM kill.
> 
> Use kvzmalloc to fall back to vmalloc when memory is too fragmented to
> allocate an order 3 sized bpf verifier environment.
> 
> Admittedly this is not a very common case, and only happens on systems
> where memory has already been squeezed close to the limit, but this does
> not seem like much of a hot path, and it's a simple enough fix.
> 
> Signed-off-by: Rik van Riel <riel@...riel.com>

It seems like a temporary allocation, so using kvmalloc* seems
reasonable.

Reviewed-by: Shakeel Butt <shakeel.butt@...ux.dev>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ