Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a35c8ea authored by David S. Miller's avatar David S. Miller
Browse files


Daniel Borkmann says:

====================
pull-request: bpf 2019-05-18

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

1) Fix bpftool's raw BTF dump in relation to forward declarations of union/
   structs, and another fix to unexport logging helpers, from Andrii.

2) Fix inode permission check for retrieving bpf programs, from Chenbo.

3) Fix bpftool to raise rlimit earlier as otherwise libbpf's feature probing
   can fail and subsequently it refuses to load an object, from Yonghong.

4) Fix declaration of bpf_get_current_task() in kselftests, from Alexei.

5) Fix up BPF kselftest .gitignore to add generated files, from Stanislav.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 45c20ebb 9c3ddee1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -518,7 +518,7 @@ int bpf_obj_get_user(const char __user *pathname, int flags)
static struct bpf_prog *__get_prog_inode(struct inode *inode, enum bpf_prog_type type)
{
	struct bpf_prog *prog;
	int ret = inode_permission(inode, MAY_READ | MAY_WRITE);
	int ret = inode_permission(inode, MAY_READ);
	if (ret)
		return ERR_PTR(ret);

+2 −2
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ static int dump_btf_type(const struct btf *btf, __u32 id,
		break;
	}
	case BTF_KIND_FWD: {
		const char *fwd_kind = BTF_INFO_KIND(t->info) ? "union"
		const char *fwd_kind = BTF_INFO_KFLAG(t->info) ? "union"
							       : "struct";

		if (json_output)
+2 −2
Original line number Diff line number Diff line
@@ -879,6 +879,8 @@ static int load_with_options(int argc, char **argv, bool first_prog_only)
		}
	}

	set_max_rlimit();

	obj = __bpf_object__open_xattr(&attr, bpf_flags);
	if (IS_ERR_OR_NULL(obj)) {
		p_err("failed to open object file");
@@ -958,8 +960,6 @@ static int load_with_options(int argc, char **argv, bool first_prog_only)
		goto err_close_obj;
	}

	set_max_rlimit();

	err = bpf_object__load(obj);
	if (err) {
		p_err("failed to load object file");
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#include "btf.h"
#include "bpf.h"
#include "libbpf.h"
#include "libbpf_util.h"
#include "libbpf_internal.h"

#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@
#include "bpf.h"
#include "btf.h"
#include "str_error.h"
#include "libbpf_util.h"
#include "libbpf_internal.h"

#ifndef EM_BPF
Loading