public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: Test memmove_chk and memset_chk only in libc.so [BZ #21741]
@ 2017-07-09 21:27 H.J. Lu
  2017-07-10  7:28 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2017-07-09 21:27 UTC (permalink / raw)
  To: GNU C Library

Since there are no multiarch versions of memmove_chk and memset_chk,
test multiarch versions of memmove_chk and memset_chk only in libc.so.

OK for master?

H.J.
	[BZ #21741]
	* sysdeps/x86_64/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Test memmove_chk and memset_chk only
	in libc.so.
---
 sysdeps/x86_64/multiarch/ifunc-impl-list.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
index 7912dd0..909938e 100644
--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
@@ -57,6 +57,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memcmp_ssse3)
 	      IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_sse2))
 
+#ifdef SHARED
   /* Support sysdeps/x86_64/multiarch/memmove_chk.c.  */
   IFUNC_IMPL (i, name, __memmove_chk,
 	      IFUNC_IMPL_ADD (array, i, __memmove_chk,
@@ -86,6 +87,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memmove_chk_sse2_unaligned_erms)
 	      IFUNC_IMPL_ADD (array, i, __memmove_chk, 1,
 			      __memmove_chk_erms))
+#endif
 
   /* Support sysdeps/x86_64/multiarch/memmove.c.  */
   IFUNC_IMPL (i, name, memmove,
@@ -121,6 +123,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memrchr_avx2)
 	      IFUNC_IMPL_ADD (array, i, memrchr, 1, __memrchr_sse2))
 
+#ifdef SHARED
   /* Support sysdeps/x86_64/multiarch/memset_chk.c.  */
   IFUNC_IMPL (i, name, __memset_chk,
 	      IFUNC_IMPL_ADD (array, i, __memset_chk, 1,
@@ -145,6 +148,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      HAS_ARCH_FEATURE (AVX512F_Usable),
 			      __memset_chk_avx512_no_vzeroupper)
 	      )
+#endif
 
   /* Support sysdeps/x86_64/multiarch/memset.c.  */
   IFUNC_IMPL (i, name, memset,
-- 
2.9.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86-64: Test memmove_chk and memset_chk only in libc.so [BZ #21741]
  2017-07-09 21:27 [PATCH] x86-64: Test memmove_chk and memset_chk only in libc.so [BZ #21741] H.J. Lu
@ 2017-07-10  7:28 ` Andreas Schwab
  2017-07-19 15:40   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2017-07-10  7:28 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GNU C Library

On Jul 09 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:

> 	[BZ #21741]
> 	* sysdeps/x86_64/multiarch/ifunc-impl-list.c
> 	(__libc_ifunc_impl_list): Test memmove_chk and memset_chk only
> 	in libc.so.

Ok.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86-64: Test memmove_chk and memset_chk only in libc.so [BZ #21741]
  2017-07-10  7:28 ` Andreas Schwab
@ 2017-07-19 15:40   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2017-07-19 15:40 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GNU C Library

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

On Mon, Jul 10, 2017 at 12:28 AM, Andreas Schwab <schwab@suse.de> wrote:
> On Jul 09 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>
>>       [BZ #21741]
>>       * sysdeps/x86_64/multiarch/ifunc-impl-list.c
>>       (__libc_ifunc_impl_list): Test memmove_chk and memset_chk only
>>       in libc.so.
>
> Ok.
>
> Andreas.
>

i386 has the same issue.  I am checking in this.


-- 
H.J.

[-- Attachment #2: 0001-i386-Test-memmove_chk-and-memset_chk-only-in-libc.so.patch --]
[-- Type: text/x-patch, Size: 2649 bytes --]

From 47f27396591fdc4875ecc1663f6d4315edacb5a1 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Wed, 19 Jul 2017 08:39:18 -0700
Subject: [PATCH] i386: Test memmove_chk and memset_chk only in libc.so [BZ
 #21741]

Since there are no multiarch versions of memmove_chk and memset_chk,
test multiarch versions of memmove_chk and memset_chk only in libc.so.

	[BZ #21741]
	* sysdeps/i386/i686/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Test memmove_chk and memset_chk only
	in libc.so.
---
 ChangeLog                                     | 7 +++++++
 sysdeps/i386/i686/multiarch/ifunc-impl-list.c | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index b9dc70573b..d514f08b53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-07-19  H.J. Lu  <hongjiu.lu@intel.com>
 
+	[BZ #21741]
+	* sysdeps/i386/i686/multiarch/ifunc-impl-list.c
+	(__libc_ifunc_impl_list): Test memmove_chk and memset_chk only
+	in libc.so.
+
+2017-07-19  H.J. Lu  <hongjiu.lu@intel.com>
+
 	[BZ #21740]
 	* debug/Makefile (elide-routines.o): New.
 
diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c
index e8026a2a78..6e20cffb04 100644
--- a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c
+++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c
@@ -70,6 +70,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memcmp_ssse3)
 	      IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_ia32))
 
+#ifdef SHARED
   /* Support sysdeps/i386/i686/multiarch/memmove_chk.S.  */
   IFUNC_IMPL (i, name, __memmove_chk,
 	      IFUNC_IMPL_ADD (array, i, __memmove_chk,
@@ -83,6 +84,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memmove_chk_sse2_unaligned)
 	      IFUNC_IMPL_ADD (array, i, __memmove_chk, 1,
 			      __memmove_chk_ia32))
+#endif
 
   /* Support sysdeps/i386/i686/multiarch/memmove.S.  */
   IFUNC_IMPL (i, name, memmove,
@@ -102,6 +104,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memrchr_sse2)
 	      IFUNC_IMPL_ADD (array, i, memrchr, 1, __memrchr_ia32))
 
+#ifdef SHARED
   /* Support sysdeps/i386/i686/multiarch/memset_chk.S.  */
   IFUNC_IMPL (i, name, __memset_chk,
 	      IFUNC_IMPL_ADD (array, i, __memset_chk,
@@ -112,6 +115,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
 			      __memset_chk_sse2)
 	      IFUNC_IMPL_ADD (array, i, __memset_chk, 1,
 			      __memset_chk_ia32))
+#endif
 
   /* Support sysdeps/i386/i686/multiarch/memset.S.  */
   IFUNC_IMPL (i, name, memset,
-- 
2.13.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-19 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-09 21:27 [PATCH] x86-64: Test memmove_chk and memset_chk only in libc.so [BZ #21741] H.J. Lu
2017-07-10  7:28 ` Andreas Schwab
2017-07-19 15:40   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).