@@ -2431,6 +2431,18 @@ union bpf_attr {
* Return
* A **struct bpf_sock** pointer on success, or **NULL** in
* case of failure.
+ *
+ * int bpf_probe_read_user(void *dst, int size, void *src)
+ * Description
+ * Read a userspace pointer safely.
+ * Return
+ * 0 on success or negative error
+ *
+ * int bpf_probe_read_kernel(void *dst, int size, void *src)
+ * Description
+ * Read a kernel pointer safely.
+ * Return
+ * 0 on success or negative error
*/
#define __BPF_FUNC_MAPPER(FN) \
FN(unspec), \
@@ -2531,7 +2543,9 @@ union bpf_attr {
FN(sk_fullsock), \
FN(tcp_sock), \
FN(skb_ecn_set_ce), \
- FN(get_listener_sock),
+ FN(get_listener_sock), \
+ FN(probe_read_user), \
+ FN(probe_read_kernel),
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
* function eBPF program intends to call
The uapi in tools/ needs an update after support for new bpf function calls were added. This commit does the same. Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> --- tools/include/uapi/linux/bpf.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)