Bug 111287 - [PATCH] alternate signal stack bug corrupts RNaT bits
[PATCH] alternate signal stack bug corrupts RNaT bits
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Baron
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-01 14:07 EST by Bjorn Helgaas
Modified: 2013-03-06 00:56 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-11 21:07:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch (4.49 KB, patch)
2003-12-01 14:09 EST, Bjorn Helgaas
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:188 normal SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 3 Update 2 2004-05-11 00:00:00 EDT

  None (edit)
Description Bjorn Helgaas 2003-12-01 14:07:46 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)

Description of problem:
From http://marc.theaimsgroup.com/?l=linux-ia64&m=105617883916733:

On Fri, Jun 20, 2003 at 11:05:30PM -0700, David Mosberger wrote:
> >>>>> On Sat, 31 May 2003 00:18:39 +1000, Matt Chapman <matthewc@cse.unsw.edu.au> said:
> 
>   Matt> Currently when using an alternate stack for signal handling,
>   Matt> the trampoline code switches to the new register stack without
>   Matt> saving bspstore.  When returning to the original register
>   Matt> stack, it calculates the bspstore as:
> 
>   Matt>   bspstore0 = rse_skip_regs(bsp0, -rse_num_regs(bsp1 - (loadrs
>   Matt> >> 19), bsp1)); where bsp0 is sc->sc_ar_bsp and bsp1 is the
>   Matt> current bsp
> 
>   Matt> Presumably the result should be the same as the original
>   Matt> bspstore.  However, it isn't in the case when the original
>   Matt> bspstore is pointing to slot 63 (the RNAT word).  The new
>   Matt> bspstore comes out pointing to slot 0 of the next group, and
>   Matt> the RNAT bits never get written.
> 
> Yes, this is a problem.  Can you try the attached patch?  Rather than
> storing an additional sc_bspstore member, the backing-store switching
> code checks whether bspstore points to an RNaT slot and, if so, stores
> the RNaT manually.  This effectively "normalizes" the backing-store
> such that ar.bspstore never points to an RNaT slot.

Ah, that's a good way of doing it (given the constraints of backwards
compatibility).  I've tested your patch and it works well for me.



I applied the patch here:
http://lia64.bkbits.net:8080/linux-ia64-2.5/diffs/arch/ia64/kernel/gate.S@1.18

for the 2.4.23 ia64 patch.  I would expect the same patch to apply to the RHEL 3 kernel.

Version-Release number of selected component (if applicable):


How reproducible:
Didn't try

Steps to Reproduce:
No test case given.

Additional info:
Comment 1 Bjorn Helgaas 2003-12-01 14:09:06 EST
Created attachment 96262 [details]
Patch
Comment 3 John Flanagan 2004-05-11 21:07:51 EDT
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-188.html

Note You need to log in before you can comment on or make changes to this bug.