Team 1
When strings are written to a file, its inode must be updated. Change the kernel from
Shibata-team's phase 4 so that it kprints any update in any inode. In init create a file and keep adding strings to it. Check if the messages from kernel are compatible with the inode updates.
Team 2
You can create a file that resembles a device (loop device). In this file (loop device) we create a filesystem, so that, it is possible to mount it and use in your linux. See
https://www.thegeekdiary.com/how-to-create-virtual-block-device-loop-device-filesystem-in-linux/ . Using a
ubuntu, create a ext2 filesystem in a loop device. The ext2 filesystem structure is explained in
http://www.science.unitn.it/~fiorella/guidelinux/tlk/node95.html . Create a file in this ext2 loop device and keep adding strings to it. From moment to moment stop, and study the bytes in this loop device, i.e., study the bytes corresponding to the inodes. Are they what you expected?
Team 3
You can create a file that resembles a device (loop device). In this file (loop device) we create a filesystem, so that, it is possible to mount it and use in your linux. See
https://www.thegeekdiary.com/how-to-create-virtual-block-device-loop-device-filesystem-in-linux/ . Using a
ubuntu, create a ext2 filesystem in a loop device. The ext2 filesystem structure is explained in
http://www.science.unitn.it/~fiorella/guidelinux/tlk/node95.html . Create a directory in this ext2 loop device and a file inside it. From moment to moment stop, and study the bytes in this loop device, i.e., study the bytes corresponding to this new directory and new entrance (new file). Are they what you expected?
Team 4
There are system calls to work on directories. A directory is a file, basically, a dictionary that assigns a filename to a inode number. When a file is created in a directory, there must be a change in its structure. Study the source code of the linux related to this change in a dictionary (basically the system call opendir and open creating a new file). Change the kernel from
Shibata-team phase 4 so that it kprints whenever the dictionary is created or changed. In init create a directory and a file inside it. Check if the messages from kernel are compatible with what you expect.
Team 5
The Linux kernel doesn't read or write blocks on the disk as it is requested, in a FIFO order. Change the kernel from
Shibata-team phase 4 so that it
kprints whenever a block is accessed. Study and explain how the kernel organize the blocks. In init, create a file and using
lseek, insert strings in random positions. Compare these random positions to the block access. Are they what you expected?
Team 6
FUSE enables to mount devices that are nor really devices. For instance, it is possible to see a ftp connection as a local directory mounted through FUSE. Study and explain FUSE - filesystem in user space as in
https://www.tldp.org/LDP/khg/HyperNews/get/fs/vfstour.html . Using a
ubuntu, create a very simple FUSE that connects to some other directory (X) and simply changes the names of the files inserting "F" in front of them; so that when you make ls; instead of, for instance, seeing "hello" as in X you would see "Fhello". An example of a simple FUSE is in
https://medium.com/@jain.sm/file-system-in-user-space-example-a63a21236270
Team 7
Let us study how the rootfs is in fact change when the system call "write" is called. Change the kernel from
Shibata-team phase 4 so that it kprints whenever the write function of the device driver responsible to write in the rootfs is accessed. Insert a breakpoint whenever the device will write things and printscreen the backtrace (command bt) that shows all functions that were called untill the write on the device. Study and explain how the kernel responds to the system call write untill it asks for the device to write.
Team 8
Let us make the qemu access a pendrive so that it creates a file on it. Change the kernel from
Shibata-team phase 4 so that it
kprints whenever a block is read or write on the pendrive. Insert a breakpoint whenever the device will write things and
printscreen the backtrace (command bt) that shows all functions that were called until the write on the device. Study and explain how the kernel responds to the system call write until it asks for the device to write.
Team 9
The system call chmod changes the permission of a file but it is possible to change a file permission without the chmod. You can create a file that resembles a device (loop device). In this file (loop device) we create a filesystem, so that, it is possible to mount it and use in your linux. See
https://www.thegeekdiary.com/how-to-create-virtual-block-device-loop-device-filesystem-in-linux/ . Using a
ubuntu, create a ext2 filesystem in a loop device. The ext2 filesystem structure is explained in
http://www.science.unitn.it/~fiorella/guidelinux/tlk/node95.html . Create a file in this ext2 loop device and write something on it. See its permission. We may change its permission by modifying the byte inside the inode corresponding to its permission. Using an hex editor, its possible to modify a byte and change a file permission. Study the ext2 filesystem structure in
https://www.thegeekdiary.com/how-to-create-virtual-block-device-loop-device-filesystem-in-linux/ and modify such byte. Take printscreens to your report.
Team 10
It is important to check a filesystem. Study and explain how the fsck command works in your report. You can create a file that resembles a device (loop device). In this file (loop device) we create a filesystem, so that, it is possible to mount it and use in your linux. See
https://www.thegeekdiary.com/how-to-create-virtual-block-device-loop-device-filesystem-in-linux/ . Using a
ubuntu, create a ext2 filesystem in a loop device. The ext2 filesystem structure is explained in
http://www.science.unitn.it/~fiorella/guidelinux/tlk/node95.html . Create some files in your loop device. Check it with
fsck. It is possible to modify the ext2 loop device by changing some bytes of it. For instance: let us change the bitmap, setting a free block as used. Let us run the
fsck again. Does it show any error? Printscreen this experience in your report.
Comentários
Postar um comentário