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: <20171127213423.27218-10-andi@firstfloor.org>
Date:   Mon, 27 Nov 2017 13:34:11 -0800
From:   Andi Kleen <andi@...stfloor.org>
To:     linux-kernel@...r.kernel.org
Cc:     x86@...nel.org, samitolvanen@...gle.com, alxmtvv@...il.com,
        linux-kbuild@...r.kernel.org, yamada.masahiro@...ionext.com,
        akpm@...ux-foundation.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 09/21] lto: Use C version for SYSCALL_ALIAS

From: Andi Kleen <ak@...ux.intel.com>

LTO doesn't like the assembler aliasing used for SYSCALL_ALIAS.
Replace it with C aliasing. Also mark the only user visible.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 include/linux/linkage.h   | 6 ++----
 kernel/time/posix-stubs.c | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index f68db9e450eb..24fb6468b1a5 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -30,10 +30,8 @@
 #endif
 
 #ifndef SYSCALL_ALIAS
-#define SYSCALL_ALIAS(alias, name) asm(			\
-	".globl " VMLINUX_SYMBOL_STR(alias) "\n\t"	\
-	".set   " VMLINUX_SYMBOL_STR(alias) ","		\
-		  VMLINUX_SYMBOL_STR(name))
+#define SYSCALL_ALIAS(a, name) \
+	__visible typeof(a) a __attribute__((alias(__stringify(name))))
 #endif
 
 #define __page_aligned_data	__section(.data..page_aligned) __aligned(PAGE_SIZE)
diff --git a/kernel/time/posix-stubs.c b/kernel/time/posix-stubs.c
index b258bee13b02..5e36cb75f3be 100644
--- a/kernel/time/posix-stubs.c
+++ b/kernel/time/posix-stubs.c
@@ -19,7 +19,7 @@
 #include <linux/posix-timers.h>
 #include <linux/compat.h>
 
-asmlinkage long sys_ni_posix_timers(void)
+__visible asmlinkage long sys_ni_posix_timers(void)
 {
 	pr_err_once("process %d (%s) attempted a POSIX timer syscall "
 		    "while CONFIG_POSIX_TIMERS is not set\n",
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ