摘要: 目的:1. 驱动热身。网上有很多类似的文章可供参考。2. 在操作系统中, 编写这个设备的驱动。3. 为写qemu的watchdog驱动练手。有朋友问make的 watchdog驱动 需要什么准备,所以写这个blog。环境:ubuntu 12.04.4热身: 首先编写一个简单的 hello worl... 阅读全文
posted @ 2014-10-23 11:30 lvmxh 阅读(2378) 评论(0) 推荐(0) 编辑
摘要: 目的:1. 练习。网上有很多类似的文章可供参考。2. 为写qemu的watchdog驱动练手。有朋友问make的 watchdog驱动 需要什么准备,所以写这个blog。环境:ubuntu 12.04.4耗时(基于熟悉linux环境和操作系统的条件下): 1. make 时间 大于1个小时过程:1... 阅读全文
posted @ 2014-10-23 11:27 lvmxh 阅读(545) 评论(0) 推荐(0) 编辑
摘要: 扇区是硬件设备传送数据的基本单元,而块只是硬件设备请求一次I/O操作所涉及的一组相邻字节。在Linux中,块大小必须是2的幂,而且不能超过一个页面。此外,它必须是扇区大小的整数倍,因为每个块必须包含整数个扇区。因此,在PC体系结构中,允许块的大小为512、1024、2048和4096字节。同一个块设... 阅读全文
posted @ 2014-09-07 10:28 lvmxh 阅读(1909) 评论(0) 推荐(0) 编辑
摘要: 《 Practical Packet Analysis, 2nd Edition》 学习资料下载 ppa2ecaptures.zip http://www.nostarch.com/packet2.htm 从网站首页摘录以下内容。 It's easy to capture packets with 阅读全文
posted @ 2014-09-06 09:05 lvmxh 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 与进程联系的文件结构的关系示意图struct file{ struct list_head f_list; /*所有打开的文件形成一个链表*/ struct dentry *f_dentry; /*指向相关目录项的指针*/ struct vfsmount ... 阅读全文
posted @ 2014-09-04 23:20 lvmxh 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 调试网络的方法:(Debugging the kernel using Ftrace) $ watch -n1 -d sudo cat /proc/net/snmp$ watch -n1 -d sudo cat /proc/net/dev 1. $ sudo mount -t debugfs nod 阅读全文
posted @ 2014-09-02 22:29 lvmxh 阅读(754) 评论(0) 推荐(0) 编辑
摘要: just a diagram 一目了然。 对于isci 只是用过LIO和STGT 两种后端。 这里有各种后端的比较。 http://scst.sourceforge.net/comparison.html LIO的操作官方文档也非常详细。 http://www.linux-iscsi.org/Doc 阅读全文
posted @ 2014-09-02 22:17 lvmxh 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 所有的list函数见 include/linux/list.h自己从 include/linux/list.h 拷贝了一些函数到自己的list.c中, 然后练习了一下。没有别的目的,就是想熟练一下。毕竟linux内核代码中试用了大量的list函数。list的函数太方便使用了。文件:list.c 1... 阅读全文
posted @ 2014-08-24 00:02 lvmxh 阅读(720) 评论(0) 推荐(0) 编辑
摘要: 预备知识1. 客户机物理页框到宿主机虚拟地址转换http://blog.csdn.net/zhuriyuxiao/article/details/8968781http://www.tuicool.com/articles/NjY3uu2. KVM API简单的API例子http://smileja... 阅读全文
posted @ 2014-08-18 00:47 lvmxh 阅读(1830) 评论(0) 推荐(0) 编辑
摘要: 1. 目的 分析Ext2文件系统结构。 使用 debugfs 应该跟容易分析 Ext2文件系统结构 了解ext2的hole的 2. 准备工作 预习文件系统基本知识: http://www.doc88.com/p-66910733083.html 预习ext2的基本知识: 简直不要太硬了!一文带你彻底 阅读全文
posted @ 2014-08-04 00:39 lvmxh 阅读(1644) 评论(0) 推荐(0) 编辑