From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f43.google.com (mail-dl1-f43.google.com [74.125.82.43]) (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 6C96228726D for ; Thu, 26 Feb 2026 09:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772098309; cv=none; b=CSoouwh79RYxF/NKY2Yi7tb6MlKrx7qoHkv7FzsQdlE0gbExfXmsaMoHBtD5XfY2QQrvBJCpjvI+ZuJCzxOROIEiU/xZxyRz3VCYxoJLl+nk8s3Pe0powQwxp8/8x50bFJmfSQedH00YsRZC4bMV0CbcLgTW/dXnR20GlA1PbaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772098309; c=relaxed/simple; bh=oFo6+sTPLkyTSFK4Ji1vRa5rCyrSWUa3s+0eVqdj7KM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sEREa1hrtsL/ZyDfgisS8JgMUR7VCBWXRaBddr+A9SfxjRejAnjKlzR1B0aPc+CkOAt8K+TnX5GaLZiX09oJVB1sZMoY+mAUkGb8eFBNsJx7IoEEyoQipKhljNAm+JvE+kaJVYmE149HWqJrZTz9mcl3jT8mF0dxCuXXay39fOw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=chc6P9J6; arc=none smtp.client-ip=74.125.82.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="chc6P9J6" Received: by mail-dl1-f43.google.com with SMTP id a92af1059eb24-1271195d2a7so383705c88.0 for ; Thu, 26 Feb 2026 01:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772098307; x=1772703107; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0nm7W+k2pCT1m1taH8JfT56CcqjdfxYGmMvs5ermu7M=; b=chc6P9J6k5YDf5LOpQGnpJ5A6fIPmSogKJz813HXg7tz+DtrSYvsJ+h5seqUVe3zA/ fTvGC2KlPL0mz0DPlFeTFjqwVUWGmviIzDnsclKHFBKJB4y7z7LRgGhG4GYGRH72egOE OFlpZaZQQqAwl8yNhJWMNKXRXG38r7vPZn+2fwT0RFEUIj9kV4LFkIl/6xU65/JTTNxb gIqUPyjuItyhFoLALhrLm+v9T1b62HWe46/f3ELw53qDTOO5Pxf4efz2RHv3JY6MjTy1 DfZdWYhpdEcpzGzsh5XKau0CdY393LeEge/H9DbbNAertAH8cxpXvhw8Jcbouqih5owT ECUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772098307; x=1772703107; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0nm7W+k2pCT1m1taH8JfT56CcqjdfxYGmMvs5ermu7M=; b=Lgas5k/t7i12kauRC4U+gYKlDzUD6C1kQvBACQsDZStEx/ReMAzpppxDeIRT9Vu1VE lbpmatmpApnbK2MTEggnYnEp9bFDEi2yiVded/E0s3h1q9nFGNmKrxbnbdaWvbA8xIfm IMBGIJHDGHX333Ls8kOyZsdrQqfze1tmpIvJC/shtVoZtMg87flOzpnKmjjUd+mlRJt+ MO/H1CuiAV77MLLq57QbtYNGJOmUe6oO4ceT4yxbxYHADPqikBFRRBnwZT+Dl7eivBGr VbmfGZal/hml9ob8wEAKtVIdReybkjRjHHmHLDrbMBrRXaznvD1/tIktnPB5aMYkLcVQ HhfQ== X-Forwarded-Encrypted: i=1; AJvYcCUDDO1WY1gSfOMwyyfnVScBRMZxQDogiEVG3eu/g1+VEfdlAHPAqtZCvzEL8IgWvEAZGOzM40IyCFmAxrQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyEg2yoYkwK87cDWPjurdYVc4tJP3lX0LmyfWG2eELkwd/sWlFw S26pipq90v3Hg8kImH6BiMVWvYaCiXKD4HGV5OK4MVyUF7sPgwtUquwG X-Gm-Gg: ATEYQzwXKtzYTRWRju8PpPIDXhwC596/BdnjRsa4aRW/w9lTQfbOQ3fpeiBwIuUin+u XvyDQ1KBCbny7L1rTZPMjPrUgu7y5ziFqGDXwLtIexqH8MbqlmTDqzV8jsb193znDe4MDYv4fTe xhSVFBIE8sjjid2t8zbdNjPabow9BBzPcOukTwvpoXppPRxDIyOHZOignnrv0lsot9zvtSDk04M kWZ3o/apdWVHOATEwtk1GNB9z4MNoRYdvKobajiR8cNJ7rJQmXGV97NbOYhiGCtW38R7aW+D4hr aPwX3wocfNjiVk2puind9T2ugip1o5AcyPZt3fIxArTdFpUZUmFXiNAe8DV+iYqa33A+0659rWd BgShWTnwfklgooNU/8ust51Sw5DJ+7qs+VHj0YtUhgk1mnpHDi5pFMr2l5TW30e1+6lWFhZWHzh lNzW/d+xyccsuzf72nPNe6VF/ez0NPTYsCEdzLFi14Hgl0v/i7mNgafB4FMUBcBAFWKn5HmuxLZ n2MaSKYTrfjWfibl6Cxtqc= X-Received: by 2002:a05:7022:612:b0:119:e569:f274 with SMTP id a92af1059eb24-12786990d3fmr1837855c88.29.1772098307410; Thu, 26 Feb 2026 01:31:47 -0800 (PST) Received: from localhost.localdomain (108-214-96-168.lightspeed.sntcca.sbcglobal.net. [108.214.96.168]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12789a43c12sm1771904c88.14.2026.02.26.01.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 01:31:46 -0800 (PST) From: Sun Jian To: Andrii Nakryiko , Shuah Khan Cc: Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Sun Jian Subject: [PATCH v2 0/2] selftests/bpf: make probe_user safe for parallel runs Date: Thu, 26 Feb 2026 17:31:30 +0800 Message-ID: <20260226093132.437206-1-sun.jian.kdev@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The probe_user selftest attaches ksyscall hooks for connect() (and socketcall() on s390). Historically it could corrupt other tests calling connect() in parallel, causing flaky failures. This series confines the instrumentation to the current test process only, and then drops the serial restriction and removes the stale TODO. v1: Changes in v2: - Replace pid_map with a global .bss struct initialized via bpf_map__set_initial_value() before bpf_object__load(). - Add bpf_map__value_size() check for the .bss map to catch layout mismatch. - Move PID filtering into handle_sys_connect_common() (covers both connect() and s390 socketcall() paths). - Keep existing validation flow intact (bridge via tmp buffer). Tested: - cd .kselftest-out/selftests-bpf ./test_progs -t probe_user -v - cd .kselftest-out/selftests-bpf ./test_progs -j"$(nproc)" -t probe_user -v Sun Jian (2): selftests/bpf: probe_user: filter by pid to avoid cross-test interference selftests/bpf: probe_user: drop serial restriction .../selftests/bpf/prog_tests/probe_user.c | 30 +++++++++++++++++-- .../selftests/bpf/progs/test_probe_user.c | 13 ++++++-- 2 files changed, 38 insertions(+), 5 deletions(-) base-commit: 7dff99b354601dd01829e1511711846e04340a69 -- 2.43.0