{"push_id":2911230044,"size":2,"distinct_size":2,"ref":"refs/heads/_v5,2_2__powerpc_64_add_stack_protector_support_mbox_next","head":"8a56bdac1e6a2b6778e9ab16815cb145205d93f5","before":"ac0efc140186356f5123ba003b203f897e0ba2ba","commits":[{"sha":"38f52f3781619f77f3c3ef4c03b7872daf95bf5d","author":{"name":"Christophe Leroy","email":"4e2d3d12816ace76f1cfa36c1816509bd24cf089@c-s.fr"},"message":"powerpc/32: add stack protector support\n\nThis functionality was tentatively added in the past\n(commit 6533b7c16ee5 (\"powerpc: Initial stack protector\n(-fstack-protector) support\")) but had to be reverted\n(commit f2574030b0e3 (\"powerpc: Revert the initial stack\nprotector support\") because of GCC implementing it differently\nwhether it had been built with libc support or not.\n\nNow, GCC offers the possibility to manually set the\nstack-protector mode (global or tls) regardless of libc support.\n\nThis time, the patch selects HAVE_STACKPROTECTOR only if\n-mstack-protector-guard=tls is supported by GCC.\n\nOn PPC32, as register r2 points to current task_struct at\nall time, the stack_canary located inside task_struct can be\nused directly by using the following GCC options:\n-mstack-protector-guard=tls\n-mstack-protector-guard-reg=r2\n-mstack-protector-guard-offset=offsetof(struct task_struct, stack_canary))\n\nThe protector is disabled for prom_init and bootx_init as\nit is too early to handle it properly.\n\n $ echo CORRUPT_STACK > /sys/kernel/debug/provoke-crash/DIRECT\n[  134.943666] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: lkdtm_CORRUPT_STACK+0x64/0x64\n[  134.943666]\n[  134.955414] CPU: 0 PID: 283 Comm: sh Not tainted 4.18.0-s3k-dev-12143-ga3272be41209 #835\n[  134.963380] Call Trace:\n[  134.965860] [c6615d60] [c001f76c] panic+0x118/0x260 (unreliable)\n[  134.971775] [c6615dc0] [c001f654] panic+0x0/0x260\n[  134.976435] [c6615dd0] [c032c368] lkdtm_CORRUPT_STACK_STRONG+0x0/0x64\n[  134.982769] [c6615e00] [ffffffff] 0xffffffff\n\nSigned-off-by: Christophe Leroy <christophe.leroy@c-s.fr>","distinct":true,"url":"https://api.github.com/repos/ruscur/linux/commits/38f52f3781619f77f3c3ef4c03b7872daf95bf5d"},{"sha":"8a56bdac1e6a2b6778e9ab16815cb145205d93f5","author":{"name":"Christophe Leroy","email":"4e2d3d12816ace76f1cfa36c1816509bd24cf089@c-s.fr"},"message":"powerpc/64: add stack protector support\n\nOn PPC64, as register r13 points to the paca_struct at all time,\nthis patch adds a copy of the canary there, which is copied at\ntask_switch.\nThat new canary is then used by using the following GCC options:\n-mstack-protector-guard=tls\n-mstack-protector-guard-reg=r13\n-mstack-protector-guard-offset=offsetof(struct paca_struct, canary))\n\nSigned-off-by: Christophe Leroy <christophe.leroy@c-s.fr>","distinct":true,"url":"https://api.github.com/repos/ruscur/linux/commits/8a56bdac1e6a2b6778e9ab16815cb145205d93f5"}]}
{"actor":{"display_login":"ruscur"}}