[PATCH bpf-next] bpf: Add comment about helper freeze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Levi Zim <rsworktech@xxxxxxxxxxx>

Put a comment after the bpf helper list in uapi bpf.h to prevent people
from trying to add new helpers there and direct them to kfuncs.

Link: https://lore.kernel.org/bpf/CAEf4BzZvQF+QQ=oip4vdz5A=9bd+OmN-CXk5YARYieaipK9s+A@xxxxxxxxxxxxxx/
Link: https://lore.kernel.org/bpf/20221231004213.h5fx3loccbs5hyzu@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
Suggested-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
Signed-off-by: Levi Zim <rsworktech@xxxxxxxxxxx>
---
Put a comment after the bpf helper list in uapi bpf.h to prevent people
from trying to add new helpers there and direct them to kfuncs.
---
 include/uapi/linux/bpf.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 2acf9b33637174bd16b1d12ccc6410c5f55a7ea9..fff6cdb8d11a2c211a6205ae2937b2bdf593cd42 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -6019,7 +6019,10 @@ union bpf_attr {
 	FN(user_ringbuf_drain, 209, ##ctx)		\
 	FN(cgrp_storage_get, 210, ##ctx)		\
 	FN(cgrp_storage_delete, 211, ##ctx)		\
-	/* */
+	/* This helper list is effectively frozen. If you are trying to	\
+	 * add a new helper, you should add a kfunc instead which has	\
+	 * less stability guarantees. See Documentation/bpf/kfuncs.rst	\
+	 */
 
 /* backwards-compatibility macros for users of __BPF_FUNC_MAPPER that don't
  * know or care about integer value that is now passed as second argument

---
base-commit: 03f3aa4a6b664270d502c7fb44c634cbe250261e
change-id: 20250204-bpf-helper-freeze-cf3e0b29fb63

Best regards,
-- 
Levi Zim <rsworktech@xxxxxxxxxxx>






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux