public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] x86: ia32_signal: change order of storing in setup_sigcontext()
Date: Mon, 17 Nov 2008 10:20:32 -0800	[thread overview]
Message-ID: <4921B5F0.6050105@ct.jp.nec.com> (raw)
In-Reply-To: <2375c9f90811150925l2aebbdfejed8725f15a801e1d@mail.gmail.com>

Américo Wang wrote:
> On Sat, Nov 15, 2008 at 3:28 AM, Hiroshi Shimamoto
> <h-shimamoto@ct.jp.nec.com> wrote:
>> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>>
>> Impact: cleanup
>>
>> Change order of storing to match the sigcontext_ia32.
> 
> 
> Well, more than reordering... Please see below.
> 
>> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>> ---
>>  arch/x86/ia32/ia32_signal.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
>> index 2883f41..909181a 100644
>> --- a/arch/x86/ia32/ia32_signal.c
>> +++ b/arch/x86/ia32/ia32_signal.c
>> @@ -360,13 +360,13 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
>>        err |= __put_user(regs->dx, &sc->dx);
>>        err |= __put_user(regs->cx, &sc->cx);
>>        err |= __put_user(regs->ax, &sc->ax);
>> -       err |= __put_user(regs->cs, &sc->cs);
>> -       err |= __put_user(regs->ss, &sc->ss);
>>        err |= __put_user(current->thread.trap_no, &sc->trapno);
>>        err |= __put_user(current->thread.error_code, &sc->err);
>>        err |= __put_user(regs->ip, &sc->ip);
>> +       err |= __put_user(regs->cs, (unsigned int __user *)&sc->cs);
>>        err |= __put_user(regs->flags, &sc->flags);
>>        err |= __put_user(regs->sp, &sc->sp_at_signal);
>> +       err |= __put_user(regs->ss, (unsigned int __user *)&sc->ss);
> 
> 
> Why do you add two casts? If these two are necessary, I am afraid the rest ones
> also need. :)

Thanks, I forgot to mention it.
This cast is to make this code same as arch/x86/kernel/signal_32.c.
No one cares upper part, but it makes improvement by avoiding operand
size prefix.

thanks,
Hiroshi Shimamoto

  reply	other threads:[~2008-11-17 18:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15  3:24 [PATCH 1/5] x86: ia32_signal: cleanup macro COPY Hiroshi Shimamoto
2008-11-15  3:26 ` [PATCH 2/5] x86: ia32_signal: introduce COPY_SEG_STRICT Hiroshi Shimamoto
2008-11-15 17:11   ` Américo Wang
2008-11-17 18:03     ` Hiroshi Shimamoto
2008-11-15  3:27 ` [PATCH 3/5] x86: ia32_signal: cleanup macro RELOAD_SEG Hiroshi Shimamoto
2008-11-15 17:15   ` Américo Wang
2008-11-15  3:28 ` [PATCH 4/5] x86: ia32_signal: remove using temporary variable Hiroshi Shimamoto
2008-11-15 17:22   ` Américo Wang
2008-11-17 18:09     ` Hiroshi Shimamoto
2008-11-15  3:28 ` [PATCH 5/5] x86: ia32_signal: change order of storing in setup_sigcontext() Hiroshi Shimamoto
2008-11-15 17:25   ` Américo Wang
2008-11-17 18:20     ` Hiroshi Shimamoto [this message]
2008-11-15 17:06 ` [PATCH 1/5] x86: ia32_signal: cleanup macro COPY Américo Wang
2008-11-17 17:57   ` Hiroshi Shimamoto
2008-11-17 23:44 ` [PATCH v2 " Hiroshi Shimamoto
2008-11-17 23:47   ` [PATCH v2 2/5] x86: ia32_signal: introduce COPY_SEG_STRICT Hiroshi Shimamoto
2008-11-17 23:52     ` H. Peter Anvin
2008-11-18  0:09       ` Hiroshi Shimamoto
2008-11-18 15:56         ` Ingo Molnar
2008-11-17 23:47   ` [PATCH v2 3/5] x86: ia32_signal: cleanup macro RELOAD_SEG Hiroshi Shimamoto
2008-11-17 23:48   ` [PATCH v2 4/5] x86: ia32_signal: remove using temporary variable Hiroshi Shimamoto
2008-11-17 23:49   ` [PATCH v2 5/5] x86: ia32_signal: change order of storing in setup_sigcontext() Hiroshi Shimamoto

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=4921B5F0.6050105@ct.jp.nec.com \
    --to=h-shimamoto@ct.jp.nec.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=xiyou.wangcong@gmail.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