From nobody Mon Feb 9 10:27:48 2026 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (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 2BD12348890 for ; Wed, 24 Dec 2025 13:10:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581809; cv=none; b=Fd4aiM9rI7OgmEeCylfzMgOFpJiu2AcD84yBhoXcCAnMIjPMsTvP72sk1A+7vo8JPpRP4GmQ5piAhBlKOuIoYCvGi6cRFowDqjKacQ8S2zrcN88XWh87cOh2+NVLBO1VP4lzxV0QnItOqJzpLrKZbOGJYauPig0EMeYfzr/BQRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581809; c=relaxed/simple; bh=ARq0/QucFj/sxPqr+22ybRos7rUcjBBi5nq/Y4PoAvU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cJCp/5AEXZGjj0ejbjkyZB6dIs8/+w4nh83qgrfJauMy5PMYWwcA/xpSG9EO70bfyIwD81JrtaCx4SGn+Kxe8F+GLY9wCgH4O1DItpOU2d8whfqoGWaVnIXneqt6xlgxw5fixe1iAVhWGC1NrP2+gAjHnlYBkY75W8laU/r5wgw= 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=CLba7lP5; arc=none smtp.client-ip=209.85.210.196 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="CLba7lP5" Received: by mail-pf1-f196.google.com with SMTP id d2e1a72fcca58-7f0db5700b2so5301680b3a.0 for ; Wed, 24 Dec 2025 05:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766581806; x=1767186606; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ki8yj47Ksf2sOkp6JBKCA9cB1ptX2Wx6sb0cvY7RlMA=; b=CLba7lP5VtaP3jg1Zy6VGKj+qXkZLv2HZF6wTH5Gx89eYoaKF0H8yXxGIRJt0mpXh9 3nKjeer/OTbF5GqczyIJxslYO4lRGRJ6ditMguttBKCAazkSOwixtLf4hxTpBWm0ilqK xmT0YfaxIe0xWDz40sftNxLYOxVhbqxazqKzt8U0eM++PbjEmMmAFStasJaUrYFMtDA8 tkc+UVy5dpf5zkv6qc8FiVlf+9bgophfRUZ1pI5H1UJBRrwFUrhL2I3wTK9b7bajPqpV OK1TkjHR0SeVsceQ9Q+APS2z5QVlVl+6cYZZaQMT1N+UvjwxkzD2ABmINL9jM29yL+Xr rq0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766581806; x=1767186606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ki8yj47Ksf2sOkp6JBKCA9cB1ptX2Wx6sb0cvY7RlMA=; b=XmYv1bqRsWGb8egVf2Eyrhldvmgo+u+S9cF+KTA1S1fcWCzRsIsVOWGcDp3jPaF55N OdgQb6i71yGz6cWtWtsXigMhpd9PW5WgxCeNHQTCTbZ5pmoFKapeJYPH8YWQ/ENq3ei0 lXNe6/s/o3fKL1NT1PWyr7h+bF1F2HNlz+4ZuLbSiSJFahmNA9tsGHHuGbnEsDcHHyJs AhZQRus9Kxfcw9ZegoMa5JbQk1pr3Jh3AjxRW6JKQQKd9HS+bGWSFijp0Isbj80RHWVP HFnxvbfXaix4f2DU8FIgClm0wLDJqEVfDR2NAUSD8/sYaKGdS/5OdI/SQa4N11z7sQAB mkiA== X-Forwarded-Encrypted: i=1; AJvYcCXkhQ50NuN3ubPb7Ao5OAmrXTkraRtEHWK80OMtEFp+4V7FIshDEwz8POchpp4VqF8aCtqusC7NHazCEvo=@vger.kernel.org X-Gm-Message-State: AOJu0YzuPq420MlLkFPCXotOXppe5QARhSdaiawl+Cm/5q4pSUlt8v21 sBtL5Jif7fBE2N83Hs/DUVbcOYXTXm9AGflYMfxsJWCyJ6kU66iUwOCA X-Gm-Gg: AY/fxX4xGWajNY246tUXfdYzTSSa74ovrpVnCCv60Nc/dzJEEWQy2M89RxVAA9wVp/d XmkMYj8FqPyUN1EAqkPtPJxMXOxRvnksK30qotfoX40WL6RbcnzAXbaFQ+U4G/p1TCyZlvmi+bZ Ib10DS/Rpx6EZjlBKPEh4U4gX+kxzb3bwKzjcWycNLYuJzbJBBdAb9Mm8NBOgUQ/bboE92anXED FiKo4NU6Z/5R3QvfBcy1ZflW1pi4dkh5pgRQ4tP2l5RKEHaPXpyNh/OlZERGkhSHzEF751hxJDI C96OQkJ3LwMSAbIsNeJGZZRrYySCbHLJ2XoEtzMEa0AJsno8E6reM6eHHD4zVmNuLjvni9ct8fh 48clnkTP+brn4DQR/yMaa9cgd1Y3qM4bw1If1PKwg71AKFIrcB3h5K6aaTFSJpt/+X3FJZpmBxS Bkd0E+YdTXfSLVQuWATg== X-Google-Smtp-Source: AGHT+IEsQ3y6BfEUuR6gPcWe8dQ3+JU2VN7JGTtTSLSdiP5hgCSTgDCloIJCRNjxPEDqHrTRUmPDCA== X-Received: by 2002:a05:6a00:2c85:b0:7ac:3529:afbb with SMTP id d2e1a72fcca58-7ff648e9b90mr15231794b3a.20.1766581806344; Wed, 24 Dec 2025 05:10:06 -0800 (PST) Received: from 7950hx ([160.187.0.149]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7ff7dfac28fsm16841173b3a.32.2025.12.24.05.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Dec 2025 05:10:05 -0800 (PST) From: Menglong Dong X-Google-Original-From: Menglong Dong To: ast@kernel.org, andrii@kernel.org Cc: daniel@iogearbox.net, martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org, davem@davemloft.net, dsahern@kernel.org, tglx@linutronix.de, mingo@redhat.com, jiang.biao@linux.dev, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v5 10/10] selftests/bpf: test fsession mixed with fentry and fexit Date: Wed, 24 Dec 2025 21:07:35 +0800 Message-ID: <20251224130735.201422-11-dongml2@chinatelecom.cn> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251224130735.201422-1-dongml2@chinatelecom.cn> References: <20251224130735.201422-1-dongml2@chinatelecom.cn> 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" Test the fsession when it is used together with fentry, fexit. Signed-off-by: Menglong Dong --- .../testing/selftests/bpf/progs/fsession_test.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/fsession_test.c b/tools/test= ing/selftests/bpf/progs/fsession_test.c index 5630cf3bbd8b..acf76e20284b 100644 --- a/tools/testing/selftests/bpf/progs/fsession_test.c +++ b/tools/testing/selftests/bpf/progs/fsession_test.c @@ -180,3 +180,19 @@ int BPF_PROG(test11, int a, int ret) *cookie =3D 0; return 0; } + +__u64 test12_result =3D 0; +SEC("fexit/bpf_fentry_test1") +int BPF_PROG(test12, int a, int ret) +{ + test12_result =3D a =3D=3D 1 && ret =3D=3D 2; + return 0; +} + +__u64 test13_result =3D 0; +SEC("fentry/bpf_fentry_test1") +int BPF_PROG(test13, int a) +{ + test13_result =3D a =3D=3D 1; + return 0; +} --=20 2.52.0