Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/arm/arm32



> On Thursday 16 October 2003 10:52 am, Richard Earnshaw wrote:
> 
> > Assuming for the moment that the address being
> > accessed is permitted for that process, then if it's a permission
> > fault it must be as a result of an attempt to write.
> 
> True, although I'd have to double-check this is workable for kernel 
> faults too.
> 

I don't think the kernel can ever fault for a kernel-space access (by 
design it's a fatal error if it does).  The only exception to this is some 
PCI-space probes, where there is special code to handle this case.  For 
kernel accessing user space, then correct use of LDR[b]T/STR[b]T should 
mean that the kernel is using user-space permissions and thus the fault 
should behave the same way as if the user were doing the access.


> > A failure to
> > read the location will always result in a domain or translation
> > fault.
> 
> A failure to write the location may also result in a domain/translation 
> fault due to page reference tracking, if the first operation on an 
> unreferenced page is a write.
> 

True, but in that case the worst that would happen is that we would take a 
second fault after adding the page read-only on the first fault.

> > If that will work, then it really would be a GOOD THING.  Since it
> > would mean no further work is needed in this area to handle Thumb.
> 
> I don't think it's going to be quite that easy. :-/

R.




Home | Main Index | Thread Index | Old Index