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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 May 2023 18:45:35 -0700
From:   Song Liu <song@...nel.org>
To:     Luis Chamberlain <mcgrof@...nel.org>,
        Alan Maguire <alan.maguire@...cle.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Arnd Bergmann <arnd@...nel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...e.de>, linux-modules@...r.kernel.org,
        Zhen Lei <thunder.leizhen@...wei.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Kees Cook <keescook@...omium.org>,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kallsyms: remove unused arch_get_kallsym() helper

+ Alan Maguire

On Wed, May 24, 2023 at 12:24 AM Luis Chamberlain <mcgrof@...nel.org> wrote:
>
> On Wed, May 24, 2023 at 08:25:13AM +0200, Arnd Bergmann wrote:
> > On Wed, May 24, 2023, at 07:07, Luis Chamberlain wrote:
> > > On Wed, May 17, 2023 at 03:18:07PM +0200, Arnd Bergmann wrote:
> > >> From: Arnd Bergmann <arnd@...db.de>
> > >>
> > >> The arch_get_kallsym() function was introduced so that x86 could override
> > >> it, but that override was removed in bf904d2762ee ("x86/pti/64: Remove
> > >> the SYSCALL64 entry trampoline"), so now this does nothing except causing
> > >> a warning about a missing prototype:
> > >>
> > >> kernel/kallsyms.c:662:12: error: no previous prototype for 'arch_get_kallsym' [-Werror=missing-prototypes]
> > >>   662 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
> > >>
> > >> Restore the old behavior before d83212d5dd67 ("kallsyms, x86: Export
> > >> addresses of PTI entry trampolines") to simplify the code and avoid
> > >> the warning.
> > >>
> > >> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > >
> > > Shouldn't this go through x86 as this sort of fixesss commit
> > > bf904d2762ee ("x86/pti/64: Remove the SYSCALL64 entry trampoline")?
> >
> > That works for me as well, as long as someone picks it up. It's
> > not really x86 any more though since that commit is five years
> > old and removed the last reference from the x86 code.
>
> Fair enough.
>
> > I sent it to you since you are the one that merged most of
> > the kallsyms patches through the module tree, but I guess
> > you are not actually maintaining that file (not blaming you,
> > I'd also try to stay away from kallsyms).
> >
> > I can resend it to Andrew for the -mm tree.
>
> OK, I just took the patch in, it's on the train, better get on before
> it gets lost.

This change broke compilation of BPF selftests in modules-next
branch:

progs/bpf_iter_ksym.c:62:13: error: no member named 'pos_arch_end' in
'struct kallsym_iter'
        if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
             ~~~~  ^
progs/bpf_iter_ksym.c:62:35: error: no member named 'pos_arch_end' in
'struct kallsym_iter'
        if (!iter->pos_arch_end || iter->pos_arch_end > iter->pos)
                                   ~~~~  ^

I haven't looked into the proper fix for it yet.

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ