Thread (8 messages) 8 messages, 2 authors, 2025-07-18

Re: [PATCH bpf-next v10 2/3] cfi: Move BPF CFI types and helpers to generic code

From: Sami Tolvanen <samitolvanen@google.com>
Date: 2025-07-18 22:27:57
Also in: bpf, lkml

On Fri, Jul 18, 2025 at 4:40 AM Will Deacon [off-list ref] wrote:
On Tue, Jul 15, 2025 at 10:57:36PM +0000, Sami Tolvanen wrote:
quoted
+u32 __weak cfi_get_func_hash(void *func)
+{
+     u32 hash;
+
+     if (get_kernel_nofault(hash, func - cfi_get_offset()))
+             return 0;
+
+     return hash;
+}
Do you really need the '__weak' function definition here, or could you
use an '#ifndef cfi_get_func_hash' guard, a bit like you're doing for
cfi_get_offset()?
Good point, it's not really necessary. I'll move this behind a guard instead.

Sami
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help