Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66536361DDC; Sat, 12 Sep 2026 09:25:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789205123; cv=none; b=piNHFvYBsTON/e/q+9dUXswvKp81NUCG1F69RwtAb/TDwQChD3MchM04y+F42m48lOFAVc+rxxQIzQBgvMVpb76LYw7NpeRNeE4iLKWQmuA5hTE4++oTMLUQG4IJRPIRKEhQxoBW6WR8/MnRoAHmSQYt+KG0lyBTzCArHI3jZJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789205123; c=relaxed/simple; bh=aoZ3h0sXKwKfrCjc6++Szf98VbS/hD3JBTWDvB3p29Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jpv2bXMjejRGHZ2GrCy6GzvOrBPWFpOocK87TgjwaW9YKZSqUYQnKE8BNIhVX0nqlBKVPKhoqYdXCw9vpLBe0dGpzPkjLvWmsV2hkTy4RDvsox1r6AWeLJCm4xE/BuIxmpo5VQOuPkj2E9T6scKdfokAovQZSIIvItVkZGyjmhQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v6/nxHn3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="v6/nxHn3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 219901F000FF; Sat, 12 Sep 2026 09:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789205122; bh=8yIPi7IGdYSYvqgDge8hQ3tGYhgziX+k9C8AfMc9eMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=v6/nxHn3UnYKy/ihTwYLVt7sPckfq0Pw+OKPs94aTmWHjZgFHICf2X1Fjnp4nmZZ6 kScGKz08Ulkj2uidi2tcWxTZOy8pqyOl6ymD4MUAAAV/3RTLADVyhynyCyFr1EHVk4 osiNvdp40zSNgR1fI/mJggxKhac2YlYOc1XdIDyA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Karl Mehltretter , Suren Baghdasaryan , Alexey Dobriyan , Jann Horn , "Liam R. Howlett" , Shuah Khan , Vlastimil Babka , Andrew Morton , Sasha Levin Subject: [PATCH 7.2 1754/1815] selftests/proc: make proc-maps-race work with READ_IMPLIES_EXEC Date: Sat, 12 Sep 2026 08:58:24 +0200 Message-ID: <20260912065730.164436800@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Karl Mehltretter [ Upstream commit 0685630fdccb62dcb0e3f44525a40578da5f6dc8 ] test_maps_tearing_from_split times out when READ_IMPLIES_EXEC is set. This happens by default on pre-ARMv6 CPUs, which lack no-execute support. split_vma() re-maps the first page with mod_info->prot | PROT_EXEC to make it differ from its neighbours. With READ_IMPLIES_EXEC the original mapping is already executable, so no split occurs and the test hangs waiting for the modifier child. Use PROT_NONE for the split mapping, which always differs from its readable neighbours. Link: https://lore.kernel.org/20260808200312.6326-1-kmehltretter@gmail.com Fixes: beb69e817246 ("selftests/proc: add /proc/pid/maps tearing from vma split test") Assisted-by: Codex:gpt-5.6-terra Signed-off-by: Karl Mehltretter Acked-by: Suren Baghdasaryan Cc: Alexey Dobriyan Cc: Jann Horn Cc: Liam R. Howlett Cc: Shuah Khan Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- tools/testing/selftests/proc/proc-maps-race.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/proc/proc-maps-race.c b/tools/testing/selftests/proc/proc-maps-race.c index 1026d8c400e1b..415eccb704684 100644 --- a/tools/testing/selftests/proc/proc-maps-race.c +++ b/tools/testing/selftests/proc/proc-maps-race.c @@ -490,7 +490,8 @@ static bool query_addr_at(int maps_fd, void *addr, static inline bool split_vma(FIXTURE_DATA(proc_maps_race) *self) { - return mmap(self->mod_info->addr, self->page_size, self->mod_info->prot | PROT_EXEC, + /* PROT_NONE differs from both readable neighbors. */ + return mmap(self->mod_info->addr, self->page_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0) != MAP_FAILED; } -- 2.53.0