cregit-Linux how code gets into the kernel

Release 4.8 arch/sh/include/asm/stackprotector.h

#ifndef __ASM_SH_STACKPROTECTOR_H

#define __ASM_SH_STACKPROTECTOR_H

#include <linux/random.h>
#include <linux/version.h>

extern unsigned long __stack_chk_guard;

/*
 * Initialize the stackprotector canary value.
 *
 * NOTE: this must only be called from functions that never return,
 * and it must always be inlined.
 */

static __always_inline void boot_init_stack_canary(void) { unsigned long canary; /* Try to get a semi random initial value. */ get_random_bytes(&canary, sizeof(canary)); canary ^= LINUX_VERSION_CODE; current->stack_canary = canary; __stack_chk_guard = current->stack_canary; }

Contributors

PersonTokensPropCommitsCommitProp
filippo arcidiaconofilippo arcidiacono41100.00%1100.00%
Total41100.00%1100.00%

#endif /* __ASM_SH_STACKPROTECTOR_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
filippo arcidiaconofilippo arcidiacono62100.00%1100.00%
Total62100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.