Kernel, Virus and Programming

OOM has trouble to KVM, it can’t shot down the kvm

In Linux, if the system is out of memory, OOM will pick one process to kill. But someone reported the OOM can’t kill the qemu-kvm, that mean if you are running many VMs that eat up all the memory, the Linux will hang because OOM can’t kill them In tried to run 64 VMs using…
Read more


2013/03/17 0

Restructuring the debugger

At the moment, i am facing 2 big problems of bochs, the first one is unsolvable, bochs running too slow. It is ok if you are doing a hobby OS development, but if you are trying to use bochs to run a full feature Linux kernel or a windows 7, it is just so slow.…
Read more


2013/03/13 0

qemu single step will fail if current EIP hit a breakpoint

I use the following code to insert a breakpoint in physical address 0x1600000 qemu successfully hit the breakpoint and stop, then i try to single-step by the following code: Nothing happened, the EIP still stay in 0x1600000, but if i delete the breakpoint, the single step just work again. Am I missed something?


2013/02/14 0

when you debugging qemu, it will keep firing SIGUSR1 so gdb will always catched in some breakpooints that are not defined by you

when you debugging qemu, it will keep firing SIGUSR1 so gdb will always catched in some breakpooints that are not defined by you, to turn off the SIGUSR1, you have to: (gdb) info signal SIGUSR1 Signal Stop Print Pass to program Description SIGUSR1 Yes Yes Yes User defined signal 1 And if deemed to not…
Read more


2013/02/12 0

linker script offset seems crazy

linker script offset seems crazy, take a look the following two pictures  


2013/02/09 0

compile grub2 : error: ‘gets’ undeclared here

if you compile grub2 , you may get “error: ‘gets’ undeclared here yum”, to fix it, run the following command: sed -i -e ‘/gets is a security/d’ grub-core/gnulib/stdio.in.h  


2013/02/09 0

compile 64 bits newlib on 64 bits linux host

If you compile newlib in x86-64 host and want to have 64-bits newlib, you have to add “–disable-multilib“, otherwise you will get the following error:


2013/02/03 0

PSI probe for tomcat can’t generate chart

Add this “CATALINA_OPTS=-Djava.awt.headless=true” to catalina.sh


2013/01/31 0

newlib compile error in Fedora 18 64 bits

when you meet the following error, add “.code32” can fix it. ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S: Assembler messages: ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:18: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:21: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:22: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:23: Error: invalid instruction suffix for `push’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:72: Error: invalid instruction suffix for `pop’ ../../../../../../newlib-1.19.0/newlib/libc/machine/i386/memcmp.S:73: Error: invalid instruction suffix for…
Read more


2013/01/30 0

10 places where anyone can learn to code

Teens, tweens and kids are often referred to as “digital natives.” Having grown up with the Internet, smartphones and tablets, they’re often extraordinarily adept at interacting with digital technology. But Mitch Resnick, who spoke at TEDxBeaconStreet in November, is skeptical of this descriptor. Sure, young people can text and chat and play games, he says, “but that…
Read more


2013/01/30 1

In search of the anti-ddos device

http://dev.esl.eu/blog/2010/09/10/in-search-of-the-anti-ddos-device/ Preamble The following text describes the evaluation of the most reasonable solution in order to achieve the goal of protecting our infrastructure from DDoS attacks. All collected values and impressions do not lay claim to being correct nor complete. This article only reflects our experiences and data and therefore should be used to help…
Read more


2013/01/21 0

Fix the PermGen error in tomcat

Fix the PermGen error in tomcat, execute this before startup.sh: export JAVA_OPTS=”-XX:PermSize=2048m”


2013/01/15 0

Ported ubuntu theme to fedora

Ported ubuntu theme to fedora, tested on FC17, unzip themes.tar.bz2 in /usr/share/themes


2013/01/04 0

A x86 java disassembler from Maxine Project

I have been asking for a java x86 disassembler library for a long time, i finally found “Maxine” project from oracle, it is a VM project with built-in a x86 assembler written Java. I git-ed the source and compile them in eclipse, it works!, here is the source and screenshot. source : maxine_disassembler


2012/12/27 0

Lowest 7 levels of /lib, /bin, /usr/bin, /usr/lib

No recursive /bin /lib /usr/bin /usr/lib


2012/12/24 0

How to change Fedora’s font rendering to get an Ubuntu-like result

Font rendering is a matter of taste. However, I personally think Ubuntu’s default font rendering is the most eye-pleasing one of the whole Linux eco-system. And if a website’s CSS font stack is looking good on Ubuntu, you can be relatively sure that it also works for Mac or MS Windows as long as the used fonts are available on these…
Read more


2012/12/13 4

qemu-kvm’s library dependencies

chrome’s library dependencies


2012/12/11 0

chrome’s library dependencies

chrome’s library dependencies


2012/12/11 0

The way i compile elfutils

autoheader aclocal -I m4 autoconf automake -a -c ./configure make


2012/12/10 0

my .vimrc


2012/12/10 0

get out of the keying trouble when you start chrome in fedora 17

just add “–password-store=basic” in the option you start chrome.


2012/12/09 0

A great qemu development link

http://people.cs.nctu.edu.tw/~chenwj/dokuwiki/doku.php?id=qemu


2012/12/07 0

Filter out special character in json

$str=”`!@#$%^&*()_+[]\{}|;’:\”,./?”; $str=str_replace(“\\”,”\\\\”, $str); $str=str_replace(“\””,”\\\””, $str);


2012/11/29 0

Dev target 2013/02

1) port peter-bochs to qemu 2) finish new lib stub open() 3) make the libc layer fully working 4) Pass all PKU exams


2012/11/28 0

qemu-kvm is much slower than qemu for single-step

I can do 1500 single-steps per second in qemu. But i can only do 148 in qemu-kvm. I test it by: 1) create a debug server in qemu 2) send huge amount of “s” command from a java program, every “s” command will perform one single step action in qemu.


2012/11/28 0

fail to single step qemu

Hi all I created a simple debug server on qemu, it receives command from tcp, but when i try to single step qemu, it fails, it will keep running rather than stop in the next instruction. I have traced the code a little bit, for gdb, when gdb do single step, the process will throw…
Read more


2012/11/21 0