On Mon, Jun 08, 2026 at 12:06:35PM +0100, Lorenzo Stoakes wrote:
> But instead of overloading user_addr to indicate all kinds of things, instead
> make life easier by actually breaking things out.
> 
> Like:
> 
> enum alloc_context_type {
>       KERNEL_ALLOCATION,
>       USER_MAPPED_ALLOCATION,
>       USER_UNMAPPED_ALLOCATION, // Maybe? Do we ever?
>       /* Perhaps some other states we want to encode? */
> };
> 
> struct alloc_context {
>       ...
> 
>       enum alloc_context_type type;
>       unsigned long user_addr; // Only set if type == USER_ALLOCATION
> 
>       // Maybe something suggesting context or whether we init before in some
>       // cases?
> };

Ugh, please, no.  As I suggested last time I commented on this
trainwreck of a series, lift the zeroing functionality from
alloc_frozen_pages() into its callers.

Reply via email to