Re: [PATCH] task_struct colouring ...

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri Nov 30 2001 - 20:24:32 EST


Davide Libenzi wrote:

>
> Again this is the "current" diff :
>
> static inline struct task_struct * get_current(void)
> {
> - struct task_struct *current;
> - __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
> - return current;
> + unsigned long *tskptr;
> + __asm__("andl %%esp,%0; ":"=r" (tskptr) : "0" (~8191UL));
> + return (struct task_struct *) *tskptr;
> }
>
> that will probably resolve in something like:
>
> movl %esp, %eax
> andl $-8192, %eax
> movl (%eax), %eax
>

This seems to confuddle the idea of colouring the kernel stack.

        -hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 30 2001 - 21:00:41 EST