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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Nov 2016 20:53:26 -0500
From:   Keno Fischer <keno@...iacomputing.com>
To:     linux-kernel@...r.kernel.org
Cc:     jdike@...toit.com, richard@....at,
        user-mode-linux-devel@...ts.sourceforge.net
Subject: [PATCH] um: Fix compile failure due to current_text_address()
 definition

Fixes the following link error:
```
/usr/bin/ld: net/built-in.o: relocation R_X86_64_32S against `.text'
can not be used when making a shared object; recompile with -fPIC
```

This is the same definition used on some other architectures.

Signed-off-by: Keno Fischer <keno@...iacomputing.com>
---
I am not sure this is the correct patch in the context of uml. I believe this
should give the runtime ip, which may be different between runs. It may be
better to use the offset in .text (e.g. by using `pc-__text_start`), which
should be consistent.

 arch/x86/um/asm/processor_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/um/asm/processor_64.h b/arch/x86/um/asm/processor_64.h
index c3be852..6ca3304 100644
--- a/arch/x86/um/asm/processor_64.h
+++ b/arch/x86/um/asm/processor_64.h
@@ -32,7 +32,7 @@ static inline void arch_copy_thread(struct arch_thread *from,
 }
 
 #define current_text_addr() \
-	({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; })
+	({ __label__ _l; _l: &&_l; })
 
 #define current_sp() ({ void *sp; __asm__("movq %%rsp, %0" : "=r" (sp) : ); sp; })
 #define current_bp() ({ unsigned long bp; __asm__("movq %%rbp, %0" : "=r" (bp) : ); bp; })
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ