From nobody Tue Dec 2 01:51:44 2025 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 9E28E25EFAE for ; Thu, 20 Nov 2025 20:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763671639; cv=none; b=ucv2BZsFSisy+EvE0a3ZbXgj0OkUId3ARgaYEBHZFBPf2VCFYX/LMIvo+B57JciDhC+wtucxWP71qt+Q+69lTw6Fyy99m3XdQGgJfI5oJj6mPNaGRmvllKraeXkntJNxvUQLrAmmF4ERLC8C0zZkPP5R3bmq0biORof7tHHKLFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763671639; c=relaxed/simple; bh=2K94P+UBEZaujybTCq3ooUqrsVw+dPtWDCc/H848xlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NrKHvE3DC0SXgbropUenLKgeU+SA1Wsz77eo42xA1Xc5lRwnO0BhiRqmkEjyCNTz+etKT3CVSALqO/BTQku2JbI/hRBW/AMl2ARxGwcHgoPxN68Wh+eHGZNCGs9XiHF0tL2N4Rhp+54+8XcRbjolSBBOXa82vYek8qSHeD6X+Vc= 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=GpuaaBrE; arc=none smtp.client-ip=209.85.210.176 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="GpuaaBrE" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-7a9c64dfa8aso1096296b3a.3 for ; Thu, 20 Nov 2025 12:47:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763671637; x=1764276437; 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=mRzELrjyv1B9QTTtAz67bzAu36xbnz7eTr+g1Rji/MQ=; b=GpuaaBrE8zT6xpj3xVVjsmQXnQFrHurpo7aCfuNkd9qOi6FhSsI6JN9/zYX2Lmn5JQ UgVls2JGKMMCyRmX4Dm/GgJBDIcB7ZswE4J3tVhS77idj1DILHNuweCyboE6MLm7cGrY oUDqW87rYuF+0ElFsa9nShfFQzYa9PSir+kPKMlAvR8mbDPxkM4O8y1EQXNEGXp4xjUm RGBU0u84wiQe46k59xjH5C0mdDv9zmO2TdPtJqdLkn2uyiPcYpxb7xEwRZssX3j8vg4j t5dAY5hp7IURNQLiO1z74tV+1Hnc8SwKuAfV0r32TDlBlCwMgTxyHuDG6LddZ8HIHoMT UiwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763671637; x=1764276437; 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=mRzELrjyv1B9QTTtAz67bzAu36xbnz7eTr+g1Rji/MQ=; b=lArs8n/iNgI3DEvILBeteBwqxj7tL0yzbHt65XaICk/k+OwFKXR1Ng0aKAFnw2WhDC eN2l2CU9mLsAwfoViLlXZoTk99qpJSg8MIkvBaJM2psYW8hlXdB1zORP4yfcWgReuI9s 9ghaD21uMXXURASOupefSLhqM0KIrRhgqJ5DEJdTo9Owos7z78RuUvQMPC6wgl85ZTTM 2HUuh5D9jCEP4qUEp8f4Q2Un1mPJkdSwjyQGunDhWaEx5YTAyttW4eP4wrgB6cW3aCKK h2f6deTx+NnAEbKXnsL2egFbhiRPZy4mQSlFcOelE6aFTC8Gi7GcdCjUUILQFCoAwr0R GPSA== X-Forwarded-Encrypted: i=1; AJvYcCX9MdwCrx3bVq8K8UtIL6khUvj4D3ocRaNJrO0K8OvTRgzoBmUTnwCf9glJfoK7rXnQxppPo5UGV5V66P8=@vger.kernel.org X-Gm-Message-State: AOJu0YzQBtML0qcBnM5GqjMMjZJmPwzmWJKqKiWRJcK9hVSfQQKxh8Av 05RzDqAHSo7hzpIVGE88WwQhgZFw4DNi9JJurovfCf/GugmSCjyhlPwj X-Gm-Gg: ASbGnctqBol7G9hPaPpewzyKchAUoyO/aFG+jR7iEmEtG1xSqaz2HPVxaKHcHzEICWQ 5rk4pazoZuddikfN1mwB2mjyoKZtcI9q2+1MxV4+8R68xHTKWhibtiGT+YymRH2hN90qeMvLKvt 1etMzUNpn9d7EWiFQN+7K1WcF3cIBs7vOmh0fL2POR5Q2niPnB1ezq6Lq+mEBlx9CGtL487OsKU u6FFhiqOfoolGkzZQfNY/3BOtkKAt7ysv24OGkkn7trsM0A9OPmiYD8bTNRXrI5omOlb5DPCyOX m7SwvWQ95mE8H0hc76469WU2EuV1TxS5i0ajALD7pYNkOskHMgc+ruD8iThb/L0c1v1FE2rlrNI kTIeNKN+RqdS0X03kZBSSuimeAUl/kIXn8IwpOLa5U6+lZRSLWvCq82mrTkMNcxPrE9pF6Hwmvb UZwQ7GoSL68YnWKj5xPc4DzwpzXsPw7T5DYPXm3i5sxc4H5WEGXtwas2LJ3SYILRXuZ6PIjxvks +nlAQ== X-Google-Smtp-Source: AGHT+IF/2lFZY3ga9vjA+9LkLYe1dsMZr1LawsGKiZs65uOepoeLssESml+r/W4m4LoCypHg3vBx8A== X-Received: by 2002:a05:6a00:2e10:b0:7a4:f552:b524 with SMTP id d2e1a72fcca58-7c3f0d637d6mr5296963b3a.28.1763671636871; Thu, 20 Nov 2025 12:47:16 -0800 (PST) Received: from prakrititz-UB.. ([119.161.98.68]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7c3ed37ab3fsm3757537b3a.22.2025.11.20.12.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 12:47:16 -0800 (PST) From: Nirbhay Sharma To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org Cc: 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, skhan@linuxfoundation.org, david.hunter.linux@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Nirbhay Sharma Subject: [PATCH v2] bpf: Document cfi_stubs and owner fields in struct bpf_struct_ops Date: Fri, 21 Nov 2025 02:16:21 +0530 Message-ID: <20251120204620.59571-2-nirbhay.lkd@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: 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" Add missing kernel-doc documentation for the cfi_stubs and owner fields in struct bpf_struct_ops to fix the following warnings: Warning: include/linux/bpf.h:1931 struct member 'cfi_stubs' not described in 'bpf_struct_ops' Warning: include/linux/bpf.h:1931 struct member 'owner' not described in 'bpf_struct_ops' The cfi_stubs field was added in commit 2cd3e3772e41 ("x86/cfi,bpf: Fix bpf_struct_ops CFI") to provide CFI stub functions for trampolines, and the owner field is used for module reference counting. Signed-off-by: Nirbhay Sharma --- Changes in v2: - Removed documentation for non-existent fields (type, value_type, type_id, value_id) that were moved to bpf_struct_ops_desc in commit 4c5763ed996a include/linux/bpf.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index d808253f2e94..96851fa0494f 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1905,12 +1905,14 @@ struct btf_member; * reason, if this callback is not defined, the check is skipped as * the struct_ops map will have final verification performed in * @reg. - * @type: BTF type. - * @value_type: Value type. + * @cfi_stubs: Pointer to a structure of stub functions for CFI. These stu= bs + * provide the correct Control Flow Integrity hashes for the + * trampolines generated by BPF struct_ops. + * @owner: The module that owns this struct_ops. Used for module reference + * counting to ensure the module providing the struct_ops cannot be + * unloaded while in use. * @name: The name of the struct bpf_struct_ops object. * @func_models: Func models - * @type_id: BTF type id. - * @value_id: BTF value id. */ struct bpf_struct_ops { const struct bpf_verifier_ops *verifier_ops; --=20 2.48.1