Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1649927rwe; Sat, 15 Apr 2023 03:34:07 -0700 (PDT) X-Google-Smtp-Source: AKy350bnbfjix0I/1DlD7crAJH5Q2bU2Om2sz8lVXETc//pd7tdsrfNFdcHr0KB+BVePrpuAQIiJ X-Received: by 2002:a17:90a:b38a:b0:247:46f0:10a8 with SMTP id e10-20020a17090ab38a00b0024746f010a8mr4380437pjr.34.1681554847401; Sat, 15 Apr 2023 03:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681554847; cv=none; d=google.com; s=arc-20160816; b=lRAL8fZVPqbOMtPBx68KXUsE5vm5OzyruOb1p9VW1v24qnEwNHlwnuHVqumZs/2uCY QANf9f/I7Bm956vNJXQGE2iRGEnFLNPKZFUBW7oemtsDMTkcrLFlVtQwNiErL+uM90dl SMujEjsKljIUn3bbFuChiA2N6IAnCkBZna8dVxzIFdNIfu6ehutZtJAUDQyFaFtIR84y BBFzFf30ANGarDkQWnDe5DBB070D4kjQHkSk7oZoS07VFxcUH017i5cbijKjUM+B0t9c 9GRZT6H3gMJExRAemM5aNikYgoaYcQehUxBBRld0pre/Rvfv2iwrzhK1V/Ajm9ykKJQY GerQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bsE9U0MMwp7wZrIbIbCM0Lvuc4kI+kVHJ8gjGciCgfw=; b=w47SVz/4LzBehD80Ivw89qud6RoJcLwBkILMEEwhSMmJnwIOflDrINIoCCeGZr++Q8 4qUy2B6UMV+1Cd6k4R36JP/+I+q6vmaJttAw4ggetIbcasc6wX5WkL0f4IwgUvREZyDe mVsMPyRLRMgyfhVYhqxQwt+7+aoU086L1SeX7CRQElCTn76PK0jl2KNL1HFEKQ0Lc8+C TbRR/U9fUYcJZyUA7NxxfunfPq0ydPf85xQMXh+j+NPUr8ORQJh9Z1Wz73eBQUcoHeop ndg6GgTrlTz5F+1amx/jxHjVNTk4yb1/1o+Ff2QfsdfzWzSCMjXLNTGwdH3GJolTDrho Cd4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a17090ade8c00b0024713a8f06csi6699095pjv.1.2023.04.15.03.33.54; Sat, 15 Apr 2023 03:34:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229961AbjDOKcu (ORCPT + 99 others); Sat, 15 Apr 2023 06:32:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229829AbjDOKcn (ORCPT ); Sat, 15 Apr 2023 06:32:43 -0400 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19F185583; Sat, 15 Apr 2023 03:32:42 -0700 (PDT) Received: by mail-qt1-f180.google.com with SMTP id a23so16908865qtj.8; Sat, 15 Apr 2023 03:32:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681554761; x=1684146761; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bsE9U0MMwp7wZrIbIbCM0Lvuc4kI+kVHJ8gjGciCgfw=; b=WgWD0mXMRbzHmvxltHOK9pGEDT0epNt1+sOywJQfwypk9XSn/E+av0Fb1BMPbBLCyq 5D5M7MTTZzTiJ9n4Ow+6rGStQvjGV/Z7msCi2PJTQQbYYny/WlJd36zn2aWAKh99pk5F K6+29tXKUk5aZu0MkQLi0GvquiHJW3UcxKMNK+lob/bpYMQY6xlcD85WRFufLl/JLM2S E/imqB3AjT43NFltZVTmyGoXsJtLNGB9b+Eaqn46FwiyMAOVP70ERmphdVGZHq8aApC/ FsoyNiphXUogBhOv+kqbgBJqChcD/qxPB9Pd50GUcvaRqXwh1IEd18f6k5LYv/kd5u6m IIXg== X-Gm-Message-State: AAQBX9fvi2139KJOoVp4UA6b4uAlqyn6WJ8G4pWbp7uJlxsypw3tZFdw 376Dv0vBoW+055CGJPkXErsDtwUQvijUQ1+uhAE= X-Received: by 2002:ac8:5a0a:0:b0:3e8:b9a0:babf with SMTP id n10-20020ac85a0a000000b003e8b9a0babfmr13293626qta.12.1681554760689; Sat, 15 Apr 2023 03:32:40 -0700 (PDT) Received: from localhost ([24.1.27.177]) by smtp.gmail.com with ESMTPSA id j13-20020a05620a288d00b0073b8745fd39sm1827669qkp.110.2023.04.15.03.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Apr 2023 03:32:40 -0700 (PDT) From: David Vernet To: bpf@vger.kernel.org Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, memxor@gmail.com Subject: [PATCH bpf-next 3/3] bpf,docs: Remove KF_KPTR_GET from documentation Date: Sat, 15 Apr 2023 05:32:31 -0500 Message-Id: <20230415103231.236063-4-void@manifault.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230415103231.236063-1-void@manifault.com> References: <20230415103231.236063-1-void@manifault.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A prior patch removed KF_KPTR_GET from the kernel. Now that it's no longer accessible to kfunc authors, this patch removes it from the BPF kfunc documentation. Signed-off-by: David Vernet --- Documentation/bpf/kfuncs.rst | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Documentation/bpf/kfuncs.rst b/Documentation/bpf/kfuncs.rst index 3b42cfe12437..ea2516374d92 100644 --- a/Documentation/bpf/kfuncs.rst +++ b/Documentation/bpf/kfuncs.rst @@ -184,16 +184,7 @@ in. All copies of the pointer being released are invalidated as a result of invoking kfunc with this flag. KF_RELEASE kfuncs automatically receive the protection afforded by the KF_TRUSTED_ARGS flag described below. -2.4.4 KF_KPTR_GET flag ----------------------- - -The KF_KPTR_GET flag is used to indicate that the kfunc takes the first argument -as a pointer to kptr, safely increments the refcount of the object it points to, -and returns a reference to the user. The rest of the arguments may be normal -arguments of a kfunc. The KF_KPTR_GET flag should be used in conjunction with -KF_ACQUIRE and KF_RET_NULL flags. - -2.4.5 KF_TRUSTED_ARGS flag +2.4.4 KF_TRUSTED_ARGS flag -------------------------- The KF_TRUSTED_ARGS flag is used for kfuncs taking pointer arguments. It @@ -205,7 +196,7 @@ exception described below). There are two types of pointers to kernel objects which are considered "valid": 1. Pointers which are passed as tracepoint or struct_ops callback arguments. -2. Pointers which were returned from a KF_ACQUIRE or KF_KPTR_GET kfunc. +2. Pointers which were returned from a KF_ACQUIRE kfunc. Pointers to non-BTF objects (e.g. scalar pointers) may also be passed to KF_TRUSTED_ARGS kfuncs, and may have a non-zero offset. @@ -232,13 +223,13 @@ In other words, you must: 2. Specify the type and name of the trusted nested field. This field must match the field in the original type definition exactly. -2.4.6 KF_SLEEPABLE flag +2.4.5 KF_SLEEPABLE flag ----------------------- The KF_SLEEPABLE flag is used for kfuncs that may sleep. Such kfuncs can only be called by sleepable BPF programs (BPF_F_SLEEPABLE). -2.4.7 KF_DESTRUCTIVE flag +2.4.6 KF_DESTRUCTIVE flag -------------------------- The KF_DESTRUCTIVE flag is used to indicate functions calling which is @@ -247,7 +238,7 @@ rebooting or panicking. Due to this additional restrictions apply to these calls. At the moment they only require CAP_SYS_BOOT capability, but more can be added later. -2.4.8 KF_RCU flag +2.4.7 KF_RCU flag ----------------- The KF_RCU flag is a weaker version of KF_TRUSTED_ARGS. The kfuncs marked with @@ -260,7 +251,7 @@ also be KF_RET_NULL. .. _KF_deprecated_flag: -2.4.9 KF_DEPRECATED flag +2.4.8 KF_DEPRECATED flag ------------------------ The KF_DEPRECATED flag is used for kfuncs which are scheduled to be -- 2.40.0