Re: [PATCH v3] uprobes: Use flexible array for xol_area bitmap

From: Oleg Nesterov

Date: Fri Nov 13 2026 - 16:32:22 EST


On 11/12, Rosen Penev wrote:
>
> The XOL slot bitmap has the same lifetime as struct xol_area, but it
> is currently allocated separately. That adds another allocation
> failure path and a matching cleanup branch without buying any extra
> flexibility.
>
> Store the bitmap as a regular array and allocate it together
> with the xol_area. The bitmap remains zero-initialized, while the
> allocation and error handling become simpler.
>
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>