Question: Overview In this project, you'll be changing xv6 to support a feature virtually every modern OS does: causing an exception to occur when your program

 Overview In this project, you'll be changing xv6 to support afeature virtually every modern OS does: causing an exception to occur when

Overview In this project, you'll be changing xv6 to support a feature virtually every modern OS does: causing an exception to occur when your program dereferences a null pointer Sound simple? Well, it mostly is. But there are a few details Project description (Null-pointer Dereference) The following video is very useful to better understand PART A of the project Video 1 About the project: https://www.youtube.com/watch?v M2CPiVTm In xv6, the VM system uses a simple two-level page table as discussed in class. As it currently is structured, user code is loaded into the very first part of the address space. Thus, if you dereference a null pointer, you will not see an exception (as you might expect); rather, you will see whatever code is the first bit of code in the program that is running. Try it and see! Thus, the first thing you might do is create a program that dereferences a null pointer. It is simple! See if you can do it. Then run it on Linux as well as xv6, to see the difference. Your job here will be to figure out how xv6 sets up a page table. Thus, once again, this project is mostly about understanding the code, and not writing very much. Look at how execo works to better understand how address spaces get filled with code and in general initialized. That will get you most of the way. You should also look at fork), in particular the part where the address space of the child is created by copying the address space of the parent. What needs to change in there? The rest of your task will be completed by looking through the code to figure out where there are checks or assumptions made about the address space. Think about what happens when you pass a parameter into the kernel, for example; if passing a pointer, Overview In this project, you'll be changing xv6 to support a feature virtually every modern OS does: causing an exception to occur when your program dereferences a null pointer Sound simple? Well, it mostly is. But there are a few details Project description (Null-pointer Dereference) The following video is very useful to better understand PART A of the project Video 1 About the project: https://www.youtube.com/watch?v M2CPiVTm In xv6, the VM system uses a simple two-level page table as discussed in class. As it currently is structured, user code is loaded into the very first part of the address space. Thus, if you dereference a null pointer, you will not see an exception (as you might expect); rather, you will see whatever code is the first bit of code in the program that is running. Try it and see! Thus, the first thing you might do is create a program that dereferences a null pointer. It is simple! See if you can do it. Then run it on Linux as well as xv6, to see the difference. Your job here will be to figure out how xv6 sets up a page table. Thus, once again, this project is mostly about understanding the code, and not writing very much. Look at how execo works to better understand how address spaces get filled with code and in general initialized. That will get you most of the way. You should also look at fork), in particular the part where the address space of the child is created by copying the address space of the parent. What needs to change in there? The rest of your task will be completed by looking through the code to figure out where there are checks or assumptions made about the address space. Think about what happens when you pass a parameter into the kernel, for example; if passing a pointer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!