Bug 128848 - memory-attribute bits not preserved when changing protections
Summary: memory-attribute bits not preserved when changing protections
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: ia64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Anil S Keshavamurthy
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-07-30 15:22 UTC by XC Support
Modified: 2007-11-30 22:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-19 19:21:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description XC Support 2004-07-30 15:22:20 UTC
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 23:29:28 UTC
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 Program Management 2007-10-19 19:21:53 UTC
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.