summaryrefslogtreecommitdiff
path: root/arch/x86/machine/ssp.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-04 01:06:38 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-04 12:10:08 +0200
commit8438bcc3168a4112487efaa60ff6d791b386706f (patch)
tree9af3e94d0d5c8eb179dad466bd3bd8ad4c592002 /arch/x86/machine/ssp.h
parentf074dac967f7f64ddf1c7f7dfb226b5acd9e2610 (diff)
x86: support stack smashing protection
Diffstat (limited to 'arch/x86/machine/ssp.h')
-rw-r--r--arch/x86/machine/ssp.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/x86/machine/ssp.h b/arch/x86/machine/ssp.h
new file mode 100644
index 00000000..f2783616
--- /dev/null
+++ b/arch/x86/machine/ssp.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017 Richard Braun.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _X86_SSP_H
+#define _X86_SSP_H
+
+#ifdef __LP64__
+#define SSP_GUARD_WORD 0xdeadd00ddeadd00d
+#else
+#define SSP_GUARD_WORD 0xdeadd00d
+#endif
+
+/*
+ * Offset, in words, of the SSP guard word.
+ */
+#define SSP_WORD_TLS_OFFSET 5
+
+#endif /* _X86_SSP_H */