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>] [day] [month] [year] [list]
Date:   Tue, 11 Aug 2020 12:30:50 +0200
From:   Helge Deller <deller@....de>
To:     Linux Kernel <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>, linux-arch@...r.kernel.org
Subject: [PATCH] sections.h: dereference_function_descriptor() returns void
 pointer

The function dereference_function_descriptor() takes on hppa64, ppc64
and ia64 a pointer to a function descriptor and returns a (void) pointer
to the dereferenced function.
To make cross-arch coding easier, on all other architectures the
dereference_function_descriptor() macro should return a void pointer
too.

Signed-off-by: Helge Deller <deller@....de>

diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 66397ed10acb..d16302d3eb59 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -60,8 +60,8 @@ extern __visible const void __nosave_begin, __nosave_end;

 /* Function descriptor handling (if any).  Override in asm/sections.h */
 #ifndef dereference_function_descriptor
-#define dereference_function_descriptor(p) (p)
-#define dereference_kernel_function_descriptor(p) (p)
+#define dereference_function_descriptor(p) ((void *)(p))
+#define dereference_kernel_function_descriptor(p) ((void *)(p))
 #endif

 /* random extra sections (if any).  Override

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ