bpf: update docs on CONFIG_FUNCTION_ERROR_INJECTION
PATCH 1/1 bpf: update docs on CONFIG_FUNCTION_ERROR_INJECTION
The documentation says CONFIG_FUNCTION_ERROR_INJECTION is supported only on x86. This was presumably true at the time of writing, but it's now supported on many other architectures too, so drop the part of the statement mentioning x86.
--- include/uapi/linux/bpf.h | 3 +-- tools/include/uapi/linux/bpf.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
include/uapi/linux/bpf.h +1 -2
@@ -3105,8 +3105,7 @@ union bpf_attr {* **ALLOW_ERROR_INJECTION** in the kernel code. * * Also, the helper is only available for the architectures having -* the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing, -* x86 architecture is the only one to support this feature. +* the CONFIG_FUNCTION_ERROR_INJECTION option. * Return * 0 *
tools/include/uapi/linux/bpf.h +1 -2
@@ -3105,8 +3105,7 @@ union bpf_attr {* **ALLOW_ERROR_INJECTION** in the kernel code. * * Also, the helper is only available for the architectures having -* the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing, -* x86 architecture is the only one to support this feature. +* the CONFIG_FUNCTION_ERROR_INJECTION option. * Return * 0 *
Signature · 1 line
2.34.1
Quoted 17 lines · Martin Kelly
The documentation says
CONFIG_FUNCTION_ERROR_INJECTIONis supported only on x86. This was presumably true at the time of writing, but it's now supported on many other architectures too, so drop the part of the statement mentioning x86.Signed-off-by Martin Kelly <[email protected]>--- include/uapi/linux/bpf.h | 3 +-- tools/include/uapi/linux/bpf.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)include/uapi/linux/bpf.h +0
-0
include/uapi/linux/bpf.h union bpf_attr { · line 3108
Quoted 6 lines
include/uapi/linux/bpf.h +1
-2@@ -3105,8 +3105,7 @@ union bpf_attr {* **ALLOW_ERROR_INJECTION** in the kernel code. * * Also, the helper is only available for the architectures having -* the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing, -* x86 architecture is the only one to support this feature. +* the CONFIG_FUNCTION_ERROR_INJECTION option.
Something like this is good to add to Documentation/fault-injection/fault-injection.rst and may be a link to it somewhere in Documentation/bpf/.
But uapi/bpf.h is not such place.
pw-bot: cr
Quoted 35 lines · Alexei Starovoitov
Quoted 22 lines · Martin Kelly
The documentation says
CONFIG_FUNCTION_ERROR_INJECTIONis supported only
on x86. This was presumably true at the time of writing, but it's now
supported on many other architectures too, so drop the part of the statement mentioning x86.Signed-off-by Martin Kelly <[email protected]>---
include/uapi/linux/bpf.h | 3 +--
tools/include/uapi/linux/bpf.h | 3 +--2 files changed, 2 insertions(+), 4 deletions(-)include/uapi/linux/bpf.h +0
-0@@ -3105,8 +3105,7 @@ union bpf_attr { * **ALLOW_ERROR_INJECTION** in the kernel code. * * Also, the helper is only available for theQuoted 6 lines
architectures having
- * theCONFIG_FUNCTION_ERROR_INJECTIONoption. As of this writing,
- * x86 architecture is the only one to support this feature.
+ * theCONFIG_FUNCTION_ERROR_INJECTIONoption.Something like this is good to add to
Documentation/fault-injection/fault-injection.rstand may be a link to it somewhere inDocumentation/bpf/.
Quoted 3 lines
But
uapi/bpf.his not such place.pw-bot: cr
Would you prefer to just remove the sentence altogether? Currently, this statement is already in the headers, so I think it's best to either correct it or remove it, but not leave it the way it is (which is not very accurate).
Quoted 37 lines · Martin Kelly
Quoted 35 lines · Alexei Starovoitov
Quoted 22 lines · Martin Kelly
The documentation says
CONFIG_FUNCTION_ERROR_INJECTIONis supported only
on x86. This was presumably true at the time of writing, but it's now
supported on many other architectures too, so drop the part of the statement mentioning x86.Signed-off-by Martin Kelly <[email protected]>--- include/uapi/linux/bpf.h | 3 +-- tools/include/uapi/linux/bpf.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)include/uapi/linux/bpf.h +0
-0@@ -3105,8 +3105,7 @@ union bpf_attr {* **ALLOW_ERROR_INJECTION** in the kernel code. * * Also, the helper is only available for the Quoted 6 lines
architectures having
- * theCONFIG_FUNCTION_ERROR_INJECTIONoption. As of
this writing,
- * x86 architecture is the only one to support this
feature.
+ * theCONFIG_FUNCTION_ERROR_INJECTIONoption.Something like this is good to add to
Documentation/fault-injection/fault-injection.rstand may be a link to it somewhere inDocumentation/bpf/.
Quoted 8 lines
Quoted 3 lines
But
uapi/bpf.his not such place.pw-bot: cr
Would you prefer to just remove the sentence altogether? Currently, this statement is already in the headers, so I think it's best to either correct it or remove it, but not leave it the way it is (which is not very accurate).
I say let's remove the whole paragraph then.
.h already says
"It is only available if the kernel was compiled
with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration option,"
which in turn depends on:
config BPF_KPROBE_OVERRIDE
bool "Enable BPF programs to override a kprobed function" depends on BPF_EVENTS
depends on FUNCTION_ERROR_INJECTION
No need to duplicate kconfig dependencies as a doc in .h
Quoted 62 lines · Alexei Starovoitov
Quoted 45 lines · Martin Kelly
Quoted 43 lines · Alexei Starovoitov
Quoted 26 lines · Martin Kelly
The documentation says
CONFIG_FUNCTION_ERROR_INJECTIONis supported
only
on x86. This was presumably true at the time of writing, but it's
now
supported on many other architectures too, so drop the part of the
statement mentioning x86.Signed-off-by Martin Kelly <[email protected]>---
include/uapi/linux/bpf.h | 3 +--
tools/include/uapi/linux/bpf.h | 3 +--2 files changed, 2 insertions(+), 4 deletions(-)include/uapi/linux/bpf.h +0
-0@@ -3105,8 +3105,7 @@ union bpf_attr { * **ALLOW_ERROR_INJECTION** in the kernel code. * * Also, the helper is only available for theQuoted 8 lines
architectures having
- * theCONFIG_FUNCTION_ERROR_INJECTIONoption. As of
this writing,
- * x86 architecture is the only one to support this
feature.
+ * theCONFIG_FUNCTION_ERROR_INJECTIONoption.Something like this is good to add to
Documentation/fault-injection/fault-injection.rstand may be a link to it somewhere inDocumentation/bpf/.But
uapi/bpf.his not such place.Quoted 7 lines
Quoted 1 line
pw-bot: cr
Would you prefer to just remove the sentence altogether? Currently, this statement is already in the headers, so I think it's best to either correct it or remove it, but not leave it the way it is (which
is not very accurate).I say let's remove the whole paragraph then.
.h already says
"It is only available if the kernel was compiled with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration option,"
Quoted 8 lines
which in turn depends on:
config
BPF_KPROBE_OVERRIDE
bool "Enable BPF programs to override a kprobed function" depends onBPF_EVENTS
depends onFUNCTION_ERROR_INJECTIONNo need to duplicate kconfig dependencies as a doc in .h
Agreed. I sent a v2 with the paragraph removed.