Re: [PATCH 2/2] pstore: reject persistent RAM zones too small for the buffer header

From: Kees Cook

Date: Mon Sep 21 2026 - 19:16:32 EST


On Tue, Sep 22, 2026 at 12:38:24AM +0200, Andrea Parri wrote:
> (Dropped anton.vorontsov@xxxxxxxxxx and john.stultz@xxxxxxxxxx from Cc,
> both bounced.)

AFAICT, Anton isn't involved any more. But, hey John, you need a .mailmap
entry. :)

> > I wonder if it should return ENOSPC instead, though?
>
> Fair point: nothing branches on the specific errno, but ENOSPC matches
> the "doesn't fit" convention used elsewhere in ram.c, while EINVAL is
> otherwise reserved for malformed config values. I'll send a one-line
> patch on top of 1b30df8662ac switching it, unless you'd rather fold it
> in yourself.

I'm happy to fold it in. Thank you!

-Kees

--
Kees Cook