# open charles first
+# open charles first
./bin/charles
-
-
+
- Save charles’ private key and public key
diff --git a/_site/archivers/hello.html b/_site/archivers/hello.html
index dae519e..bb86cdb 100644
--- a/_site/archivers/hello.html
+++ b/_site/archivers/hello.html
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/_site/archivers/intro-unikernel.html b/_site/archivers/intro-unikernel.html
index fc51725..f80fd67 100644
--- a/_site/archivers/intro-unikernel.html
+++ b/_site/archivers/intro-unikernel.html
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/_site/archivers/intro-xv6.html b/_site/archivers/intro-xv6.html
index c16bbc8..9aa255b 100644
--- a/_site/archivers/intro-xv6.html
+++ b/_site/archivers/intro-xv6.html
@@ -10,8 +10,8 @@
-
-
+
+
@@ -77,19 +77,17 @@
Xv6 Systemcall
To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file user.h.
-void function (void);
-
-
+void function (void);
+
This interface-like function will then pass the function name, in this case function, to usys.S. When using user mode function in programs, usys.S will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from syscall.c and determining whether this system call is available. We must define same name system function and add it into syscall.h and syscall.c.
-#define SYS_function ## // ## is the system call number
+#define SYS_function ## // ## is the system call number
-[SYS_function] sys_function // real system function name
-
-extern int sys_function(void); // real system function declaration
-
-
+[SYS_function] sys_function // real system function name
+
+extern int sys_function(void); // real system function declaration
+
After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.
diff --git a/_site/archivers/some-of-my-previews-exper-work.html b/_site/archivers/some-of-my-previews-exper-work.html
index 9734814..254c7ec 100644
--- a/_site/archivers/some-of-my-previews-exper-work.html
+++ b/_site/archivers/some-of-my-previews-exper-work.html
@@ -10,8 +10,8 @@
-
-
+
+
@@ -103,12 +103,11 @@ But we also need some bash script to collect data through different size of rand
We need to use this simple awk code and vim operation to extract data.
-# CDC: content defined chucks
+# CDC: content defined chucks
# HUT: Http upload traffic
# ALL: overall time of one commit & upload
-awk '/CDC|HUT|ALL/ {print $4,$5}' ~/.ccnet/log/seafile.log > results.stat
-
-
+awk '/CDC|HUT|ALL/ {print $4,$5}' ~/.ccnet/log/seafile.log > results.stat
+
Install Seafile on odroid xu
@@ -125,13 +124,12 @@ awk '/CDC|HUT|ALL/ {print $4,$5}' ~/.ccnet/log/seafile.l
-# If .img end with xz, use this command to uncompress first
+# If .img end with xz, use this command to uncompress first
unxz ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img.xz
# Burn image into SD-card
-sudo dd if=ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img of=/dev/sdb bs=1M conv=fsync
-sync
-
-
+sudo dd if=ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img of=/dev/sdb bs=1M conv=fsync
+sync
+
2016-11
@@ -160,7 +158,7 @@ sync
If we want to debug under android, ftrace is a great tool for working. But, ftrace is not available in android if we used default configure file. Android kernel configuration is in arch/arm64/kernel/configs. We need to add few lines under that.
-CONFIG_STRICT_MEMORY_RWX=y
+CONFIG_STRICT_MEMORY_RWX=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_DYNAMIC_FTRACE=y
@@ -169,21 +167,19 @@ sync
CONFIG_PREEMPT_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_STACK_TRACER=y
-
-
+
How to extract android images: Dump an image
If we want to hold a rooted status after flashing boot, we need to extract an image from android devices. We can first use following command to find which blocks belongs to. According to some references, this article provide three ways to dump an image, I picked one for easy using.
-adb shell
-ls -al /dev/block/platform/$SOME\_DEVICE../../by-name # {Partitions} -> {Device Block}
+adb shell
+ls -al /dev/block/platform/$SOME\_DEVICE../../by-name # {Partitions} -> {Device Block}
# dump file
su
-dd if=/dev/block/mmcblk0p37 of=/sdcard/boot.img
-
-
+dd if=/dev/block/mmcblk0p37 of=/sdcard/boot.img
+
diff --git a/_site/category/index.html b/_site/category/index.html
index d8a12e7..414d5fb 100644
--- a/_site/category/index.html
+++ b/_site/category/index.html
@@ -11,8 +11,8 @@
">
-
-
+
+
diff --git a/_site/feed.xml b/_site/feed.xml
index 052e870..e2b1981 100644
--- a/_site/feed.xml
+++ b/_site/feed.xml
@@ -4,11 +4,11 @@
Stop Talking, Start Doing - 停止空想,开始行动
My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
- https://codersherlock.github.com//
-
- Fri, 28 Jul 2017 15:25:24 -0400
- Fri, 28 Jul 2017 15:25:24 -0400
- Jekyll v3.5.1
+ http://localhost:4000/
+
+ Fri, 23 Feb 2018 15:10:22 -0500
+ Fri, 23 Feb 2018 15:10:22 -0500
+ Jekyll v3.7.2
-
Xv6 introduction
@@ -19,27 +19,25 @@
<h2 id="xv6-systemcall">Xv6 Systemcall</h2>
<p>To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file <em>user.h</em>.</p>
-<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="kt">void</span> <span class="n">function</span> <span class="p">(</span><span class="kt">void</span><span class="p">);</span>
-</code></pre>
-</div>
+<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="n">function</span> <span class="p">(</span><span class="kt">void</span><span class="p">);</span>
+</code></pre></div></div>
<p>This interface-like function will then pass the function name, in this case function, to <em>usys.S</em>. When using user mode function in programs, <em>usys.S</em> will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from <em>syscall.c</em> and determining whether this system call is available. We must define same name system function and add it into <em>syscall.h</em> and <em>syscall.c</em>.</p>
-<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="cp">#define SYS_function ## // ## is the system call number
+<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#define SYS_function ## // ## is the system call number
</span>
-<span class="p">[</span><span class="n">SYS_function</span><span class="p">]</span> <span class="n">sys_function</span> <span class="c1">// real system function name
-</span>
-<span class="k">extern</span> <span class="kt">int</span> <span class="n">sys_function</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="c1">// real system function declaration
-</span></code></pre>
-</div>
+<span class="p">[</span><span class="n">SYS_function</span><span class="p">]</span> <span class="n">sys_function</span> <span class="c1">// real system function name</span>
+
+<span class="k">extern</span> <span class="kt">int</span> <span class="n">sys_function</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="c1">// real system function declaration</span>
+</code></pre></div></div>
<p>After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.</p>
<p>Sometimes, we need to pass variables among system calls. In this case, variables’ values are not necessary and even can’t be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process’ stack. In file <em>syscall.c</em>, multiple functions are provided to get these variables from the process. I won’t waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.</p>
Fri, 28 Jul 2017 14:56:55 -0400
- https://codersherlock.github.com//archivers/intro-xv6
- https://codersherlock.github.com//archivers/intro-xv6
+ http://localhost:4000/archivers/intro-xv6
+ http://localhost:4000/archivers/intro-xv6
xv6
@@ -68,8 +66,8 @@
Wed, 26 Jul 2017 12:42:33 -0400
- https://codersherlock.github.com//archivers/intro-unikernel
- https://codersherlock.github.com//archivers/intro-unikernel
+ http://localhost:4000/archivers/intro-unikernel
+ http://localhost:4000/archivers/intro-unikernel
unikernel
@@ -111,12 +109,11 @@ But we also need some bash script to collect data through different size of rand
<li>We need to use this simple awk code and vim operation to extract data.</li>
</ul>
-<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="c"># CDC: content defined chucks</span>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># CDC: content defined chucks</span>
<span class="c"># HUT: Http upload traffic</span>
<span class="c"># ALL: overall time of one commit & upload</span>
-awk <span class="s1">'/CDC|HUT|ALL/ {print $4,$5}'</span> ~/.ccnet/log/seafile.log > results.stat
-</code></pre>
-</div>
+<span class="nb">awk</span> <span class="s1">'/CDC|HUT|ALL/ {print $4,$5}'</span> ~/.ccnet/log/seafile.log <span class="o">></span> results.stat
+</code></pre></div></div>
<h3 id="install-seafile-on-odroid-xu">Install Seafile on odroid xu</h3>
@@ -133,13 +130,12 @@ awk <span class="s1">'/CDC|HUT|ALL/ {print $4,$5}'</span>
</li>
</ul>
-<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="c"># If .img end with xz, use this command to uncompress first</span>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># If .img end with xz, use this command to uncompress first</span>
unxz ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img.xz
<span class="c"># Burn image into SD-card</span>
-sudo dd <span class="k">if</span><span class="o">=</span>ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img <span class="nv">of</span><span class="o">=</span>/dev/sdb <span class="nv">bs</span><span class="o">=</span>1M <span class="nv">conv</span><span class="o">=</span>fsync
-sync
-</code></pre>
-</div>
+<span class="nb">sudo dd </span><span class="k">if</span><span class="o">=</span>ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img <span class="nv">of</span><span class="o">=</span>/dev/sdb <span class="nv">bs</span><span class="o">=</span>1M <span class="nv">conv</span><span class="o">=</span>fsync
+<span class="nb">sync</span>
+</code></pre></div></div>
<h1 id="2016-11">2016-11</h1>
@@ -168,7 +164,7 @@ sync
<p>If we want to debug under android, ftrace is a great tool for working. But, ftrace is not available in android if we used default configure file. Android kernel configuration is in <strong>arch/arm64/kernel/configs</strong>. We need to add few lines under that.</p>
-<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="nv">CONFIG_STRICT_MEMORY_RWX</span><span class="o">=</span>y
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">CONFIG_STRICT_MEMORY_RWX</span><span class="o">=</span>y
<span class="nv">CONFIG_FUNCTION_TRACER</span><span class="o">=</span>y
<span class="nv">CONFIG_FUNCTION_GRAPH_TRACER</span><span class="o">=</span>y
<span class="nv">CONFIG_DYNAMIC_FTRACE</span><span class="o">=</span>y
@@ -177,25 +173,23 @@ sync
<span class="nv">CONFIG_PREEMPT_TRACER</span><span class="o">=</span>y
<span class="nv">CONFIG_SCHED_TRACER</span><span class="o">=</span>y
<span class="nv">CONFIG_STACK_TRACER</span><span class="o">=</span>y
-</code></pre>
-</div>
+</code></pre></div></div>
<h3 id="how-to-extract-android-images-dump-an-image">How to extract android images: Dump an image</h3>
<p>If we want to hold a rooted status after flashing boot, we need to extract an image from android devices. We can first use following command to find which blocks belongs to. According to some references, <a href="http://forum.xda-developers.com/showthread.php?t=2450045">this article</a> provide three ways to dump an image, I picked one for easy using.</p>
-<div class="language-bash highlighter-rouge"><pre class="highlight"><code>adb shell
-ls -al /dev/block/platform/<span class="nv">$SOME</span><span class="se">\_</span>DEVICE../../by-name <span class="c"># {Partitions} -> {Device Block}</span>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>adb shell
+<span class="nb">ls</span> <span class="nt">-al</span> /dev/block/platform/<span class="nv">$SOME</span><span class="se">\_</span>DEVICE../../by-name <span class="c"># {Partitions} -> {Device Block}</span>
<span class="c"># dump file</span>
su
-dd <span class="k">if</span><span class="o">=</span>/dev/block/mmcblk0p37 <span class="nv">of</span><span class="o">=</span>/sdcard/boot.img
-</code></pre>
-</div>
+<span class="nb">dd </span><span class="k">if</span><span class="o">=</span>/dev/block/mmcblk0p37 <span class="nv">of</span><span class="o">=</span>/sdcard/boot.img
+</code></pre></div></div>
Fri, 28 Oct 2016 12:27:33 -0400
- https://codersherlock.github.com//archivers/some-of-my-previews-exper-work
- https://codersherlock.github.com//archivers/some-of-my-previews-exper-work
+ http://localhost:4000/archivers/some-of-my-previews-exper-work
+ http://localhost:4000/archivers/some-of-my-previews-exper-work
Research
@@ -220,10 +214,9 @@ My current solution is using AP to forward all SSL traffic to a proxy, <a hre
<li>You have to install charles first. After downloading the charles proxy, you have to unzip it and configure some basic settings.</li>
</ul>
-<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="c"># open charles first</span>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># open charles first</span>
./bin/charles
-</code></pre>
-</div>
+</code></pre></div></div>
<ul>
<li>Save charles’ private key and public key</li>
</ul>
@@ -236,8 +229,8 @@ You also need to save charles Root Certificate, it also contains in the same men
</ul>
Thu, 27 Oct 2016 22:50:33 -0400
- https://codersherlock.github.com//archivers/charles-is-not-a-good-tool
- https://codersherlock.github.com//archivers/charles-is-not-a-good-tool
+ http://localhost:4000/archivers/charles-is-not-a-good-tool
+ http://localhost:4000/archivers/charles-is-not-a-good-tool
Network
@@ -249,8 +242,8 @@ You also need to save charles Root Certificate, it also contains in the same men
Wed, 26 Oct 2016 22:50:33 -0400
- https://codersherlock.github.com//archivers/hello
- https://codersherlock.github.com//archivers/hello
+ http://localhost:4000/archivers/hello
+ http://localhost:4000/archivers/hello
Nonsense
diff --git a/_site/index.html b/_site/index.html
index c8fed87..c1af67d 100644
--- a/_site/index.html
+++ b/_site/index.html
@@ -11,8 +11,8 @@
">
-
-
+
+