public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/strub)] disable any actual stack scrubbing
@ 2021-07-25 1:43 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2021-07-25 1:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e9ba05ecaf93b4f9e22a3b1a5987f7b886ec9d70
commit e9ba05ecaf93b4f9e22a3b1a5987f7b886ec9d70
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Jul 22 06:49:07 2021 -0300
disable any actual stack scrubbing
Diff:
---
libgcc/strub.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libgcc/strub.c b/libgcc/strub.c
index fd6e27556e4..c70826b8f23 100644
--- a/libgcc/strub.c
+++ b/libgcc/strub.c
@@ -36,6 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# define TOPS <
#endif
+/* Go through the motions but don't grow the stack range to scrub, effectively
+ disabling it. FIXME: this is not meant to be available in production. */
+static SItype __strub_DISABLE = 1;
+
#define ATTRIBUTE_STRUB_CALLABLE __attribute__ ((__strub__ (3)))
/* Enter a stack scrubbing context, initializing the watermark to the caller's
@@ -53,7 +57,7 @@ __strub_update (void **watermark)
{
void *sp = __builtin_frame_address (0);
- if (sp TOPS *watermark)
+ if (!__strub_DISABLE && sp TOPS *watermark)
*watermark = sp;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/aoliva/heads/strub)] disable any actual stack scrubbing
@ 2021-07-25 15:58 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2021-07-25 15:58 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f7adbf12579decbb8a2eb8857b50065c7153f9de
commit f7adbf12579decbb8a2eb8857b50065c7153f9de
Author: Alexandre Oliva <oliva@adacore.com>
Date: Sat Jul 24 23:05:45 2021 -0300
disable any actual stack scrubbing
Diff:
---
libgcc/strub.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libgcc/strub.c b/libgcc/strub.c
index fd6e27556e4..c70826b8f23 100644
--- a/libgcc/strub.c
+++ b/libgcc/strub.c
@@ -36,6 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# define TOPS <
#endif
+/* Go through the motions but don't grow the stack range to scrub, effectively
+ disabling it. FIXME: this is not meant to be available in production. */
+static SItype __strub_DISABLE = 1;
+
#define ATTRIBUTE_STRUB_CALLABLE __attribute__ ((__strub__ (3)))
/* Enter a stack scrubbing context, initializing the watermark to the caller's
@@ -53,7 +57,7 @@ __strub_update (void **watermark)
{
void *sp = __builtin_frame_address (0);
- if (sp TOPS *watermark)
+ if (!__strub_DISABLE && sp TOPS *watermark)
*watermark = sp;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/aoliva/heads/strub)] disable any actual stack scrubbing
@ 2021-07-22 10:01 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2021-07-22 10:01 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ad784422308d24953ac2f2fddf922eba3fe60c97
commit ad784422308d24953ac2f2fddf922eba3fe60c97
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Jul 22 06:49:07 2021 -0300
disable any actual stack scrubbing
Diff:
---
libgcc/strub.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libgcc/strub.c b/libgcc/strub.c
index fd6e27556e4..c70826b8f23 100644
--- a/libgcc/strub.c
+++ b/libgcc/strub.c
@@ -36,6 +36,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# define TOPS <
#endif
+/* Go through the motions but don't grow the stack range to scrub, effectively
+ disabling it. FIXME: this is not meant to be available in production. */
+static SItype __strub_DISABLE = 1;
+
#define ATTRIBUTE_STRUB_CALLABLE __attribute__ ((__strub__ (3)))
/* Enter a stack scrubbing context, initializing the watermark to the caller's
@@ -53,7 +57,7 @@ __strub_update (void **watermark)
{
void *sp = __builtin_frame_address (0);
- if (sp TOPS *watermark)
+ if (!__strub_DISABLE && sp TOPS *watermark)
*watermark = sp;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-25 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 1:43 [gcc(refs/users/aoliva/heads/strub)] disable any actual stack scrubbing Alexandre Oliva
-- strict thread matches above, loose matches on Subject: below --
2021-07-25 15:58 Alexandre Oliva
2021-07-22 10:01 Alexandre Oliva
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).