lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 28 Apr 2022 20:31:52 -0400
From:   Steven Rostedt <>
To:     Andrii Nakryiko <>
Cc:     Alexei Starovoitov <>,
        Masami Hiramatsu <>,
        Jiri Olsa <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Andrii Nakryiko <>,
        Networking <>, bpf <>,
        lkml <>,
        Martin KaFai Lau <>,
        Song Liu <>, Yonghong Song <>,
        John Fastabend <>,
        KP Singh <>
Subject: Re: [RFC bpf-next 4/4] selftests/bpf: Add attach bench test

On Thu, 28 Apr 2022 20:09:45 -0400
Steven Rostedt <> wrote:

> OK, I think I see the issue you have. Because the functions shown in
> available_filter_functions which uses the simple "%ps" to show the function
> name:
> And the code that does the actual matching uses kallsyms_lookup()
> Which appears not to match the function for the address, you can't pass in
> __bpf_tramp_exit because it wont match the symbol returned by
> kallsyms_lookup.

Never mind, in testing this I had marked the weak function as notrace,
which was the reason I couldn't add it to the set_ftrace_notrace.

After removing the notrace, kallsyms_lookup() doesn't make a difference. It
appears that kallsyms will include overridden weak functions into the size
of the function before it. I tried:

	ret = kallsyms_lookup(rec->ip, &size, &offset, &modname, str);
	if (!ret || offset > size) {
		seq_printf(m, "no function at %lx", rec->ip);
	} else {
		seq_printf(m, "%s", str);
		if (modname)
			seq_printf(m, " [%s]", modname);

And it made no difference.

> This does indeed look like a bug in %ps.

Yes, this does appear to be a issue with kallsyms in general.

-- Steve

Powered by blists - more mailing lists