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]
Date:   Wed, 3 Nov 2021 08:41:01 +0100
From:   Björn Töpel <bjorn.topel@...il.com>
To:     tongtiangen <tongtiangen@...wei.com>
Cc:     Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next] riscv, bpf: fix some compiler error

On Wed, 3 Nov 2021 at 08:26, tongtiangen <tongtiangen@...wei.com> wrote:
>

[...]

>
> Adding a function declaration in bpf_jit_comp64.c file cannot fix this compiler error:
>

AFAIK, there are two issues:

1. https://lore.kernel.org/llvm/202110290334.2zdMyRq4-lkp@intel.com/
2. https://lore.kernel.org/llvm/202111020610.9oy9Rr0G-lkp@intel.com/

1 is a warning when W=1 is enabled (missing prototype from -Wmissing-prototypes)
2 is an error, since the function is not defined when building CONFIG_ARCH_RV32I

You are trying to address both issues in this patch.

> ....
> when CONFIG_BPF_JIT and CONFIG_ARCH_64I is open, There is the following compiler error (W=1):
>    error: no previous prototype for 'rv_bpf_fixup_exception'
> ....
>
> To fix this compiler error, you need to make a declaration in a header file, which is also
> the reason for introducing extable.h.
>

No, you don't need the header file. The forward declaration is
sufficient to get rid of the warning, and the adding CONFIG_ARCH_RV64I
fixes the RV32I build.


Björn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ