From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9B8A27603C for ; Fri, 24 Apr 2026 20:16:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777061810; cv=none; b=fg0YaHm1CNWisKtjkyzbyS3wq56JcLkAFYvzjeIIQ9XIx8hjeif2Vy1Mkb7QV0ZQ/2mJX43Crkz+2TiAuZfmh4vuWJJCRiOhvnmHJmsVZxJoxHMYmz2rNsLtzz15skrzfcOtnPv73Z0HWl+8mxpFyRWkr6JlXbeaaSxWAlYkHEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777061810; c=relaxed/simple; bh=0ATpinyhZLa/pz07NKPfrYEC8Ia8kxnpRpRKn3rb580=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=KBxt0PyEzjDjp/hPUwOIX8w9im6dGC2w/UbXBwzF0chB6cl+p9IE6duYrzZbD71pQVkGZBEkxkjqtoczK66GasemyvnU0cYiG75SQk4AULMzFFeRh7UBZTQpOY7cnL8YvJvpcdR4rliJy+yB6m/BuRvFGmD7zxAvFzWd6dAM/aI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=etsalapatis.com; spf=pass smtp.mailfrom=etsalapatis.com; dkim=pass (2048-bit key) header.d=etsalapatis-com.20251104.gappssmtp.com header.i=@etsalapatis-com.20251104.gappssmtp.com header.b=y+Dujubp; arc=none smtp.client-ip=74.125.82.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=etsalapatis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=etsalapatis.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=etsalapatis-com.20251104.gappssmtp.com header.i=@etsalapatis-com.20251104.gappssmtp.com header.b="y+Dujubp" Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-2d868d014a5so8147597eec.1 for ; Fri, 24 Apr 2026 13:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsalapatis-com.20251104.gappssmtp.com; s=20251104; t=1777061808; x=1777666608; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AcW55QyV6ypNR4eKSM4ztqICyZlAQ9U3yzYxTyxBMPM=; b=y+DujubpLwPQqoSbCuGGhEhcYiKlmnsZp0a+B0gyWvQOB12O/igklI8Q8JTKzCQKeT hDw5tR4Zs971bl0aYvVVkO2kuj6tkwHgatba+Ez7POl6FB6qir43SiWBxzYLYxowxthi Mr1ypFodz89NEA8Tft3yAw28CSlBQ5fG8B3QxG3yK3HOZxT5OD+u02v7RC8v7HUzvla6 o6zFkU48GO7Vajk8EV0ebUx4jm+Oidg9FzKtaGlt9pbDE+w1lbZSOlyQKMGtTQg45MG6 R0DC33gbpM7xmZWp+rFQz6AKxd+PE9uPxzwCuPdwrCKNBwN8hVRrxRiFd//h5wQvi8XR Zbpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777061808; x=1777666608; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AcW55QyV6ypNR4eKSM4ztqICyZlAQ9U3yzYxTyxBMPM=; b=rm+JkkYpwMD9QHaehmsCpa8JzAq37r/JJrMsBG0hyZUBsa/rzJSy06ST4AHGDusFSL K+OpT+/lFCT6pqRD34hUSv47o5eOICA3AHap6BtN/niSk7V0/un5dDUbJl/6o9MpLPKT zdKdT9zSGbO7dJ21j2qUBuxUmr1L9/uvGL0gyt4dWmJhUetNgW0bN/xPbHtlBRQePOaM uldyAuK+DRChdf39JWEr4Zzxb0KvEgN+v/DNbR3popIOjBQA7tBVaO+zgOV3QXnkBymJ RhohRtAp1yUC9bp2tsbZjlqUygzdvP80X2opAOvS7dly3OaSQaiVSwj0fDyxE83oYAgj kYBw== X-Forwarded-Encrypted: i=1; AFNElJ9jsGrqm0SLSEZPF64zq2Xyis5YtGLMfEQ0jXYj1hN2g5tqN2c6dlDREWgMr2OOxgx7IZDrCyUhvhbvjBM=@vger.kernel.org X-Gm-Message-State: AOJu0YyBcJc01DIck0q/CSCmSiYywprXTWF44trLhrO3xBS1kYmlVOHo OqQPPOYrIK8XltA3cOTCpGCbWi0+4I2BOf22OXRhpVHjWpIzDGhSkDX9ujktN3FWlgY= X-Gm-Gg: AeBDieu0dCMJ9KBt9bRyBs8iLGwquYVd5JiZVemR6wn2O37THvnq44wSF5hJwR8Qh6Y wAuMftlQBWh/10gNUCPOnc8LxWCWXMiXBMmoYwgxpyclndX6Prw8aPLttix9Xwfv5elOhe1yN/0 0I0IZFPcy1iH9V1sxpRYmc7GxxV2Uxq2sBfuG+IO1sdAoxF1Orf4TmtsWxFJ7Nf+BRJ/B91FKCM 5tljhuRLTL9FSRBl6zG8pxLkqETDSDlAWj3gTh/Usree8HuWN1p7kqdadqevgpiU19Ry8HH2Tgg DiPWECHOwUX0Xg9b0u8enkfrYFsSBZjUznNF2zV89t/2/GD9Nr3eBT8388/bCLhBH73qQhVPIJd JWLWD4NMIfkYhqd7cDXYiN4rV3rl2H7sadJzzaDnb6TCOr9YGFuxihxaeGzFcIDEKNmcy9KmmC2 2sAoGm88C5EMO9Gg== X-Received: by 2002:a05:7301:fd81:b0:2be:80c4:2c8c with SMTP id 5a478bee46e88-2eada6d6576mr1907496eec.8.1777061807663; Fri, 24 Apr 2026 13:16:47 -0700 (PDT) Received: from localhost ([2620:10d:c090:600::9ef]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2e53ccce0f5sm33350443eec.17.2026.04.24.13.16.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2026 13:16:47 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 24 Apr 2026 16:16:44 -0400 Message-Id: From: "Emil Tsalapatis" To: "Ihor Solodrai" , "Emil Tsalapatis" , "Weiming Shi" , "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" Cc: "Martin KaFai Lau" , "Eduard Zingerman" , "Song Liu" , "Yonghong Song" , "John Fastabend" , "KP Singh" , "Stanislav Fomichev" , "Hao Luo" , "Jiri Olsa" , "Barret Rhoden" , , , "Xiang Mei" Subject: Re: [PATCH bpf v2 2/2] selftests/bpf: Add test for arena VMA use-after-free on fork X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260411112944.1455470-1-bestswngs@gmail.com> <20260411112944.1455470-3-bestswngs@gmail.com> <635af96f-3a8e-4d39-9df5-8c66945bf9e5@linux.dev> In-Reply-To: <635af96f-3a8e-4d39-9df5-8c66945bf9e5@linux.dev> On Fri Apr 24, 2026 at 4:01 PM EDT, Ihor Solodrai wrote: > On 4/11/26 10:33 AM, Emil Tsalapatis wrote: >> On Sat Apr 11, 2026 at 7:29 AM EDT, Weiming Shi wrote: >>> Add a selftest that reproduces the arena VMA use-after-free fixed in >>> the previous commit. The test creates an arena, mmaps it, allocates >>> pages via BPF, forks, has the parent munmap the arena, then has the >>> child call bpf_arena_free_pages. Without the fix this triggers a >>> KASAN slab-use-after-free in zap_page_range_single. >>> >>> Signed-off-by: Weiming Shi >>> --- >>> .../selftests/bpf/prog_tests/arena_fork.c | 86 +++++++++++++++++++ >>> .../testing/selftests/bpf/progs/arena_fork.c | 41 +++++++++ >>> 2 files changed, 127 insertions(+) >>> create mode 100644 tools/testing/selftests/bpf/prog_tests/arena_fork.c >>> create mode 100644 tools/testing/selftests/bpf/progs/arena_fork.c >>> >>=20 >> The test doesn't work for me as advertised. Does it fail for you under >> vmtest without patch 1/2? >>=20 >> The test doesn't fail on base vmtest for me, even without the previous p= atch, >> because KASAN isn't turned on for the CI. With KASAN the test triggers >> the splat just fine.=20 >>=20 >> Should we maybe turn on KASAN and panic_on_warn by default on vmtest? > > Hi Emil, > > I just noticed this message. BPF CI has KASAN enabled by default > (disabled only on s390x) for almost a year now [1]. Did the test fail > locally for you, but not on CI? > > [1] https://github.com/kernel-patches/vmtest/commit/5db11d295888c3f048021= a15c3a8a9875c8612c3 Hi Ihor, My bad, I misspoke - I thought the CI was running the standard vmtest confi= g. Since we're running KASAN on the CI it's not an issue that the vmtest config doesn't have it on by default. > >>=20 >>> [...] >>=20