| 4086 | |
| 4087 | == test with i386 == |
| 4088 | * s0711489@ubuntu-lucid:~$ sudo insmod stackmod.ko |
| 4089 | * s0711489@ubuntu-lucid:~$ cat /proc/stackmod |
| 4090 | {{{ |
| 4091 | stack: 0 |
| 4092 | }}} |
| 4093 | |
| 4094 | * s0711489@ubuntu-lucid:~$ sudo mknod /dev/stack c 251 0 |
| 4095 | * s0711489@ubuntu-lucid:~$ sudo chmod 666 /dev/stack |
| 4096 | * s0711489@ubuntu-lucid:~$ echo hoge > /dev/stack |
| 4097 | * s0711489@ubuntu-lucid:~$ echo fuga > /dev/stack |
| 4098 | * s0711489@ubuntu-lucid:~$ cat /proc/stackmod |
| 4099 | {{{ |
| 4100 | stack: 2 |
| 4101 | stack.data[0].length: 5 |
| 4102 | stack.data[1].length: 5 |
| 4103 | }}} |
| 4104 | * s0711489@ubuntu-lucid:~$ cat /dev/stack |
| 4105 | {{{ |
| 4106 | fuga |
| 4107 | hoge |
| 4108 | }}} |
| 4109 | * s0711489@ubuntu-lucid:~$ dd if=/dev/zero of=/dev/stack bs=10 |
| 4110 | {{{ |
| 4111 | dd: writing `/dev/stack': No space left on device |
| 4112 | 129+0 records in |
| 4113 | 128+0 records out |
| 4114 | 1280 bytes (1.3 kB) copied, 0.00711637 s, 180 kB/s |
| 4115 | }}} |
| 4116 | * s0711489@ubuntu-lucid:~$ cat /proc/stackmod | tail |
| 4117 | {{{ |
| 4118 | stack.data[118].length: 10 |
| 4119 | stack.data[119].length: 10 |
| 4120 | stack.data[120].length: 10 |
| 4121 | stack.data[121].length: 10 |
| 4122 | stack.data[122].length: 10 |
| 4123 | stack.data[123].length: 10 |
| 4124 | stack.data[124].length: 10 |
| 4125 | stack.data[125].length: 10 |
| 4126 | stack.data[126].length: 10 |
| 4127 | stack.data[127].length: 10 |
| 4128 | }}} |
| 4129 | * s0711489@ubuntu-lucid:~$ cat /dev/stack |
| 4130 | * s0711489@ubuntu-lucid:~$ cat /proc/stackmod |
| 4131 | {{{ |
| 4132 | stack: 0 |
| 4133 | }}} |
| 4134 | |
| 4135 | == add author/description == |
| 4136 | * s0711489@ubuntu-lucid:~$ modinfo stackmod.ko |
| 4137 | {{{ |
| 4138 | filename: stackmod.ko |
| 4139 | license: Dual BSD/GPL |
| 4140 | author: Ken-ichi Mito, @mittyorz |
| 4141 | description: Kernel Stack Module |
| 4142 | depends: |
| 4143 | vermagic: 2.6.35.14 SMP mod_unload 686 |
| 4144 | parm: entry:max entry number (int) |
| 4145 | }}} |