随笔分类 - Linux
摘要:ptmxDESCRIPTION The file /dev/ptmx is a character file with major number 5 and minor number 2, usually of mode 0666 and owner.group of...
阅读全文
摘要:http://blog.includesecurity.com/2014/03/exploit-CVE-2014-0038-x32-recvmmsg-kernel-vulnerablity.htmlOn January 31st 2014 a post appeared on oss-seclist...
阅读全文
摘要:/** linux 2.6.37-3.8.8 - x86* @rikiji** requires System.map and /dev/ptmx* this: http://zmbs.net/~rikiji/perf_ptmx.c* original: http://fucksheep.org/~...
阅读全文
摘要:•mmap_min_addr forbids users from mapping low addresses1. First available in July 20072. Several circumventions were found3. Still disabled on many ma...
阅读全文
摘要:Buffer overflow in the read_server_hello function in lib/gnutls_handshake.c in GnuTLS before 3.1.25, 3.2.x before3.2.15, and 3.3.x before 3.3.4 allows...
阅读全文
摘要:http://ltp.sourceforge.net/Linux Test Project, 后台很硬,由SGI™发起, IBM维护,所以质量有保障。里面介绍了很多工具,对于一般的基准测试应该是真够用了,关键是开发源码,可以根据自己工程的需求,自己定制修改,本人由于工作原因阅读了(lmbench:l...
阅读全文
摘要:[PATCH] Fix an bad variable name erro in runltp script (/opt/ltp/runltp)Hi All,I got an error for the latest version 20140115 of ltp project.This erro...
阅读全文
摘要:Linux系统使用time计算命令执行的时间当测试一个程序或比较不同算法时,执行时间是非常重要的,一个好的算法应该是用时最短的。所有类UNIX系统都包含time命令,使用这个命令可以统计时间消耗。例如:[root@localhost ~]# time lsanaconda-ks.cfg insta...
阅读全文
摘要:vim /etc/lightdm/lightdm.confFinally, edit the file as shown below and save it.autologin-user=autologin-user-timeout=0
阅读全文
摘要:We added a system call to modify idt table, then programed it inmodify_idt.c1. Put our modify_idt.c file in/usr/src/linux-3.10.15/arch/x86/kernel2./us...
阅读全文
摘要:在一台機器上寫好這樣的Makefile用以編譯modulesobj-m:=hello.oCURRENT_PATH:=$(shell pwd)VERSION_NUM:=$(shell uname -r)LINUX_PATH:=/usr/src/linux-$(VERSION_NUM)all : ma...
阅读全文
摘要:裝好ssh後,發覺無法用root登入,可是sshd_config接正確。後來發現原因在於,Ubuntu沒有root帳號,但是可以透過sudo -s拿到root權限。su root 密碼怎樣打也行不通,不過sudo -s卻可以。總之就是要用sudo -s 後 執行passwd 建立帳號ref.http...
阅读全文
摘要:Using perf, the Linux Performance Analysis tool on Ubuntu KarmicA lot has been going on with Linux performance counters (now called performance events...
阅读全文
摘要:ssh登录服务器时总是要停顿等待一下才能连接上,这是因为OpenSSH服务器有一个DNS查找选项UseDNS默认是打开的。UseDNS选项打开状态下,当客户端试图登录OpenSSH服务器时,服务器端先根据客户端的IP地址进行DNS PTR反向查询,查询出客户端的host name,然后根据查询出的客...
阅读全文
摘要:Fix invisible cursor issue in Ubuntu 13.10Fixing this problem is rather too easy. Open a terminal (Ctrl+Alt+T) and use the following command:gsettings...
阅读全文
摘要:ExplainShell官方網站:http://explainshell.com/原始碼下載:https://github.com/idank/explainshell用瀏覽器打該explainshell網站,在中間的欄位輸入你欲查詢的Linux指令。下面有提供了幾個範例,可以直接點選範例來查看解釋...
阅读全文
摘要:Linux Kernel中所應用的數據結構及演算法Basic Data Structures and Algorithms in the Linux kernelLinks are to thesource code on github.Linked list,doubly linked list,lock-free linked list.B+ Treeswith comments telling you what you can't find in the textbooks.A relatively simple B+Tree implementation. I have wri
阅读全文
摘要:suse11:~# cat tmp.lst4096 44096 44096 24096 48192 18192 48192 48192 48192 48192 48192 48192 48192 48192 48192 48192 48192 48192 48192 42048 42048 44096 4suse11:~# cat tmp.lst|awk'BEGIN{i=1;a=0}{sum[i]=$1;i=i+1}{while(i>0)( a=a+sum[i-1])( i--) }END{print a}'147456suse11:~# cat tmp.lst|awk&
阅读全文
摘要:EXPORT_SYMBOL只出现在2.6内核中,在2.4内核默认的非static 函数和变量都会自动导入到kernel 空间的, 都不用EXPORT_SYMBOL() 做标记的。2.6就必须用EXPORT_SYMBOL() 来导出来(因为2.6默认不到处所有的符号)。1、EXPORT_SYMBOL的作用是什么?EXPORT_SYMBOL标签内定义的函数或者符号对全部内核代码公开,不用修改内核代码就可以在您的内核模块中直接调用,即使用EXPORT_SYMBOL可以将一个函数以符号的方式导出给其他模块使用。这里要和System.map做一下对比:System.map 中的是连接时的函数地址。连接完
阅读全文
摘要:Kprobes是一种运行时动态调试内核的机制, 你可以用它设置断点并收集调试信息, 甚至改变内核行为.Kprobes分三种, 普通kprobes以及基于普通kprobes的jprobes和kretprobes. kprobes可以注入某个地址, jprobes用来注入某个函数入口, 而kretprobes则用来注入某个函数返回.实现原理Kprobes的实现主要利用了处理器的异常和单步执行特性. 以普通kprobes举例, 注册时它会复制一份被注入的指令, 并加入断点(例如x86的int 3), 当CPU执行到被注入的指令时就会陷入到Kprobes中, 此时Kprobes先运行钩子函数”pre_
阅读全文

浙公网安备 33010602011771号