UNIX Command $ls -l –author Cairo-0.2.0.tgz -rw-r–r– 1 jeffrin jeffrin jeffrin 164022 Oct 20 21:05 Cairo-0.2.0.tgz $ls -l Cairo-0.2.0.tgz -rw-r–r– 1 jeffrin jeffrin 164022 Oct 20 21:05 Cairo-0.2.0.tgz $ UNIX Explanation –author with -l, print the author of each file
Category Archives: Uncategorized
__generic_file_aio_write – write data to a file
1. __generic_file_aio_write – write data to a file ssize_t __generic_file_aio_write(struct kiocb * iocb, const struct iovec * iov, unsigned long nr_segs, loff_t * ppos); iocb IO state structure (file, offset, etc.) iov vector with data to write nr_segs number of segments in the vector ppos position where to write 2. Classroom Asynchronous I/O, or non-blocking …
Continue reading “__generic_file_aio_write – write data to a file”
readelf (-a option) Displays information about ELF files
UNIX Command $cat hello.c #include main() { int d; scanf(“%d”,d); printf(“%d”,d); } $gcc hello.c $ulimit -c unlimited $./a.out 3 Segmentation fault (core dumped) $readelf -s core $readelf -a core ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2’s complement, little endian …
Continue reading “readelf (-a option) Displays information about ELF files”
grep ( -c option )
UNIX Command $grep -c pack resume.txt 0 $grep -c Linux resume.txt 9 $grep -c Lin resume.txt 9 $grep -c Li resume.txt 9 $grep -c L resume.txt 15 $grep -c engineer resume.txt 2 $grep -c 1976 resume.txt 1 $grep -c GNU resume.txt 5 $ UNIX Explanation For (grep -c) Suppress normal output; instead print a count …
maps memory maps to executables and library files
1.Classroom maps Memory maps to executables and library files Get The Hang $sudo cat /proc/971/maps 00400000-00408000 r-xp 00000000 08:01 7422174 /sbin/syslogd 00607000-00608000 rw-p 00007000 08:01 7422174 /sbin/syslogd 00608000-00609000 rw-p 00000000 00:00 0 01429000-0144a000 rw-p 00000000 00:00 0 [heap] 7fd360fa5000-7fd360fb0000 r-xp 00000000 08:01 1466895 /lib/x86_64-linux-gnu/libnss_files-2.13.so 7fd360fb0000-7fd3611af000 —p 0000b000 08:01 1466895 /lib/x86_64-linux-gnu/libnss_files-2.13.so 7fd3611af000-7fd3611b0000 r–p 0000a000 08:01 1466895 …
Continue reading “maps memory maps to executables and library files”
mca_disable_dma – channel to disable DMA on
1. mca_disable_dma – channel to disable DMA on void mca_disable_dma(unsigned int dmanr); dmanr DMA channel 2. Classroom First of all, DMA (per se) is almost entirely obsolete. As originally defined, DMA controllers depended on thefact that the bus had separate lines to assert for memory read/write, and I/O read/write. The DMA controller took advantage of …
Continue reading “mca_disable_dma – channel to disable DMA on”
write_inode_now – write an inode to disk
1. write_inode_now – write an inode to disk This function commits an inode to disk immediately if it is dirty. This is primarily needed by knfsd.
vfs_lock_file – file byte range lock
1. vfs_lock_file – file byte range lock 2. Manual int vfs_lock_file(struct file * filp, unsigned int cmd, struct file_lock * fl, struct file_lock * conf); filp The file to apply the lock to cmd type of locking operation (F_SETLK, F_GETLK, etc.) fl The lock to be applied conf Place to return a copy of the …
[PATCH] udf: Fix deadlock when converting file from in-ICB one to normal one
[PATCH] udf: Fix deadlock when converting file from in-ICB one to normal one During BKL removal, conversion of files from in-ICB format to normal format got broken. We call ->writepage with i_data_sem held but udf_get_block() also acquires i_data_sem thus creating A-A deadlock. We fix the problem by dropping i_data_sem before calling ->writepage() which is safe …
Continue reading “[PATCH] udf: Fix deadlock when converting file from in-ICB one to normal one”
mutex_init .
1. mutex_init Initialize the mutex to unlocked state. 2. Classroom The point of a mutex is to synchronize two threads. When you have two threads attempting to access a single resource, the general pattern is to have the first block of code attempting access to set the mutex before entering the code. When the second …