lkml.org 
[lkml]   [2005]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] x86_64: TASK_SIZE fixes for compatibility mode processes
"Siddha, Suresh B" <suresh.b.siddha@intel.com> wrote:
>
> +#define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? IA32_PAGE_OFFSET : TASK_SIZE64)

The task size is an attribute of the task's mm_struct, not of the task.

The place where this tends to come unstuck is when a 32-bit task holds a
reference on a 64-bit tasks's task_struct via a read of a /proc file. If
the 64-bit task exits then it is the 32-bit task who does the final freeing
of the 64-bit tasks's task_struct and mm_struct. (and all vice-versa, of
course). Will your patch handle this race scenario correctly?

I don't have much confidence that we'll get all this stuff right until we
move the task-size info into the mm_struct proper. Testing the "size" of a
task would then be done via:

if (task->mm->mm_size == MM_SIZE_32)

or whatever. Although I suspect the number of places where we need to work
out the "size" of a task would fall markedly.
-
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/

\
 
 \ /
  Last update: 2005-06-02 23:02    [W:0.027 / U:3.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site