Skip to content

Commit

Permalink
Merge branch 'bpf-next/master' into for-next
Browse files Browse the repository at this point in the history
Signed-off-by: Alexei Starovoitov <[email protected]>
  • Loading branch information
Alexei Starovoitov committed Nov 16, 2024
2 parents 66df48a + 2c8b09a commit f316018
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tools/lib/bpf/btf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3548,7 +3548,7 @@ struct btf_dedup {
struct strset *strs_set;
};

static long hash_combine(long h, long value)
static unsigned long hash_combine(unsigned long h, unsigned long value)
{
return h * 31 + value;
}
Expand Down
11 changes: 5 additions & 6 deletions tools/lib/bpf/libbpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -12006,6 +12006,8 @@ bpf_program__attach_uprobe_multi(const struct bpf_program *prog,
ref_ctr_offsets = OPTS_GET(opts, ref_ctr_offsets, NULL);
cookies = OPTS_GET(opts, cookies, NULL);
cnt = OPTS_GET(opts, cnt, 0);
retprobe = OPTS_GET(opts, retprobe, false);
session = OPTS_GET(opts, session, false);

/*
* User can specify 2 mutually exclusive set of inputs:
Expand Down Expand Up @@ -12034,6 +12036,9 @@ bpf_program__attach_uprobe_multi(const struct bpf_program *prog,
return libbpf_err_ptr(-EINVAL);
}

if (retprobe && session)
return libbpf_err_ptr(-EINVAL);

if (func_pattern) {
if (!strchr(path, '/')) {
err = resolve_full_path(path, full_path, sizeof(full_path));
Expand All @@ -12057,12 +12062,6 @@ bpf_program__attach_uprobe_multi(const struct bpf_program *prog,
offsets = resolved_offsets;
}

retprobe = OPTS_GET(opts, retprobe, false);
session = OPTS_GET(opts, session, false);

if (retprobe && session)
return libbpf_err_ptr(-EINVAL);

attach_type = session ? BPF_TRACE_UPROBE_SESSION : BPF_TRACE_UPROBE_MULTI;

lopts.uprobe_multi.path = path;
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/progs/verifier_arena_large.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ __noinline int alloc_pages(int page_cnt, int pages_atonce, bool first_pass,
NUMA_NO_NODE, 0);
if (!pg)
return step;
pg_idx = (pg - base) / PAGE_SIZE;
pg_idx = (unsigned long) (pg - base) / PAGE_SIZE;
if (first_pass) {
/* Pages must be allocated sequentially */
if (pg_idx != i)
Expand Down

0 comments on commit f316018

Please sign in to comment.