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-next>] [day] [month] [year] [list]
Date:	Fri, 4 Mar 2016 14:53:21 +0100
From:	Gianfranco Costamagna <locutusofborg@...ian.org>
To:	linux-kernel@...r.kernel.org, arnd@...db.de, trivial@...nel.org
Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in
 mpi-inline.h and mpi-internal.h

Hi, this is my first contribution to the kernel code, I hope I did it right.

Today I faced a gcc-5 build failure, so I fixed it (the static inline
C99 issue)

After I found the same patch from Arnd, but I fail to see it applied to
the kernel source code.

according to LKML [1] the patch should be already applied, but I fail to
see it in current master.

Sending it with the format-patch style.


[1] https://lkml.org/lkml/2016/2/26/459

From 820a0ad32d474adf925437811e9b61d9d8886bc9 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <gianfranco.costamagna@...nsula.com>
Date: Fri, 4 Mar 2016 14:16:24 +0100
Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static
inline" in
 mpi-inline.h and mpi-internal.h

With compilers which follow the C99 standard (like modern versions of
gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). "static inline" is the correct
choice
instead.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@...nsula.com>
Signed-off-by: Gianfranco Costamagna <locutusofborg@...ian.org>
---
 lib/mpi/mpi-inline.h   | 2 +-
 lib/mpi/mpi-internal.h | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/mpi/mpi-inline.h b/lib/mpi/mpi-inline.h
index e2b3985..c245ea3 100644
--- a/lib/mpi/mpi-inline.h
+++ b/lib/mpi/mpi-inline.h
@@ -30,7 +30,7 @@
 #define G10_MPI_INLINE_H

 #ifndef G10_MPI_INLINE_DECL
-#define G10_MPI_INLINE_DECL  extern inline
+#define G10_MPI_INLINE_DECL  static inline
 #endif

 G10_MPI_INLINE_DECL mpi_limb_t
diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h
index c65dd1b..1baca30 100644
--- a/lib/mpi/mpi-internal.h
+++ b/lib/mpi/mpi-internal.h
@@ -168,19 +168,19 @@ void mpi_rshift_limbs(MPI a, unsigned int count);
 int mpi_lshift_limbs(MPI a, unsigned int count);

 /*-- mpihelp-add.c --*/
-mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
+static mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
 			 mpi_size_t s1_size, mpi_limb_t s2_limb);
 mpi_limb_t mpihelp_add_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
 			 mpi_ptr_t s2_ptr, mpi_size_t size);
-mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t
s1_size,
+static mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
mpi_size_t s1_size,
 		       mpi_ptr_t s2_ptr, mpi_size_t s2_size);

 /*-- mpihelp-sub.c --*/
-mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
+static mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
 			 mpi_size_t s1_size, mpi_limb_t s2_limb);
 mpi_limb_t mpihelp_sub_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
 			 mpi_ptr_t s2_ptr, mpi_size_t size);
-mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t
s1_size,
+static mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
mpi_size_t s1_size,
 		       mpi_ptr_t s2_ptr, mpi_size_t s2_size);

 /*-- mpihelp-cmp.c --*/
-- 
2.5.0



Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ