I have a doubt in accessing some invalid data. How can the OS cause a segmentation fault for a scenario like this:
Suppose a chunk of data is 100 bytes long, aligned at the beginning of a 4K page. If we access the valid data within the first 100 bytes of the page, this will load the page into memory, and put the page table entry is in TLB. If we now try to access some invalid data between the 100 and 4K, since the entry is there in page table already, will we be allowed to access the invalid data?