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]
Message-ID: <CAK8P3a1Z2xR_Poiv4dTntpghWKES6Jk75jNiDy8q7_L8XfRyuQ@mail.gmail.com>
Date:   Wed, 24 Aug 2022 12:09:56 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     Huacai Chen <chenhuacai@...ngson.cn>
Cc:     Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Guo Ren <guoren@...nel.org>, Xuerui Wang <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] LoongArch: Fix build warnings in VDSO

On Sat, Aug 20, 2022 at 5:35 PM Huacai Chen <chenhuacai@...ngson.cn> wrote:
>
> diff --git a/arch/loongarch/vdso/vgetcpu.c b/arch/loongarch/vdso/vgetcpu.c
> index 43a0078e4418..e02e775f5360 100644
> --- a/arch/loongarch/vdso/vgetcpu.c
> +++ b/arch/loongarch/vdso/vgetcpu.c
> @@ -24,6 +24,8 @@ static __always_inline const struct vdso_pcpu_data *get_pcpu_data(void)
>         return (struct vdso_pcpu_data *)(get_vdso_base() - VDSO_DATA_SIZE);
>  }
>
> +extern
> +int __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused);
>  int __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused)
>  {

I don't think that adding the declaration before the function is a
good workaround here,
that is likely to just trigger another warning about declarations in .c files.

I would add the declarations into a header file instead. If the
prototypes are the same
across architectures, this can be a global header that also avoids the
warnings elsewhere,
otherwise just keep it local to this directory.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ