Re: [PATCH 1/2] mseal: Fix is_madv_discard()
From: Andrew Morton
Date: Wed Aug 07 2024 - 14:58:32 EST
On Wed, 7 Aug 2024 18:33:35 +0100 Pedro Falcato <pedro.falcato@xxxxxxxxx> wrote:
> is_madv_discard did its check wrong. MADV_ flags are not bitwise,
> they're normal sequential numbers. So, for instance:
> behavior & (/* ... */ | MADV_REMOVE)
>
> tagged both MADV_REMOVE and MADV_RANDOM (bit 0 set) as
> discard operations. This is obviously incorrect, so use
> a switch statement instead.
Please describe the userspace-visible runtime effects of this bug?