In Progress

add a new system call to the Linux kernel

For this project, you are required to write a system call which makes a process invisible, i.e.

the process is not listed in the /proc file system and thus cannot be seen using “ps” or

“top”. The prototype for your system call will be

long set_invisibility(pid_t pid, int flag);

The flag can be 0 (for OFF) or 1 (for ON). The system call turns the invisibility of a

process (given by its pid) OFF or ON based on the value of the flag. Only processes with root

privileges can successfully execute this system call. The call returns 0 on success and -1 on

failure.

To achieve this, you need to:

1. Add a new field to the task descriptor. The name and type of the field is:

int invisible;

(Note: This field should be added to the end of the task descriptor.)

If invisible=0 process is visible

If invisible=1 process is invisible

2. Modify the code used by the kernel when creating and initializing new processes.

(Note: A newly created process should have its invisible field initialized to 0.)

3. Write a system call which sets the invisibility field in the task descriptor if the caller

process has root privileges.

4. Add your system call to the kernel.

5. Modify the code that generates the /proc filesystem so that if the invisible field

of a process is set, it is not included.

6. Recompile the kernel.

7. Write a short test program that accepts the pid of the process and the invisibility status

information as input and makes the set_invisibility system call. The test

program should output the return value of the system call. Experiment by running the

program with and without root privileges.

Skills: C Programming

See more: add system call linux kernel, add field task descriptor name type field, add system call linux, creating a prototype, linux add system call, linux kernel invisible process proc, linux kernel system call add, system linux, a prototype is, system test, ProC, on-call, linux kernel, kernel, int, experiment, call, linux need root, add field code, system required, linux call, linux test project, short test, system file, call process

About the Employer:
( 2 reviews ) istanbul, Turkey

Project ID: #558608

Awarded to:

Atrigen

As we talked about

$50 USD in 4 days
(2 Reviews)
2.0

3 freelancers are bidding on average $83 for this job

INSTANTCODER

i can do this perfectly , please give me a chance to prove myself

$100 USD in 4 days
(38 Reviews)
4.4
MalkovMikhail

I can do it. Let me know version of Linux kernel and distrib vendor.

$100 USD in 2 days
(0 Reviews)
0.0