[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250424215729.194656-1-peterx@redhat.com>
Date: Thu, 24 Apr 2025 17:57:27 -0400
From: Peter Xu <peterx@...hat.com>
To: linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: Mike Rapoport <rppt@...nel.org>,
James Houghton <jthoughton@...gle.com>,
David Hildenbrand <david@...hat.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
peterx@...hat.com
Subject: [PATCH 0/2] mm/userfaultfd: Fix uninitialized output field for -EAGAIN race
When discussing some userfaultfd issues with Andrea, Andrea pointed out an
ABI issue with userfaultfd that existed for years. Luckily the issue
should only be a very corner case one, and the fix (even if changing the
kernel ABI) should only be in the good way, IOW there should have no risk
breaking any userapp but only fixing.
This issue also should not matter if the userapp didn't enable any of the
UFFD_FEATURE_EVENT_* feature.
The first patch contains more information on the issue and the fix. The
2nd patch is a test case I added which would fail on old kernels (including
current latest branches) but will start working after patch 1 applied.
Thanks,
Peter Xu (2):
mm/userfaultfd: Fix uninitialized output field for -EAGAIN race
mm/selftests: Add a test to verify mmap_changing race with -EAGAIN
fs/userfaultfd.c | 28 ++-
tools/testing/selftests/mm/uffd-unit-tests.c | 203 +++++++++++++++++++
2 files changed, 225 insertions(+), 6 deletions(-)
--
2.48.1
Powered by blists - more mailing lists