How the kernel gives seg. fault for a scenario like this?
        Posted  
        
            by bala1486
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by bala1486
        
        
        
        Published on 2010-05-12T00:38:23Z
        Indexed on 
            2010/05/12
            0:44 UTC
        
        
        Read the original article
        Hit count: 419
        
linux
|segmentation-fault
I have a doubt in accessing some invalid data. How will the OS cause segmentation fault for a scenario like this?
Suppose a date segment has some 100 bytes. This will be mapped and a page table entry will be created. But the page size is 4K. Consider the data segment is aligned with this page boundary. So at first consider accessing a valid data within the 100 bytes. So now the page table entry is in TLB. Next if you try to access some invalid data between the 100 and 4K, the entry is there in page table and will it be allowed to access the invalid data???
Thanks, Bala
© Stack Overflow or respective owner