Skip to contentSkip to conversation

Fix inaccurate helper function description

PATCH Applied Chenbo Feng 4 participants 4 messages Apr 26, 2017 – May 1, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix inaccurate helper function description

From: Chenbo Feng <[email protected]>

The description inside uapi/linux/bpf.h about bpf_get_socket_uid helper function is no longer valid. It returns overflowuid rather than 0 when failed.

---
 include/uapi/linux/bpf.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/uapi/linux/bpf.h +1 -2
index e553529..945a1f5 100644
@@ -481,8 +481,7 @@ union bpf_attr {
  * u32 bpf_get_socket_uid(skb)
  *     Get the owner uid of the socket stored inside sk_buff.
  *     @skb: pointer to skb
- *     Return: uid of the socket owner on success or 0 if the socket pointer
- *     inside sk_buff is NULL
+ *     Return: uid of the socket owner on success or overflowuid if failed.
  */
 #define __BPF_FUNC_MAPPER(FN)		\
 	FN(unspec),			\
Signature · 1 line
2.7.4
#2 lore raw
Quoted 10 lines · Daniel Borkmann
Quoted 7 lines · Chenbo Feng

From: Chenbo Feng <[email protected]>

The description inside uapi/linux/bpf.h about bpf_get_socket_uid helper function is no longer valid. It returns overflowuid rather than 0 when failed.

"bpf: " prefix in patch subject line would have been good.

+1

last time missing 'bpf:' prefix caused me headaches during backporting, so please always use it.
Also please use scripts/get_maintainer.pl to make sure maintainers cc-ed on patches.
gmail delivers netdev list emails to my mailbox with 10+ hour delay for some reason.