Re: vmsplice exploits, stack protector and Makefiles
From: pageexec
Date: Thu Feb 14 2008 - 06:24:42 EST
On 14 Feb 2008 at 8:30, Ingo Molnar wrote:
> --- linux-x86.q.orig/arch/x86/kernel/process_64.c
> +++ linux-x86.q/arch/x86/kernel/process_64.c
> @@ -166,6 +166,15 @@ static inline void play_dead(void)
> void cpu_idle(void)
> {
> current_thread_info()->status |= TS_POLLING;
> +
> +#ifdef CONFIG_CC_STACKPROTECTOR
> + /*
> + * If we're the non-boot CPU, nothing set the PDA stack
> + * canary up for us. This is as good a place as any for
> + * doing that.
> + */
> + write_pda(stack_canary, current->stack_canary);
> +#endif
i wonder if these #ifdef's are really needed at all, even if one doesn't
use -fstack-protector, having the code set up the canary has like 0
performance impact. not to mention that i think the change in switch_to
means that it won't compile without CONFIG_CC_STACKPROTECTOR enabled and
instead of making that macro conditional it's just a lot easier to enable
the canary all the time.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/