mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
powerpc/64: add stack protector support
On PPC64, as register r13 points to the paca_struct at all time, this patch adds a copy of the canary there, which is copied at task_switch. That new canary is then used by using the following GCC options: -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=offsetof(struct paca_struct, canary)) Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
c3ff2a5193
commit
06ec27aea9
6 changed files with 23 additions and 1 deletions
|
@ -256,6 +256,9 @@ struct paca_struct {
|
|||
struct slb_entry *mce_faulty_slbs;
|
||||
u16 slb_save_cache_ptr;
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
#ifdef CONFIG_STACKPROTECTOR
|
||||
unsigned long canary;
|
||||
#endif
|
||||
} ____cacheline_aligned;
|
||||
|
||||
extern void copy_mm_to_paca(struct mm_struct *mm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue