From: Andrew Morton <akpm@osdl.org>
To: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: discuss@x86-64.org, linux-kernel@vger.kernel.org, ak@suse.de,
nanhai.zou@intel.com, rohit.seth@intel.com,
rajesh.shah@intel.com
Subject: Re: [Patch] x86_64: TASK_SIZE fixes for compatibility mode processes
Date: Thu, 2 Jun 2005 13:50:13 -0700 [thread overview]
Message-ID: <20050602135013.4cba3ae2.akpm@osdl.org> (raw)
In-Reply-To: <20050602133256.A14384@unix-os.sc.intel.com>
"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.
next prev parent reply other threads:[~2005-06-02 20:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-02 20:32 [Patch] x86_64: TASK_SIZE fixes for compatibility mode processes Siddha, Suresh B
2005-06-02 20:50 ` Andrew Morton [this message]
2005-06-02 22:19 ` Siddha, Suresh B
2005-06-02 22:48 ` Andrew Morton
2005-06-02 23:06 ` [discuss] " Siddha, Suresh B
2005-06-03 15:48 ` Andi Kleen
2005-06-03 19:09 ` Siddha, Suresh B
2005-06-05 11:17 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050602135013.4cba3ae2.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=discuss@x86-64.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nanhai.zou@intel.com \
--cc=rajesh.shah@intel.com \
--cc=rohit.seth@intel.com \
--cc=suresh.b.siddha@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.