08 2021 档案
摘要:usb device connect kernel log 08-13 10:00:15.220 <4>[ 2790.586965] ==20201013==> hub_port_init 1 #008-13 10:00:15.220 <4>[ 2790.586974] Plug in USB Po
阅读全文
摘要:在看 代码时发现,如果设置了MAP_FIXED标志,函数就做一些极其简单的检查,然后就把你指定的addr返回给你,代表你查找的空闲的线性区找到了。 unsigned long 1371 get_unmapped_area_prot(struct file *file, unsigned long a
阅读全文
摘要:c misc .printk一些技巧 https://www.cnblogs.com/sky-heaven/p/7161373.html
阅读全文
摘要:读写信号量 读写信号量是对互斥信号量的改进,允许多个读者同时进入临界区,读者和写者互斥,写者和写者互斥,适合在以读为主的情况下使用。 读写信号量的定义: include/linux/rwsem.h struct rw_semaphore { atomic_long_t count; struct l
阅读全文
摘要:1、Standard commands (标准命令)2、System calls (系统调用)3、Library functions (库函数)4、Special devices (设备说明)5、File formats (文件格式)6、Games and toys (游戏和娱乐)7、Miscell
阅读全文
摘要:文章参考 Android 9.0 源码,以翻译为主,留做备用参考。Sepolicy 工具位于 system/sepolicy/tools/ build_policies.sh 为多个目标并行构建SELinux策略的工具。这对于在多个目标上快速闫增新的测试或Neveralow规则很有用。 用法: ./
阅读全文
摘要:selinux misc . selinux语法 Section 5.2. Types, Attributes, and Aliases https://flylib.com/books/en/2.803.1.40/1/ type type_name [ alias alias_set ] [, a
阅读全文
摘要:ext4 mount options fs/ext4/super.c static const struct mount_opts { int token; int mount_opt; int flags; } ext4_mount_opts[] = { {Opt_minix_df, EXT4_M
阅读全文
摘要:tune2fs tune2fs允許系統管理員在Linux ext2、ext3或ext4檔案系統上調整各種可調的檔案系統引數。這些選項的當前值可以使用-l選項顯示,也可以通過使用dumpe2fs (8)程式顯示。 此命令的適用範圍:RedHat、RHEL、Ubuntu、CentOS、SUSE、open
阅读全文
摘要:tty 3.控制终端(/dev/tty) 如果当前进程有控制终端(Controlling Terminal)的话,那么/dev/tty就是当前进程的控制终端的设备特殊文件。 可以使用命令”ps –ax”来查看进程与哪个控制终端相连。对于你登录的shell,/dev/tty就是你使用的终端, 设备号是
阅读全文
摘要:kernel misc . include/linux/string.h 在kernel里使用string类的函数,比如strstr()等,这些函数声明在include/linux/string.h,include <linux/string.h>即可 . /dev/tty, tty driver
阅读全文