public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2024-04-17 20:11 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:11 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3fd243990decbecb032f6a4ea1c834d7d833c638

commit 3fd243990decbecb032f6a4ea1c834d7d833c638
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 92b64c09f1..014f695f85 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2024-04-02 15:57 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c33f1b57008d398e777ae39ffd64306752354a6e

commit c33f1b57008d398e777ae39ffd64306752354a6e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 92b64c09f1..014f695f85 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2024-02-09 17:35 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dc41807ca0583fcbe4ec5c30f3b709db8925d5cb

commit dc41807ca0583fcbe4ec5c30f3b709db8925d5cb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 1387525484..6265f82b7b 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2024-02-07 14:10 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:10 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2321f8fd9645d3bd7ef690cae8e4928bf4316cbe

commit 2321f8fd9645d3bd7ef690cae8e4928bf4316cbe
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 1387525484..6265f82b7b 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2024-01-29 18:01 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:01 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=27f4b54ab7478ebbc070cb794bfd19a8351ec50e

commit 27f4b54ab7478ebbc070cb794bfd19a8351ec50e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 1387525484..6265f82b7b 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2023-12-21 18:57 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f46b111c74d06fde64851cc378d3d35d19d9b23

commit 8f46b111c74d06fde64851cc378d3d35d19d9b23
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 1bff8bac88..8779891781 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2023-09-28 17:55 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:55 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7e089b518463ee8b2757cc943af17ad8bfa2bdb5

commit 7e089b518463ee8b2757cc943af17ad8bfa2bdb5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index ad3b800ccd..74b3377bea 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2023-08-30 12:40 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:40 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4f7bd93eb9e0346b7f5306e64e095a1b57329334

commit 4f7bd93eb9e0346b7f5306e64e095a1b57329334
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index ad3b800ccd..74b3377bea 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2023-02-09 19:52 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:52 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=42eea0b5d556c42ff500e80a5cef2324c3c4fef6

commit 42eea0b5d556c42ff500e80a5cef2324c3c4fef6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 48e85f8d5d..989b72a560 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -363,20 +364,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2022-10-28 17:45 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:45 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fce1ff0930c6faa72800fea94fb99189316c2daa

commit fce1ff0930c6faa72800fea94fb99189316c2daa
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 579eca0405..aea935dc52 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -430,20 +431,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

* [glibc/azanella/clang] Move inhibit_stack_protector to its own header
@ 2022-10-04 13:03 Adhemerval Zanella
  0 siblings, 0 replies; 11+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 13:03 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e5afde3831cfa3ceebeaa55d138b751fa45cf943

commit e5afde3831cfa3ceebeaa55d138b751fa45cf943
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Aug 25 09:47:31 2022 -0300

    Move inhibit_stack_protector to its own header
    
    It is used on tests as well.

Diff:
---
 include/libc-symbols.h   | 15 +--------------
 include/stackprotector.h | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index d1c63f3e58..b760da831c 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -87,6 +87,7 @@
 /* Obtain the definition of symbol_version_reference.  */
 #include <libc-symver.h>
 #include <libc-diag.h>
+#include <stackprotector.h>
 
 /* When PIC is defined and SHARED isn't defined, we are building PIE
    by default.  */
@@ -430,20 +431,6 @@ for linking")
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
 
-/* Used to disable stack protection in sensitive places, like ifunc
-   resolvers and early static TLS init.  */
-#ifdef HAVE_CC_NO_STACK_PROTECTOR
-# ifdef __clang__
-#  define inhibit_stack_protector \
-     __attribute__((no_stack_protector))
-# else
-#  define inhibit_stack_protector \
-    __attribute__ ((__optimize__ ("-fno-stack-protector")))
-# endif
-#else
-# define inhibit_stack_protector
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
diff --git a/include/stackprotector.h b/include/stackprotector.h
new file mode 100644
index 0000000000..10230bac06
--- /dev/null
+++ b/include/stackprotector.h
@@ -0,0 +1,38 @@
+/* Details about stack protection enablement and how to disable it.
+   Copyright (C) 2022 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _INCLUDE_STACKPROTECTOR_H
+#define _INCLUDE_STACKPROTECTOR_H
+
+#include <config.h>
+
+/* Used to disable stack protection in sensitive places, like ifunc
+   resolvers and early static TLS init.  */
+#ifdef HAVE_CC_NO_STACK_PROTECTOR
+# ifdef __clang__
+#  define inhibit_stack_protector \
+     __attribute__((no_stack_protector))
+# else
+#  define inhibit_stack_protector \
+    __attribute__ ((__optimize__ ("-fno-stack-protector")))
+# endif
+#else
+# define inhibit_stack_protector
+#endif
+
+#endif

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

end of thread, other threads:[~2024-04-17 20:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 20:11 [glibc/azanella/clang] Move inhibit_stack_protector to its own header Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:57 Adhemerval Zanella
2024-02-09 17:35 Adhemerval Zanella
2024-02-07 14:10 Adhemerval Zanella
2024-01-29 18:01 Adhemerval Zanella
2023-12-21 18:57 Adhemerval Zanella
2023-09-28 17:55 Adhemerval Zanella
2023-08-30 12:40 Adhemerval Zanella
2023-02-09 19:52 Adhemerval Zanella
2022-10-28 17:45 Adhemerval Zanella
2022-10-04 13:03 Adhemerval Zanella

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).