From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Vineet Gupta <vgupta@synopsys.com>,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4.4 12/23] ARC: [arcompact] handle unaligned access delay slot corner case
Date: Fri, 10 Feb 2017 14:26:10 +0100 [thread overview]
Message-ID: <20170210132610.GA14908@kroah.com> (raw)
In-Reply-To: <20170210131925.GA6905@kroah.com>
On Fri, Feb 10, 2017 at 02:19:25PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Feb 10, 2017 at 12:51:48PM +0000, Ben Hutchings wrote:
> > On Tue, 2017-01-31 at 06:37 +0100, Greg Kroah-Hartman wrote:
> > > 4.4-stable review patch. If anyone has any objections, please let me know.
> > >
> > > ------------------
> > >
> > > From: Vineet Gupta <vgupta@synopsys.com>
> > >
> > > commit 9aed02feae57bf7a40cb04ea0e3017cb7a998db4 upstream.
> > >
> > > After emulating an unaligned access in delay slot of a branch, we
> > > pretend as the delay slot never happened - so return back to actual
> > > branch target (or next PC if branch was not taken).
> > >
> > > Curently we did this by handling STATUS32.DE, we also need to clear the
> > > BTA.T bit, which is disregarded when returning from original misaligned
> > > exception, but could cause weirdness if it took the interrupt return
> > > path (in case interrupt was acive too)
> > >
> > > One ARC700 customer ran into this when enabling unaligned access fixup
> > > for kernel mode accesses as well
> > >
> > > Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > > ---
> > > arch/arc/kernel/unaligned.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > --- a/arch/arc/kernel/unaligned.c
> > > +++ b/arch/arc/kernel/unaligned.c
> > > @@ -241,8 +241,9 @@ int misaligned_fixup(unsigned long addre
> > > if (state.fault)
> > > goto fault;
> > >
> > > + /* clear any remanants of delay slot */
> > > if (delay_mode(regs)) {
> > > - regs->ret = regs->bta;
> > > + regs->ret = regs->bta ~1U;
> >
> > Unless you're doing something terrible with macros, this is missing an
> > & operator. I doubt this even compiled (looks like it's only used in
> > some ARC configurations).
>
> Hah, that's funny, it's obvious it isn't part of anyone's build tests,
> so I guess it must be just fine :)
Ah, nevermind, commit a524c218bc94c705886a0e0fedeee45d1931da32 that just
went into Linus's tree this week fixes this...
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Vineet Gupta <vgupta@synopsys.com>,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4.4 12/23] ARC: [arcompact] handle unaligned access delay slot corner case
Date: Fri, 10 Feb 2017 14:26:10 +0100 [thread overview]
Message-ID: <20170210132610.GA14908@kroah.com> (raw)
In-Reply-To: <20170210131925.GA6905@kroah.com>
On Fri, Feb 10, 2017 at 02:19:25PM +0100, Greg Kroah-Hartman wrote:
> On Fri, Feb 10, 2017 at 12:51:48PM +0000, Ben Hutchings wrote:
> > On Tue, 2017-01-31 at 06:37 +0100, Greg Kroah-Hartman wrote:
> > > 4.4-stable review patch.��If anyone has any objections, please let me know.
> > >
> > > ------------------
> > >
> > > From: Vineet Gupta <vgupta@synopsys.com>
> > >
> > > commit 9aed02feae57bf7a40cb04ea0e3017cb7a998db4 upstream.
> > >
> > > After emulating an unaligned access in delay slot of a branch, we
> > > pretend as the delay slot never happened - so return back to actual
> > > branch target (or next PC if branch was not taken).
> > >
> > > Curently we did this by handling STATUS32.DE, we also need to clear the
> > > BTA.T bit, which is disregarded when returning from original misaligned
> > > exception, but could cause weirdness if it took the interrupt return
> > > path (in case interrupt was acive too)
> > >
> > > One ARC700 customer ran into this when enabling unaligned access fixup
> > > for kernel mode accesses as well
> > >
> > > Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > >
> > > ---
> > > �arch/arc/kernel/unaligned.c |����3 ++-
> > > �1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > --- a/arch/arc/kernel/unaligned.c
> > > +++ b/arch/arc/kernel/unaligned.c
> > > @@ -241,8 +241,9 @@ int misaligned_fixup(unsigned long addre
> > > � if (state.fault)
> > > � goto fault;
> > > �
> > > + /* clear any remanants of delay slot */
> > > � if (delay_mode(regs)) {
> > > - regs->ret = regs->bta;
> > > + regs->ret = regs->bta ~1U;
> >
> > Unless you're doing something terrible with macros, this is missing an
> > & operator. I doubt this even compiled (looks like it's only used in
> > some ARC configurations).
>
> Hah, that's funny, it's obvious it isn't part of anyone's build tests,
> so I guess it must be just fine :)
Ah, nevermind, commit a524c218bc94c705886a0e0fedeee45d1931da32 that just
went into Linus's tree this week fixes this...
greg k-h
next prev parent reply other threads:[~2017-02-10 13:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 5:37 [PATCH 4.4 00/23] 4.4.46-stable review Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 01/23] fbdev: color map copying bounds checking Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 02/23] tile/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 04/23] mm/mempolicy.c: do not put mempolicy before using its nodemask Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 05/23] sysctl: fix proc_doulongvec_ms_jiffies_minmax() Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 06/23] ISDN: eicon: silence misleading array-bounds warning Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 07/23] RDMA/cma: Fix unknown symbol when CONFIG_IPV6 is not enabled Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 08/23] s390/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 10/23] can: ti_hecc: add missing prepare and unprepare of the clock Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 11/23] ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 12/23] ARC: [arcompact] handle unaligned access delay slot corner case Greg Kroah-Hartman
2017-02-10 12:51 ` Ben Hutchings
2017-02-10 13:19 ` Greg Kroah-Hartman
2017-02-10 13:19 ` Greg Kroah-Hartman
2017-02-10 13:26 ` Greg Kroah-Hartman [this message]
2017-02-10 13:26 ` Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 13/23] parisc: Dont use BITS_PER_LONG in userspace-exported swab.h header Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 14/23] nfs: Dont increment lock sequence ID after NFS4ERR_MOVED Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 15/23] NFSv4.0: always send mode in SETATTR after EXCLUSIVE4 Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 16/23] SUNRPC: cleanup ida information when removing sunrpc module Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 17/23] drm/i915: Dont leak edid in intel_crt_detect_ddc() Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 18/23] IB/ipoib: move back IB LL address into the hard header Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 19/23] IB/umem: Release pid in error and ODP flow Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 20/23] [media] s5k4ecgx: select CRC32 helper Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 21/23] pinctrl: broxton: Use correct PADCFGLOCK offset Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 22/23] platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT Greg Kroah-Hartman
2017-01-31 5:37 ` [PATCH 4.4 23/23] mm, memcg: do not retry precharge charges Greg Kroah-Hartman
2017-01-31 17:23 ` [PATCH 4.4 00/23] 4.4.46-stable review Guenter Roeck
2017-01-31 22:06 ` Shuah Khan
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=20170210132610.GA14908@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ben@decadent.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vgupta@synopsys.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.