From: Will Deacon <will.deacon@arm.com>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: "Wang, Yalin" <Yalin.Wang@sonymobile.com>,
'richard -rw- weinberger' <richard.weinberger@gmail.com>,
"'linux-arch@vger.kernel.org'" <linux-arch@vger.kernel.org>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'linux-arm-kernel@lists.infradead.org'"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: A bug about system call on ARM
Date: Fri, 31 May 2013 09:45:08 +0100 [thread overview]
Message-ID: <20130531084508.GA4928@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <alpine.LFD.2.03.1305302319430.30828@syhkavp.arg>
On Fri, May 31, 2013 at 04:54:56AM +0100, Nicolas Pitre wrote:
> On Thu, 30 May 2013, Will Deacon wrote:
>
> > On Thu, May 30, 2013 at 10:09:49AM +0100, Will Deacon wrote:
> > > On Thu, May 30, 2013 at 02:41:42AM +0100, Wang, Yalin wrote:
> > > > If you have some patch for this issue,
> > > > I can do the test for it .
> > >
> > > I'll have a look at cooking something which uses an exception table entry
> > > to rewind the PC and retry the system call. That's simpler than directly
> > > injecting a user page fault from the system call path.
> >
> > Ok, please can you try the following?
> >
> > Will
> >
> > --->8
> >
> > diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
> > index bc5bc0a..855926e 100644
> > --- a/arch/arm/kernel/entry-common.S
> > +++ b/arch/arm/kernel/entry-common.S
> > @@ -361,6 +361,15 @@ ENTRY(vector_swi)
> > str r8, [sp, #S_PSR] @ Save CPSR
> > str r0, [sp, #S_OLD_R0] @ Save OLD_R0
> > zero_fp
> > + enable_irq
> > + ct_user_exit
> > +
> > +#ifdef CONFIG_ALIGNMENT_TRAP
> > + ldr ip, __cr_alignment
> > + ldr ip, [ip]
> > + mcr p15, 0, ip, c1, c0 @ update control register
> > +#endif
>
> This is wrong. you must set up the align bit in the control register
> _before_ enabling IRQs or an IRQ handler might run without alignment
> fixup.
Okey doke, I can fix that up. I thought it was only needed for the network
layer, but I suppose they have interrupts over there too :)
> Otherwise the patch looks good to me.
Thanks Nicolas.
Will
next prev parent reply other threads:[~2013-05-31 8:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 6:52 A bug about system call on ARM Wang, Yalin
2013-05-29 7:34 ` richard -rw- weinberger
2013-05-29 7:37 ` Wang, Yalin
2013-05-29 8:24 ` Wang, Yalin
2013-05-29 8:46 ` richard -rw- weinberger
2013-05-29 9:48 ` Will Deacon
2013-05-29 9:50 ` Wang, Yalin
2013-05-30 1:41 ` Wang, Yalin
2013-05-30 9:09 ` Will Deacon
2013-05-30 11:41 ` Will Deacon
2013-05-30 11:41 ` Will Deacon
2013-05-31 2:56 ` Wang, Yalin
2013-05-31 8:46 ` Will Deacon
2013-05-31 11:02 ` Wang, Yalin
2013-05-31 11:13 ` Will Deacon
2013-05-31 11:30 ` Wang, Yalin
2013-06-03 5:25 ` Wang, Yalin
2013-06-03 9:54 ` Will Deacon
2013-06-03 9:58 ` Wang, Yalin
2013-06-04 5:33 ` Wang, Yalin
2013-06-04 8:48 ` Will Deacon
2013-06-04 8:48 ` Will Deacon
2013-06-04 9:30 ` Wang, Yalin
2013-06-04 11:27 ` Will Deacon
2013-06-14 6:53 ` Wang, Yalin
2013-05-31 16:48 ` Nicolas Pitre
2013-05-31 16:52 ` Will Deacon
2013-05-31 3:54 ` Nicolas Pitre
2013-05-31 3:54 ` Nicolas Pitre
2013-05-31 8:45 ` Will Deacon [this message]
2013-06-03 10:18 ` Russell King - ARM Linux
2013-06-03 10:27 ` Will Deacon
2013-06-03 10:45 ` Russell King - ARM Linux
2013-06-03 12:39 ` Will Deacon
2013-05-29 8:54 ` Mikael Pettersson
2013-05-29 8:54 ` Mikael Pettersson
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=20130531084508.GA4928@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=Yalin.Wang@sonymobile.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=richard.weinberger@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;
as well as URLs for NNTP newsgroup(s).