From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 81B2C29A9E9 for ; Tue, 6 Jan 2026 08:54:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767689698; cv=none; b=L6iFUyG8kzhEUxF+Mcj0QBfLqqGfL/5nZXivBaVgkNhNK56Agud3DVCibf1lBj0G5BgERUDUIxobxl+an5i62iE3RBD+r04ttW1t3UNE7t0tFBAPvsSNai6EncQEBx5n/refnYIE+7qCHKSWAsKdKeWtsJE2cvW/l2Sh1kwDkr8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767689698; c=relaxed/simple; bh=PudlsRY3cvqbF7BFTjTmjHdd6JA+NhtrLbq618w/VX0=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dZdAx5CW6zpTktYcLu3t8u978AwvahOkFkkbl/v1PGpLz5AzACp44EH+FTXTJeVUIQfNsRK0C07a3t9pZeKV2I+quqcK7ce1CegbRkQaDSmgOWfBXP6YfcrT6j3vEBVYRaO9DWPN417NvdCJBogR+WQNp/0iLaQykh5fTxfxlb4= 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=lZwDaoWC; arc=none smtp.client-ip=209.85.221.53 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="lZwDaoWC" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-42fb4eeb482so356262f8f.0 for ; Tue, 06 Jan 2026 00:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767689695; x=1768294495; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from:from:to :cc:subject:date:message-id:reply-to; bh=5VFZIns8Sps8uOV+Lb1ng4HSSezSvHcqd+Ga21Q6rkY=; b=lZwDaoWC0pLFrRoqBVNRfWw/rw97ABblYqrkhTHMC+N1lyTQ5JW/CT+h2HZjlhCiXL /4chn7qXE8Gsukd7D9w+MbECleYtCrZrLt6axk5b0NX40FsXcOaV/qFYVTjrcZn/0YgH BYMrMZHH+HKRtrg2kMSM6kSzvTZWAunT2JtZyWSLdHNaTJxXO8La4ThR24CQoMEX4LYG d+VpoP4ftWiUOlDIVCljKijAqdSqzXB4eAeQ8oCYoqe9ukBP2uu7bUscbAVGjT2MpASg GY1SjDsRg8Z65J3CxZTYNFlnhmAZIB4Cj/8puVaOkImWNuwPpz/ChiTG4Wwpd4V5U92q tVFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767689695; x=1768294495; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5VFZIns8Sps8uOV+Lb1ng4HSSezSvHcqd+Ga21Q6rkY=; b=TuzQD7vRHwSsluX5qCgZO3Q0j/iTYZ3SCa/YE0ZJdQK/dU9NmZYPBGUuKq/WqUeEfz qGI3JutLTr1Zc+azqfPm/OJPbciYi0zcSQ/xWowmOx3mDuIAnQ4uYdqUe4Ze+aooT6+0 yHuMQCCyF1eqWXJsO1YvZO5IjoqCKXSy4bB8YO5sVaevN0vlEXvPy+bF4IzWefnu1n+r hqu0ZYU2rwvySLKr/V9mhFNj+XDCzIfc/hnK+3QsCLwg0BL8vGdSk94OE3QK/eTuqILD FLR5Z1ALTN0aWsM3DNJ1JsEEABZeUnXrs/tTfMg/NdnCdYl+EJNgAbcQTrVShxEcCHAO MZ9g== X-Forwarded-Encrypted: i=1; AJvYcCXU6NiaaflVvLmFU8BCH1YMMLpjfNn83pFwQTInpt+AWa/gz6WHCmfdlK69QZ8TC4PjTcd52djbS3G48Pk=@vger.kernel.org X-Gm-Message-State: AOJu0YzP+HN2vPVClpdQvsIqa2zrGnTkqGqXcTjRG4oTs0qmyZLns5PB I+GQ8hLkzcGp89iW3UKEXSpiF9ujv7zR1ReMSGsfh665ozXV/oXe0oUz X-Gm-Gg: AY/fxX6G0nuos13TSH1w+ByII28LOu1reHApqESgVTmRxuF6OEaF1kLLgq5WnDLx1YN 6apUPrADxRu89AALXKL6KfKYZ++0qI+OS5/V3jBwm8VoNvf3DmGSLdhLny2oRvK3LZSA3bc1tlu GrNsPexyDPDY+kpemm2L6/0Zwmsr5gKAr0yarqcmKNnaCwDdFnATL4sJ11YjSx03SZsFrHL3j+M 2SOt+XDBX5P8PJ5Y/3Q+huc0TuUamAy5838a6N5ITWNBKKNOqcP//vai91jPdc5azqg7Yvvz/P0 fHQUnMokeHl2NH04HL7uHJ33mjCVS7Fa4iKaExCSNBRvGSIipFlGSVtfvtT8RI+7q8vqaOOotBq e7eiVYdPo3e/IEmN/R/z/Pns0SwnZkeaiyb6Uin7K0cEqeOyh3bhbpsl/WKn0uRCAFAuNjXNBsG 8= X-Google-Smtp-Source: AGHT+IH1yCSdo0wPw/fy27nRhjvHjHheYMekyT9VVsyxylC5DTp4JUsf3SZIIRTA7LE1dNPIlcouGw== X-Received: by 2002:a05:6000:200f:b0:431:b6e:8be3 with SMTP id ffacd0b85a97d-432bc9f6dccmr3306578f8f.38.1767689694636; Tue, 06 Jan 2026 00:54:54 -0800 (PST) Received: from krava ([176.74.159.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5ee243sm3075703f8f.31.2026.01.06.00.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 00:54:54 -0800 (PST) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Tue, 6 Jan 2026 09:54:51 +0100 To: Andrii Nakryiko Cc: Alexei Starovoitov , Menglong Dong , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Eduard , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , "David S. Miller" , David Ahern , Thomas Gleixner , Ingo Molnar , jiang.biao@linux.dev, Borislav Petkov , Dave Hansen , X86 ML , "H. Peter Anvin" , bpf , Network Development , LKML Subject: Re: [PATCH bpf-next v6 00/10] bpf: fsession support Message-ID: References: <20260104122814.183732-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-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jan 05, 2026 at 03:20:13PM -0800, Andrii Nakryiko wrote: > On Mon, Jan 5, 2026 at 2:33 PM Alexei Starovoitov > wrote: > > > > On Sun, Jan 4, 2026 at 4:28 AM Menglong Dong wrote: > > > > > > In current solution, we can't reuse the existing bpf_session_cookie() and > > > bpf_session_is_return(), as their prototype is different from > > > bpf_fsession_is_return() and bpf_fsession_cookie(). In > > > bpf_fsession_cookie(), we need the function argument "void *ctx" to get > > > the cookie. However, the prototype of bpf_session_cookie() is "void". > > > > I think it's ok to change proto to bpf_session_cookie(void *ctx) > > for kprobe-session. It's not widely used yet, so proto change is ok > > if it helps to simplify this tramp-session code. > > I see that you adjust get_kfunc_ptr_arg_type(), so the verifier > > will enforce PTR_TO_CTX for kprobe and trampoline. > > Potentially can relax and enforce r1==ctx only for trampoline, > > but I would do it for both for consistency. > > Yeah, I'd support that. It's early enough that this shouldn't be > breaking a lot of users (if any). > > Jiri, do you guys use bpf_session_is_return() or bpf_session_cookie() > anywhere already? np, we can still adjust, it's in PR that's not merged yet jirka