From: Jeff D. <jd...@ka...> - 2002-05-27 03:03:50
|
rc...@im... said: > First I thought about changing pte_mkuptodate() to clean _PAGE_NEWPROT > bit only for present ptes, since non-present ptes don't have this bit > on (do they?). No, they don't. There are two bits which have to be valid for all ptes, present (obviously), and new_page (because UML needs to be able to tell when something has just been swapped out so it can be unmapped). new_prot has no meaning for a swapped pte. > However that's not enough because this non-present pte > will be taken as having new protection (pte_newprot() == 1) and we > will try to protect a wrong pte in fix_range(), panicing. Thus I think > we actually can't have a _PAGE_NEWPROT bit that isn't exclusive for > swap types bit. Then we fix pte_newprot too. Incididentally, I got set_pte right, but missed pte_newprot and pte_mkuptodate. > I'd like to know what do you think about backing out this PAGE_NEWPROT > change and set it back as 0x100 (or even 0x200). Not much. That just papers over the bug without fixing it. This is fixed in my pool and will be in the next patch. Nice catch, BTW. Jeff |