From: "H. Peter Anvin" <hpa@zytor.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: kill handle_signal()->set_fs()
Date: Sun, 10 Jul 2011 11:26:10 -0700 [thread overview]
Message-ID: <4E19EEC2.7060806@zytor.com> (raw)
In-Reply-To: <20110710164424.GA20261@redhat.com>
On 07/10/2011 09:44 AM, Oleg Nesterov wrote:
> handle_signal()->set_fs() has a nice comment which explains what
> set_fs() is, but it doesn't explain why it is needed and why it
> depends on CONFIG_X86_64.
>
> Afaics, the history of this confusion is:
>
> 1. I guess today nobody can explain why it was needed
> in arch/i386/kernel/signal.c, perhaps it was always
> wrong. This predates 2.4.0 kernel.
>
> 2. then it was copy-and-past'ed to the new x86_64 arch.
>
> 3. then it was removed from i386 (but not from x86_64)
> by b93b6ca3 "i386: remove unnecessary code".
>
> 4. then it was reintroduced under CONFIG_X86_64 when x86
> unified i386 and x86_64, because the patch above didn't
> touch x86_64.
>
> Remove it. ->addr_limit should be correct. Even if it was possible
> that it is wrong, it is too late to fix it after setup_rt_frame().
>
The main reason I could think of why this would be necessary is if we
take an event while we have fs == KERNEL_DS inside the kernel which is
then promoted to a signal. Are you absolutely sure that can't happen?
In particular, there should be a setting upstream of this, as you're
correctly pointing out that it's too late. If not, we might actually
have a problem.
-hpa
next prev parent reply other threads:[~2011-07-10 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-10 16:44 [PATCH] x86: kill handle_signal()->set_fs() Oleg Nesterov
2011-07-10 18:26 ` H. Peter Anvin [this message]
2011-07-10 18:40 ` Oleg Nesterov
2011-07-14 19:02 ` Oleg Nesterov
2011-07-15 5:47 ` [tip:x86/signal] x86: Kill handle_signal()->set_fs() tip-bot for Oleg Nesterov
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=4E19EEC2.7060806@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox