Bug 128848 - memory-attribute bits not preserved when changing protections
memory-attribute bits not preserved when changing protections
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Anil S Keshavamurthy
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-30 11:22 EDT by XC Support
Modified: 2007-11-30 17:07 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-19 15:21:53 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)

  None (edit)
Description XC Support 2004-07-30 11:22:20 EDT
Description of problem:

This problem is causing our machines to reboot on IA64 when running 
certain applications over a Quadrics ELAN4 switch.  The Quadrics 
engineers investigated the problem and have provided an explanation 
as to the cause of the problem which I've shown below.  We did 
recompile the kernel with the suggested fix, also shown below, and it 
does appear to correct the problem.

Quadrics Explanation
--------------------

The problem looks to be that the change_protection() function in the 
linux kernel changes the protection using the pte_modify() macro.  
This only preserves the PPN, and accessed & dirty bits.  So the pte 
that is generated has "lost" the memory-attribute bits and so is 
effectivly write-back.

Interestingly this code is changed in the 2.6.8 kernels and is 
correct!

Suggested Fix
-------------

Please backport the fixes from asm-ia64/pgtable.h from 2.6.7 to 2.4.21

/* Mask of bits which may be changed by pte_modify(); the odd bits 
are there for _PAGE_PROTNONE */
#define _PAGE_CHG_MASK	(_PAGE_P | _PAGE_PROTNONE | _PAGE_PL_MASK | 
_PAGE_AR_MASK | _PAGE_ED)

#define pte_modify(_pte, newprot) \
	(__pte((pte_val(_pte) & ~_PAGE_CHG_MASK) | (pgprot_val
(newprot) & _PAGE_CHG_MASK)))



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

kernel-2.4.21-15

How reproducible:

This problem is reproducible using a combination of hardware and 
software.  I do not have a simple reproducer at this time, however.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Anil S Keshavamurthy 2006-03-10 18:29:28 EST
Do you still see this problem on RHEL3 U7 ? Please update your result so that
this can be address soon.
thanks,
Anil
Comment 3 RHEL Product and Program Management 2007-10-19 15:21:53 EDT
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.

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