summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/stackprotector.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-09-09 16:34:41 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-09-09 16:34:41 +0100
commite558bdc21ae1f0db520eccd84015e17d8a589973 (patch)
treeb436123bd52f267b8c7f361618cded3e1e4421ea /arch/sh/include/asm/stackprotector.h
parent746a272e44141af24a02f6c9b0f65f4c4598ed42 (diff)
parent9a3dc3186fc3795e076a4122da9e0258651a9631 (diff)
downloadop-kernel-dev-e558bdc21ae1f0db520eccd84015e17d8a589973.zip
op-kernel-dev-e558bdc21ae1f0db520eccd84015e17d8a589973.tar.gz
Merge branches 'fixes' and 'misc' into for-linus
Diffstat (limited to 'arch/sh/include/asm/stackprotector.h')
-rw-r--r--arch/sh/include/asm/stackprotector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sh/include/asm/stackprotector.h b/arch/sh/include/asm/stackprotector.h
index d9df3a7..141515a 100644
--- a/arch/sh/include/asm/stackprotector.h
+++ b/arch/sh/include/asm/stackprotector.h
@@ -19,6 +19,7 @@ static __always_inline void boot_init_stack_canary(void)
/* Try to get a semi random initial value. */
get_random_bytes(&canary, sizeof(canary));
canary ^= LINUX_VERSION_CODE;
+ canary &= CANARY_MASK;
current->stack_canary = canary;
__stack_chk_guard = current->stack_canary;
OpenPOWER on IntegriCloud