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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABCJKueFYAbLNQCZLxZx9rdi_F+Dif45=5afw3uwBd8VaZuxpQ@mail.gmail.com>
Date: Fri, 18 Jul 2025 15:27:19 -0700
From: Sami Tolvanen <samitolvanen@...gle.com>
To: Will Deacon <will@...nel.org>
Cc: bpf@...r.kernel.org, Puranjay Mohan <puranjay@...nel.org>, 
	Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Catalin Marinas <catalin.marinas@....com>, Andrii Nakryiko <andrii@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, Maxwell Bland <mbland@...orola.com>
Subject: Re: [PATCH bpf-next v10 2/3] cfi: Move BPF CFI types and helpers to
 generic code

On Fri, Jul 18, 2025 at 4:40 AM Will Deacon <will@...nel.org> wrote:
>
> On Tue, Jul 15, 2025 at 10:57:36PM +0000, Sami Tolvanen wrote:
> >
> > +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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ