Create an Exception/Interrupt Handler in C and Assembly for linux kernel - 01/05/2018 13:32 EDT

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

Write an "Assembly handler" and a correspodning "C handler."

Try to follow the steps below and also the ones discussed in class yesterday:

Obtain the IDT table address using inline assembly. See store_idt()/load_idt() for loading and storing the IDT base address.

Replace the high and low address of IDT entry n with the new high/low address, where n is an exception number.

The new high and low address that would go into the IDT entry will be defined by your own assembly handler.

Write your own assembly handler. Use this handler address as the new high & low in IDT.

Your assembly handler will call your own C handler.

Your C handler will print or do something to indicate that your C handler is activated.

Your C handler will terminate normally and return to your assembly handler.

Upon returning from your C handler, your assembly handler will jump to the original asm handler.

Find the original C handler address from System.map.

The following statments in your application will generate a "divide error" exception with the message "Floating point exception."

int i=1, j=0;

printf("%d",i/j);

Make sure to include some print statements to indicate that the handler is activated.

Assembly C Programming Linux x86/x64 Assembler

Project ID: #16851757

About the project

2 proposals Remote project Active 5 years ago

2 freelancers are bidding on average $71 for this job

dbwebsolutions

Hi, I have over 5 years of experience in kernel coding. I have completed similar assignments in a Linux kernel for other students in the past. Please ping me to discuss further. Thanks, -Vinod

$30 USD in 5 days
(11 Reviews)
4.9
fahdhtolba

Hello , I have bachelor's degree in computer science and i have been programming in C/C++ for both linux and windows for more than 8 years.I have written various network applications some of which are down to the IP More

$111 USD in 2 days
(6 Reviews)
3.9