Re: [PATCH 1/2] mseal: Fix is_madv_discard()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Aug 2024 20:25:45 +0100 Pedro Falcato <pedro.falcato@xxxxxxxxx> wrote:

> On Wed, Aug 7, 2024 at 7:58 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > 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?
> 
> The kernel could erroneously block certain madvises (e.g MADV_RANDOM
> or MADV_HUGEPAGE) on sealed VMAs due to them sharing bits with blocked
> MADV operations (e.g REMOVE or WIPEONFORK).

Thanks, I updated the changelog.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux