bpf: Fix a few typos in BPF helpers documentation
authorQuentin Monnet <quentin@isovalent.com>
Thu, 25 Aug 2022 22:08:06 +0000 (23:08 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Sat, 27 Aug 2022 05:19:31 +0000 (22:19 -0700)
Address a few typos in the documentation for the BPF helper functions.
They were reported by Jakub [0], who ran spell checkers on the generated
man page [1].

[0] https://lore.kernel.org/linux-man/d22dcd47-023c-8f52-d369-7b5308e6c842@gmail.com/T/#mb02e7d4b7fb61d98fa914c77b581184e9a9537af
[1] https://lore.kernel.org/linux-man/eb6a1e41-c48e-ac45-5154-ac57a2c76108@gmail.com/T/#m4a8d1b003616928013ffcd1450437309ab652f9f

v3: Do not copy unrelated (and breaking) elements to tools/ header
v2: Turn a ',' into a ';'

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220825220806.107143-1-quentin@isovalent.com
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h

index bdf4bc6d8d6b4118741b6618e19794840fe2e907..962960a988359d1ecd3a3e95a6b1873feab221e2 100644 (file)
@@ -4456,7 +4456,7 @@ union bpf_attr {
  *
  *             **-EEXIST** if the option already exists.
  *
- *             **-EFAULT** on failrue to parse the existing header options.
+ *             **-EFAULT** on failure to parse the existing header options.
  *
  *             **-EPERM** if the helper cannot be used under the current
  *             *skops*\ **->op**.
@@ -4665,7 +4665,7 @@ union bpf_attr {
  *             a *map* with *task* as the **key**.  From this
  *             perspective,  the usage is not much different from
  *             **bpf_map_lookup_elem**\ (*map*, **&**\ *task*) except this
- *             helper enforces the key must be an task_struct and the map must also
+ *             helper enforces the key must be a task_struct and the map must also
  *             be a **BPF_MAP_TYPE_TASK_STORAGE**.
  *
  *             Underneath, the value is stored locally at *task* instead of
@@ -4723,7 +4723,7 @@ union bpf_attr {
  *
  * long bpf_ima_inode_hash(struct inode *inode, void *dst, u32 size)
  *     Description
- *             Returns the stored IMA hash of the *inode* (if it's avaialable).
+ *             Returns the stored IMA hash of the *inode* (if it's available).
  *             If the hash is larger than *size*, then only *size*
  *             bytes will be copied to *dst*
  *     Return
@@ -4747,12 +4747,12 @@ union bpf_attr {
  *
  *             The argument *len_diff* can be used for querying with a planned
  *             size change. This allows to check MTU prior to changing packet
- *             ctx. Providing an *len_diff* adjustment that is larger than the
+ *             ctx. Providing a *len_diff* adjustment that is larger than the
  *             actual packet size (resulting in negative packet size) will in
- *             principle not exceed the MTU, why it is not considered a
- *             failure.  Other BPF-helpers are needed for performing the
- *             planned size change, why the responsability for catch a negative
- *             packet size belong in those helpers.
+ *             principle not exceed the MTU, which is why it is not considered
+ *             a failure.  Other BPF helpers are needed for performing the
+ *             planned size change; therefore the responsibility for catching
+ *             a negative packet size belongs in those helpers.
  *
  *             Specifying *ifindex* zero means the MTU check is performed
  *             against the current net device.  This is practical if this isn't
index 92f7387e378a08070a5cd427bc4857bb5f8e0207..f4ba82a1eace0c63ad34370db4b84a29ade59f0f 100644 (file)
@@ -4456,7 +4456,7 @@ union bpf_attr {
  *
  *             **-EEXIST** if the option already exists.
  *
- *             **-EFAULT** on failrue to parse the existing header options.
+ *             **-EFAULT** on failure to parse the existing header options.
  *
  *             **-EPERM** if the helper cannot be used under the current
  *             *skops*\ **->op**.
@@ -4665,7 +4665,7 @@ union bpf_attr {
  *             a *map* with *task* as the **key**.  From this
  *             perspective,  the usage is not much different from
  *             **bpf_map_lookup_elem**\ (*map*, **&**\ *task*) except this
- *             helper enforces the key must be an task_struct and the map must also
+ *             helper enforces the key must be a task_struct and the map must also
  *             be a **BPF_MAP_TYPE_TASK_STORAGE**.
  *
  *             Underneath, the value is stored locally at *task* instead of
@@ -4723,7 +4723,7 @@ union bpf_attr {
  *
  * long bpf_ima_inode_hash(struct inode *inode, void *dst, u32 size)
  *     Description
- *             Returns the stored IMA hash of the *inode* (if it's avaialable).
+ *             Returns the stored IMA hash of the *inode* (if it's available).
  *             If the hash is larger than *size*, then only *size*
  *             bytes will be copied to *dst*
  *     Return
@@ -4747,12 +4747,12 @@ union bpf_attr {
  *
  *             The argument *len_diff* can be used for querying with a planned
  *             size change. This allows to check MTU prior to changing packet
- *             ctx. Providing an *len_diff* adjustment that is larger than the
+ *             ctx. Providing a *len_diff* adjustment that is larger than the
  *             actual packet size (resulting in negative packet size) will in
- *             principle not exceed the MTU, why it is not considered a
- *             failure.  Other BPF-helpers are needed for performing the
- *             planned size change, why the responsability for catch a negative
- *             packet size belong in those helpers.
+ *             principle not exceed the MTU, which is why it is not considered
+ *             a failure.  Other BPF helpers are needed for performing the
+ *             planned size change; therefore the responsibility for catching
+ *             a negative packet size belongs in those helpers.
  *
  *             Specifying *ifindex* zero means the MTU check is performed
  *             against the current net device.  This is practical if this isn't