Re: [off-list] a path toward killing thread_info

From: Andy Lutomirski
Date: Fri Jun 17 2016 - 19:24:31 EST


On Fri, Jun 17, 2016 at 4:04 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Jun 17, 2016 at 03:41:49PM -0700, Andy Lutomirski wrote:
>
>> PeterZ, I'm thinking of adding task_ti_flags_ptr to directly find the
>> ti flags word given a task_struct * so the scheduler can use it. Does
>> that seem reasonable to you?
>
> What are you trying to do? Merge task_struct and thread_info?

Merge thread_struct and thread_info, actually. The only functional
thing that thread_info provides is a place for arches to stash stuff.
I also want to end the era of stack overflows smashing data structures
at a fixed offset.

If we kill thread_info (on x86, anyway) and enable virtually mapped
stacks (which I just emailed out v2 of), then a stack overflow will
just OOPS cleanly on x86 without clobbering anything.