[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimAR8ou0dwX_uB8g4pQQtu0+V5k5w@mail.gmail.com>
Date: Thu, 9 Jun 2011 14:06:42 +0200
From: Mathias Krause <minipli@...glemail.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Chris Metcalf <cmetcalf@...era.com>,
"David S. Miller" <davem@...emloft.net>,
Chris Zankel <chris@...kel.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, stable@...nel.org,
Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH] init: use KERNEL_DS when trying to start init process
On Thu, Jun 9, 2011 at 12:40 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Thu, Jun 09, 2011 at 10:14:03AM +0200, Mathias Krause wrote:
>
>> v1 was actually the alternative solution in run_init_process()
>> v2 was missing the set_fs() calls for SPARC, TILE and Xtensa
>
> sparc does not need it...
So do FRV, M68k (MMU and NOMMU) and PA-RISC. But they all call
set_fs(USER_DS) in flush_thread() and additionally in start_thread().
As those architectures aren't that visible for the average user, I
guess this is just an oversight that has no measurable performance
impact anyway.
For SPARC we might not want this duplicated work so the call to
set_fs() in flush_thread() should be removed to equalize the semantics
of that function between the different architectures -- call
set_fs(USER_DS) only in start_thread() (with the above exceptions).
...Albeit by looking closer at the implementation of flush_old_exec()
I think we should just move the set_fs() call there and remove it from
the architecture dependent implementations of flush_thread() and
start_thread(). flush_old_exec() is the real point of no return and
this way we get it consistent between all architectures.
What do you think?
Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists