Re: [PATCH v2 8/8] vdso: Modify getrandom to include the correct namespace.
From: Jason A. Donenfeld
Date: Mon Sep 23 2024 - 19:12:29 EST
On Mon, Sep 23, 2024 at 03:19:43PM +0100, Vincenzo Frascino wrote:
> - params->mmap_prot = PROT_READ | PROT_WRITE;
> - params->mmap_flags = MAP_DROPPABLE | MAP_ANONYMOUS;
> + params->mmap_prot = VDSO_MMAP_PROT;
> + params->mmap_flags = VDSO_MMAP_FLAGS;
The code that's being deleted is meaningful and descriptive. The code
that's being added is confusing. What on earth is a vdso mmap flag? Not
only is it indirection, which makes it harder to understand, but its
indirection through a meaninglessly generic name that suggests to the
user there's some additional property of the vdso or mmap or both that
would imply a specific flag for these general things. In reality, the
thing in question is about what getrandom.c uses.