lists.openwall.net   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>] [day] [month] [year] [list]
Date:   Mon, 1 Apr 2019 14:24:13 +0900
From:   "Daniel T. Lee" <danieltimlee@...il.com>
To:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org
Subject: samples: bpf: spintest_kern.c sample broken due to missing symbol?

spintest sample isn't running currently since there is no
such symbol called 'spin_lock'.

At "spintest_kern.c", it has 'kprobe/spin_lock' and
'kprobe/spin_unlock' and some
others kernel symbols like below.

SEC("kprobe/spin_unlock")PROG(p1)
SEC("kprobe/spin_lock")PROG(p2)
SEC("kprobe/mutex_spin_on_owner")PROG(p3)
SEC("kprobe/rwsem_spin_on_owner")PROG(p4)
SEC("kprobe/spin_unlock_irqrestore")PROG(p5)
SEC("kprobe/_raw_spin_unlock_irqrestore")PROG(p6)
SEC("kprobe/_raw_spin_unlock_bh")PROG(p7)
SEC("kprobe/_raw_spin_unlock")PROG(p8)
SEC("kprobe/_raw_spin_lock_irqsave")PROG(p9)
....

But the thing is, 'spin_lock' kernel symbol won't exist, as it has
been __always_inline'd
at commit 349056 at Jul,13,2015.

https://cregit.linuxsources.org/code/4.20/include/linux/spinlock.h.html#327

$ uname -r
5.0.0+
$ grep "spin_lock" /proc/kallsyms
0000000000000000 T queued_spin_lock_slowpath
0000000000000000 t process_spin_lock
0000000000000000 T bpf_spin_lock
0000000000000000 T btf_find_spin_lock
0000000000000000 T _raw_spin_lock_bh
0000000000000000 T _raw_spin_lock_irqsave
0000000000000000 T _raw_spin_lock
0000000000000000 T _raw_spin_lock_irq
...

I'm pretty sure there is something I don't know due to my lack of skills.
Is there any way to run this sample without having such kernel symbol?
Or is it just an broken sample due to inlined code?

Powered by blists - more mailing lists