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: <161668602985.398.1651880509532185393.tip-bot2@tip-bot2>
Date:   Thu, 25 Mar 2021 15:27:09 -0000
From:   "tip-bot2 for Masahiro Yamada" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Masahiro Yamada <masahiroy@...nel.org>,
        Ingo Molnar <mingo@...nel.org>, mic@...ux.microsoft.com,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/cleanups] x86/syscalls: Fix -Wmissing-prototypes warnings
 from COND_SYSCALL()

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     7dfe553affd0d003c7535b7ba60d09193471ea9d
Gitweb:        https://git.kernel.org/tip/7dfe553affd0d003c7535b7ba60d09193471ea9d
Author:        Masahiro Yamada <masahiroy@...nel.org>
AuthorDate:    Mon, 01 Mar 2021 22:15:26 +09:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Thu, 25 Mar 2021 16:20:41 +01:00

x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL()

Building kernel/sys_ni.c with W=1 emits tons of -Wmissing-prototypes warnings:

  $ make W=1 kernel/sys_ni.o
    [ snip ]
    CC      kernel/sys_ni.o
     ./arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__ia32_sys_io_setup' [-Wmissing-prototypes]
     ...

The problem is in __COND_SYSCALL(), the __SYS_STUB0() and __SYS_STUBx() macros
defined a few lines above already have forward declarations.

Let's do likewise for __COND_SYSCALL() to fix the warnings.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Tested-by: Mickaël Salaün <mic@...ux.microsoft.com>
Link: https://lore.kernel.org/r/20210301131533.64671-2-masahiroy@kernel.org
---
 arch/x86/include/asm/syscall_wrapper.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h
index a84333a..80c08c7 100644
--- a/arch/x86/include/asm/syscall_wrapper.h
+++ b/arch/x86/include/asm/syscall_wrapper.h
@@ -80,6 +80,7 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs);
 	}
 
 #define __COND_SYSCALL(abi, name)					\
+	__weak long __##abi##_##name(const struct pt_regs *__unused);	\
 	__weak long __##abi##_##name(const struct pt_regs *__unused)	\
 	{								\
 		return sys_ni_syscall();				\

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ