Re: [PATCH v2 1/1] selftests/proc: use RSS in /proc/pid/smaps_rollup tearing tests
From: Andrew Morton
Date: Mon Nov 02 2026 - 12:13:05 EST
On Mon, 2 Nov 2026 07:43:17 -0800 Suren Baghdasaryan <surenb@xxxxxxxxxx> wrote:
> > :
> > : The patched userspace test passed all six cases on an existing
> > : x86-64 6.18.57 kernel, with a PID-namespace adjustment. That kernel
> > : predates ca5480fb53fa, so this checks selftest behavior, not the
> > : intended kernel's procfs changes. Separate syscall tests on that
> > : kernel confirmed the EXEC-merging and memlock failure cases.
>
> I'm guessing your bot was using personality() to make the tests fail.
> Again, I'm not sure we should handle such use case. Should we?
: The concern is pre-ARMv6 CPUs, where READ_IMPLIES_EXEC is set by
: default. Nobody needs to call personality() to encounter this there.
:
: We already addressed this in 0685630fdccb ("selftests/proc: make
: proc-maps-race work with READ_IMPLIES_EXEC"):
:
: https://lore.kernel.org/r/20260808200312.6326-1-kmehltretter@xxxxxxxxx
:
: That fixed split_vma(). Alternating PROT_EXEC in setup introduces the
: same assumption elsewhere: RW and RWX both become RWX, allowing adjacent
: mappings to merge. The parent then cannot find the expected three-page
: VMAs and the test fails during setup, before testing procfs tearing.
:
: Yes, the focused x86-64 check explicitly enabled READ_IMPLIES_EXEC to
: exercise this behavior. It wasn't tested on old ARM hardware. But I
: think we should preserve the existing support for those machines.
: Populating writable, then removing write permission from alternate
: mappings, preserves both RSS and the required VMA boundaries.