Refurnish

This commit is contained in:
Pengzhan Hao
2020-09-15 19:45:37 -04:00
parent d90da16f2c
commit df77702e4c
45 changed files with 729 additions and 1002 deletions
+2 -1
View File
@@ -1 +1,2 @@
.DS_Store
.jekyll-cache/*
@@ -0,0 +1 @@
I""{"source"=>"/Users/pengzhan/Github/codersherlock.github.io", "destination"=>"/Users/pengzhan/Github/codersherlock.github.io/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/archivers/:title"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"/archivers/:title", "paginate_path"=>"page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge"}, "title"=>"Stop Talking, Start Doing - 停止空想,开始行动", "author"=>"Pengzhan Hao", "avatar"=>"/static/avatar.jpg", "email"=>"haopengzhan@gmail.com", "description"=>"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.\n", "url"=>"https://codersherlock.github.com/", "github_username"=>"codersherlock", "disqus_shortname"=>"codersherlockblog", "gems"=>["jekyll-paginate", "jekyll-gist", "jemoji"], "paginate"=>5, "serving"=>false}:ET
@@ -1,12 +1,4 @@
---
layout: page
title: About - Timeline
permalink: /timeline/
public: false
nocomments: true
---
<div class="timeline">
I") <div class="timeline">
<div class="timeline__group">
<span class="timeline__year">Now</span>
@@ -15,17 +7,18 @@ nocomments: true
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">10</span>
<span clas="timeline__month">Sept</span>
<span class="timeline__day">21</span>
<span clas="timeline__month">Aug</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<p>Look up at the Starry Sky<audio controls><source src="/static/2018-09/beihang.mp3 type="audio/mpeg"></audio></p>
<img src="http://www.fsaona.com/images/imagesbigimg.jpg" height="250">
<p>Look up at the Starry Sky</p>
<audio controls=""><source src="/static/2018-09/beihang.mp3" type="audio/mpeg" /></audio>
<img src="http://www.fsaona.com/images/imagesbigimg.jpg" height="auto" />
</div>
</div>
</div>
<span class="timeline__year">2010</span>
<span class="timeline__year">2011</span>
</div>
<div class="timeline__group">
@@ -37,7 +30,7 @@ nocomments: true
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Transfered to another high school</p> -->
<img src="http://school.zhongkao.com/style/school/pictures/school/734/73421/logo.jpg" height="250">
<img src="http://school.zhongkao.com/style/school/pictures/school/734/73421/logo.jpg" height="250" />
</div>
</div>
</div>
@@ -53,7 +46,7 @@ nocomments: true
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Attened high school</p> -->
<img src="http://www.fuzhong.sd.cn/uploadfile/2015/0704/20150704044140866.jpg" height="250">
<img src="http://www.fuzhong.sd.cn/uploadfile/2015/0704/20150704044140866.jpg" height="250" />
</div>
</div>
</div>
@@ -69,7 +62,7 @@ nocomments: true
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Attened middle school</p> -->
<img src="https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike72%2C5%2C5%2C72%2C24/sign=5bc3fe5949540923be646b2cf331ba6c/3812b31bb051f819506a0330dab44aed2e73e779.jpg" height="250">
<img src="https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike72%2C5%2C5%2C72%2C24/sign=5bc3fe5949540923be646b2cf331ba6c/3812b31bb051f819506a0330dab44aed2e73e779.jpg" height="250" />
</div>
</div>
</div>
@@ -85,7 +78,7 @@ nocomments: true
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Attened primary school</p> -->
<img src="http://www.sdsdfx.com:85/fxjylm/u/cms/www/201510/27194804xvgc.jpg" height="250">
<img src="http://www.sdsdfx.com:85/fxjylm/u/cms/www/201510/27194804xvgc.jpg" height="250" />
</div>
</div>
</div>
@@ -108,3 +101,4 @@ nocomments: true
</div>
</div>
:ET
@@ -0,0 +1,2 @@
I"Š<p>This blog contains only some basic record of my works. For some details, I will write a unique blog just for some specific topics.</p>
:ET
@@ -0,0 +1,2 @@
I".<p>Where am I and where should I go?</p>
:ET
@@ -0,0 +1,100 @@
I"Õ<h1 id="pengzhan-hao">Pengzhan Hao</h1>
<p><strong>Position:</strong>         Research Assistant in MOSLab<br />
<strong>Education:</strong>      Doctoral Student of SUNY at Binghamton<br />
<strong>Email:</strong>             phao3 at binghamton dot edu<br />
<strong>Address:</strong><br />
                        MOSLab, H-6 Engineering Building<br />
                        Binghamton University<br />
                        4400 Vestal Parkway East<br />
                        Binghamton, NY 13902</p>
<h2 id="education">Education</h2>
<ul>
<li>2017.08 -                 Ph.D. in Computer Science, Binghamton University, NY, USA</li>
<li>2015.08 - 2017.05   M.E in Computer Science, Binghamton University, NY, USA</li>
<li>2011.08 - 2015.06   B.E in Software Engineering, Beihang University, Beijing, China</li>
</ul>
<h2 id="experience">Experience</h2>
<ul>
<li>2013.10 - 2014.09   <strong><em>Research Intern</em></strong> @ Advanced computer application technology engineering Research Center, Ministry of Education, China
<ul>
<li>Analyzed real-time routing problem and reliable algorithm design</li>
<li>Led and developed a routing system mostly backend server program</li>
<li>Participated in vehicle internet research</li>
<li>Supervised by <a href="http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&amp;secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&amp;thirdSelId=&amp;cardId=105c1bfe787-4d33-48eb-a05f-e2a6f3934216&amp;language=0&amp;curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN">Juhua Pu</a>, <a href="http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&amp;secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&amp;thirdSelId=&amp;cardId=3063cc45-7b8b-441a-86b2-3a4f59c26bd40&amp;language=0&amp;curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN">Zhang Xiong</a>, Related project: <a href="https://www.microsoft.com/en-us/research/project/urban-computing/">Urban Computing</a></li>
</ul>
</li>
<li>2013.10 - 2014.01   <strong><em>Research Intern</em></strong> @ Institute of Software, Chinese Academy of Sciences, China
<ul>
<li>Analyzed mobile OS kernel and Localized portion with C language</li>
<li>Supervised by <a href="http://soft.buaa.edu.cn/info/1060/1307.htm">Cangzhou Yuan</a></li>
</ul>
</li>
</ul>
<h2 id="research">Research</h2>
<ul>
<li>Graduate
<ul>
<li>Edge Computing
<ul>
<li>Network Performance</li>
</ul>
</li>
<li>Vitrualization</li>
</ul>
</li>
<li>Undergraduate
<ul>
<li>Urban Comuputing
<ul>
<li>Routing algorithm and system</li>
<li>Real-time data processing</li>
</ul>
</li>
<li>Mobile Operating System
<ul>
<li>Kernel Analysis</li>
<li>Locolization</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="publications">Publications</h2>
<ul>
<li>
<p><strong><a href="">A Case for Web Service Bandwidth Reduction on Mobile Devices with Edge-hosted Personal Services </a></strong> <br />
Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang <br />
The 37th IEEE International Conference on Computer Communications (<strong>IEEE INFOCOM</strong>)<br />
Honolulu, HI, USA, 2018.</p>
</li>
<li>
<p><strong><a href="/static/2018-02/a7-hao.pdf">EdgeCourier: An Edge-hosted Personal Service for Low-bandwidth Document Synchronization in Mobile Cloud Storage Services</a></strong> <strong>[<a href="">slide</a>]</strong><br />
<strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br />
The 2nd ACM/IEEE Symposium on Edge Computing (<strong>ACM/IEEE SEC</strong>)<br />
San Jose, CA, USA, 2017.</p>
</li>
<li>
<p><strong><a href="/static/2017-07/p169-zhang.pdf">Poster: Securing Device Inputs for Smartphones Using Hypervisor Based Approach</a></strong><br />
Xin Zhang, Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang<br />
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys)<br />
Niagara Falls, NY, USA, 2017.</p>
</li>
<li>
<p><strong><a href="/static/2017-07/p163-hao.pdf">Poster: EPS - Edge-hosted Personal Services for Mobile Users</a> [<a href="/static/2017-07/eps_poster.pdf">poster</a>]</strong><br />
<strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br />
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys)<br />
Niagara Falls, NY, USA, 2017.</p>
</li>
</ul>
<h2 id="fun">Fun</h2>
<ul>
<li>My <a href="/timeline/index.html">Timeline</a></li>
</ul>
:ET
@@ -0,0 +1,19 @@
I"± <p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p>
<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"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="nf">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"><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="nf">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>
:ET
@@ -0,0 +1,3 @@
I"Ó<p>In this blog, I will generally talk about how to use proper tools to monitor SSL traffics of a mobile devices. Currently, I only can dealing with those SSL traffics which use an obviously certification. Some applications may not using system root cert or they doesn’t provide us a method to modify their own certs. For these situation, I still didn’t find a good solutions for it. But I’ll keep updating this if I get one.<br />
My current solution is using AP to forward all SSL traffic to a proxy, <a href="https://www.charlesproxy.com/">charles proxy</a> is my first choice (Prof asked). It’s a non-free software which still update new versions now. So mainly, I’ll talk about how to charles SSL proxy.</p>
:ET
@@ -0,0 +1,111 @@
I"æ<p>This blog contains only some basic record of my works. For some details, I will write a unique blog just for some specific topics.</p>
<h1 id="2016-10">2016-10</h1>
<h2 id="time-experiment-of-rsync">Time Experiment of rsync</h2>
<p>Patch is based on rsync with version 3.1.2. [<a href="https://download.samba.org/pub/rsync/rsync-3.1.2.tar.gz">Rsync</a>|<a href="/static/2016-10/rsync/rsync-3.1.2-time.patch">Patch</a>]</p>
<h3 id="how-to-collect-data">How to collect data</h3>
<p>Basically, everything of transmission time and computation time will be output with overall time will be printed on the console.
But we also need some bash script to collect data through different size of random size and with different modification through them.</p>
<ul>
<li>Start from 8K to 64M, modify at beginning, [<a href="/static/2016-10/rsync/small2Big_change_at_begin.sh">Bash script</a>]</li>
<li>Start from 8K to 64M, modify at last, [<a href="/static/2016-10/rsync/small2Big_change_at_last.sh">Bash script</a>]</li>
<li>Start from 8K to 64M, modify at random place with a (slow) python script, [<a href="/static/2016-10/rsync/small2Big_change_at_anyplace.sh">Bash script</a>|<a href="/static/2016-10/rsync/addbyte.py">Python program</a>]</li>
</ul>
<h2 id="time-experiment-of-seafile">Time Experiment of seafile</h2>
<p>Patch is based on seafile 5.1.4. You can find the release from <a href="https://github.com/haiwen/seafile/releases">seafile official repo</a>. You may follow official compile instructions from <a href="https://manual.seafile.com/build_seafile/linux.html">here</a>. [<a href="">Patch <strong>no longer avaiable, new version at following sections</strong></a>]</p>
<h3 id="how-to-collect-data-1">How to collect data</h3>
<p>We also need everything be done using scripting. But this time I only design added some distance between two increasing files’ sizes.</p>
<ul>
<li>Start from 8K to 16M, 4 times increasing, modify at beginning/ at 1024 different places with python script. [<a href="/static/2016-11/seafile/trans.sh">Bash Script</a>|<a href="/static/2016-11/seafile/addbyte.py">Python program</a>]</li>
<li>After using this auto testing script, everything of output will be marked in log files of seafile, which located in <strong>~/.ccnet/log/seafile.log</strong></li>
<li>We need to use this simple awk code and vim operation to extract data.</li>
</ul>
<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 &amp; upload</span>
<span class="nb">awk</span> <span class="s1">'/CDC|HUT|ALL/ {print $4,$5}'</span> ~/.ccnet/log/seafile.log <span class="o">&gt;</span> results.stat
</code></pre></div></div>
<h3 id="install-seafile-on-odroid-xu">Install Seafile on odroid xu</h3>
<p>Due to failure of my cross-compile to seafile on android. I used develop board as a replacement experiment platform for ARM-seafile testing. I used a <a href="http://www.hardkernel.com/main/products/prdt_info.php?g_code=G137510300620">odroid xu</a> as hardware standard. Because all I need is an ARM platform, only an ARM-Ubuntu is enough for me. But develop prototype on a board is much fun than coding, I won’t address much this time. But I’ll start a blog telling some really cool stuff I made for a strange aim.</p>
<p>To install a ubuntu with GUI is my all preparation work. I found to way to do this.</p>
<ul>
<li>
<p><a href="http://www.armhf.com/boards/odroid-xu/">armhf</a> is a website for arm-based ubuntu. It has a detailed instruction to follow at <a href="http://www.armhf.com/boards/odroid-xu/odroid-sd-install/">here</a>. They also provide ubuntu 12.04/ 14.04 and debian 7.5 to choose. But unfortunately odroid xu’s hdmi output doesn’t supported by ubuntu native firmware. So install ubuntu-desktop might can’t be boot up for video output.</p>
</li>
<li>
<p>Burn images is much easy to install a pre-complied ubuntu system. I found this on odroid xu’s forum, which contains xubuntu image [<a href="http://odroid.in/ubuntu_14.04lts/ubuntu-14.04lts-xubuntu-odroid-xu-20140714.img.xz">download</a>] for odroid xu. With this image, you just need to use dd command to write whole system mirror into sdcard.</p>
</li>
</ul>
<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>
<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>
<h2 id="android-kernel">Android Kernel</h2>
<h3 id="how-to-build-an-android-kernel">How to build an Android Kernel?</h3>
<p>Generally, I won’t tell anything in this parts, just mark some related links, and point out some mistakes or error solutions.</p>
<ul>
<li>
<p><a href="http://source.android.com/source/building-kernels.html#figuring-out-which-kernel-to-build">Google Official Guide</a>
– If you don’t have AOSP sources, you have to download prebuilt toolchains which recommended in this guide might not be correct. Use following links to choose your fitting tools.
— <a href="https://android.googlesource.com/?format=HTML">ASOP git root</a>, under sub class “/platform/prebuilts/gccâ€</p>
</li>
<li>
<p><a href="https://softwarebakery.com/building-the-android-kernel-on-linux">Packing and Flashing a Boot.img</a> <strong>[highly recommend]</strong></p>
</li>
</ul>
<h1 id="2016-12">2016-12</h1>
<h2 id="android-kernel-1">Android Kernel</h2>
<h3 id="how-to-compile-with-ftrace">How to compile with ftrace?</h3>
<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"><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
<span class="nv">CONFIG_PERSISTENT_TRACER</span><span class="o">=</span>y
<span class="nv">CONFIG_IRQSOFF_TRACER</span><span class="o">=</span>y
<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></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"><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} -&gt; {Device Block}</span>
<span class="c"># dump file</span>
su
<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>
:ET
@@ -0,0 +1,30 @@
I"ò<p>In this blog, I will generally talk about how to use proper tools to monitor SSL traffics of a mobile devices. Currently, I only can dealing with those SSL traffics which use an obviously certification. Some applications may not using system root cert or they doesn’t provide us a method to modify their own certs. For these situation, I still didn’t find a good solutions for it. But I’ll keep updating this if I get one.<br />
My current solution is using AP to forward all SSL traffic to a proxy, <a href="https://www.charlesproxy.com/">charles proxy</a> is my first choice (Prof asked). It’s a non-free software which still update new versions now. So mainly, I’ll talk about how to charles SSL proxy.</p>
<h3 id="preparations">Preparations</h3>
<ul>
<li>Monitor device situation: Linux Machine with wireless adapter</li>
<li>Download the newest version(4.0.1) of charles</li>
<li>Target android devices with root privilege</li>
</ul>
<h3 id="install-charles-and-configuration">Install Charles and Configuration</h3>
<ul>
<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"><div class="highlight"><pre class="highlight"><code><span class="c"># open charles first</span>
./bin/charles
</code></pre></div></div>
<ul>
<li>Save charles’ private key and public key</li>
</ul>
<p>In Help -&gt; SSL Proxying -&gt; Export Charles Root Certificate and Private Key, enter a password and save the public and private key in *.p12 format.<br />
You also need to save charles Root Certificate, it also contains in the same menu. For convience, save it as *.pem format.</p>
<ul>
<li>Set Proxy and SSL Proxy</li>
</ul>
:ET
@@ -0,0 +1,2 @@
I"¤<p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p>
:ET
BIN
View File
Binary file not shown.
+58 -51
View File
@@ -1,88 +1,95 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.1)
activesupport (6.0.3.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.7)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
faraday (0.15.2)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.25)
ffi (1.13.1)
forwardable-extended (2.6.0)
gemoji (3.0.0)
html-pipeline (2.8.4)
gemoji (3.0.1)
html-pipeline (2.14.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.3)
jekyll (4.1.1)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (2.0.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.10.1)
jemoji (0.12.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (~> 3.0)
kramdown (1.17.0)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.3.0)
minitest (5.11.3)
multipart-post (2.0.0)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
octokit (4.11.0)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.4.0)
minitest (5.14.2)
multipart-post (2.1.1)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
octokit (4.18.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (3.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.7)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rouge (3.23.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
tzinfo (1.2.7)
thread_safe (~> 0.1)
unicode-display_width (1.7.0)
zeitwerk (2.4.0)
PLATFORMS
ruby
@@ -94,4 +101,4 @@ DEPENDENCIES
jemoji
BUNDLED WITH
1.16.4
2.1.4
Binary file not shown.
+2 -2
View File
@@ -7,7 +7,7 @@
# Site settings
title: Stop Talking, Start Doing - 停止空想,开始行动
author: Pengzhan Hao - 碾子
author: Pengzhan Hao
avatar: "/static/avatar.jpg"
email: haopengzhan@gmail.com
description: > # this means to ignore newlines until "baseurl:"
@@ -16,7 +16,7 @@ description: > # this means to ignore newlines until "baseurl:"
all happens in my Lab.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://codersherlock.github.com/" # the base hostname & protocol for your site
twitter_username: haopengzhan
# twitter_username: haopengzhan
github_username: codersherlock
disqus_shortname: codersherlockblog
+1
View File
@@ -9,6 +9,7 @@
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/timeline.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Binary file not shown.
-1
View File
@@ -7,7 +7,6 @@ categories: xv6
I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.
-------
## 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*.
+9 -9
View File
@@ -2,7 +2,7 @@
.page-heading {
font-size:40px;
font-weight: normal;
margin: 20px;
margin: 0px;
@include media-query($on-palm) {
margin: 10px;
font-size: 34px;
@@ -23,12 +23,12 @@
}
.post-list {
margin: 0;
padding: 20px 40px;
padding: 10px 0px;
list-style: none;
> li {
padding-bottom: 15px;
border-bottom: 1px solid #CCC;
margin-bottom: 15px;
padding-bottom: 5px;
border-bottom: 2px dotted rgb(63, 63, 63);
margin-bottom: 5px;
}
.post-title {
font-size: 28px;
@@ -37,14 +37,14 @@
}
.post-meta {
font-size: $small-font-size;
color: #666;
margin: 0 20px;
color: rgb(170, 170, 170);
margin: 0 0px;
margin-bottom: .5em;
}
.post-excerpt {
&, * {
font-size: $small-font-size;
line-height: $small-font-size;
line-height: $small-font-size * 1.1;
padding-top: 0;
padding-bottom: 0;
color: #333;
@@ -70,7 +70,7 @@
opacity: 1;
}
}
margin: 0 20px;
margin: 0 0px;
}
@include media-query($on-palm) {
padding: 10px;
+7 -2
View File
@@ -2,7 +2,7 @@
.post-header {
margin: 0 100px;
margin-bottom: 40px;
padding: 20px;
padding: 0px;
.post-title {
font-size:40px;
font-weight: normal;
@@ -28,14 +28,19 @@
h1,h2,h3,h4,h5,h6 {
color: #000;
}
h1 {
font-size: xx-large;
}
h1, h2 {
// font-weight: bold;
margin-bottom: 10px;
margin-top: 30px;
}
h1, h2, h3 {
border-bottom: 1px solid #CCC;
border-bottom: 1px dotted rgb(63, 63, 63);
}
pre {
+5 -8
View File
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//404.html">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -44,9 +45,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -87,16 +86,14 @@
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -127,7 +124,7 @@
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
Binary file not shown.
+14 -17
View File
@@ -6,13 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About « Stop Talking, Start Doing - 停止空想,开始行动</title>
<title>About Me « Stop Talking, Start Doing - 停止空想,开始行动</title>
<meta name="description" content="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.
">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//about/">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -44,9 +45,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -71,20 +70,20 @@
<div class="post">
<header class="post-header">
<h1 class="post-title">About</h1>
<h1 class="post-title">About Me</h1>
</header>
<article class="post-content">
<h1 id="pengzhan-hao">Pengzhan Hao</h1>
<p><strong>Position:</strong> Research Assistant in MOSLab<br />
<strong>Education:</strong> Doctoral Student of SUNY at Binghamton<br />
<strong>Email:</strong> phao3 at binghamton dot edu<br />
<p><strong>Position:</strong>         Research Assistant in MOSLab<br />
<strong>Education:</strong>      Doctoral Student of SUNY at Binghamton<br />
<strong>Email:</strong>             phao3 at binghamton dot edu<br />
<strong>Address:</strong><br />
MOSLab, H-6 Engineering Building<br />
Binghamton University<br />
4400 Vestal Parkway East<br />
Binghamton, NY 13902</p>
                        MOSLab, H-6 Engineering Building<br />
                        Binghamton University<br />
                        4400 Vestal Parkway East<br />
                        Binghamton, NY 13902</p>
<h2 id="education">Education</h2>
<ul>
@@ -185,16 +184,14 @@ Niagara Falls, NY, USA, 2017.</p>
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -225,7 +222,7 @@ Niagara Falls, NY, USA, 2017.</p>
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
@@ -12,6 +12,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/charles-is-not-a-good-tool">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -43,9 +44,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -129,16 +128,14 @@ You also need to save charles Root Certificate, it also contains in the same men
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -169,7 +166,7 @@ You also need to save charles Root Certificate, it also contains in the same men
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
+5 -8
View File
@@ -12,6 +12,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/hello">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -43,9 +44,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -101,16 +100,14 @@
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -141,7 +138,7 @@
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
+7 -12
View File
@@ -12,6 +12,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/intro-xv6">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -43,9 +44,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -77,19 +76,17 @@
<article class="post-content">
<p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p>
<hr />
<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"><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>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="nf">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"><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>
<span class="k">extern</span> <span class="kt">int</span> <span class="nf">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>
@@ -120,16 +117,14 @@
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -160,7 +155,7 @@
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
@@ -12,6 +12,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/some-of-my-previews-exper-work">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -43,9 +44,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -210,16 +209,14 @@ su
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -250,7 +247,7 @@ su
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
+5 -8
View File
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//category/">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -44,9 +45,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -116,16 +115,14 @@
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -156,7 +153,7 @@
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
+262 -525
View File
@@ -1,559 +1,296 @@
@charset "UTF-8";
body {
margin: 0;
font-family: "Open Sans", "Helvetica Neue", "DejaVu Sans", Arial, "PingFang SC", "Noto Sans CJK SC", "Hiragino Sans GB", "微软雅黑", Helvetica, sans-serif;
font-size: 15px;
line-height: 1.5; }
body { margin: 0; font-family: "Times New Roman"; font-size: 15px; line-height: 1.35; }
a {
text-decoration: none;
color: #036; }
a { text-decoration: none; color: #036; }
a:hover, a:focus {
text-decoration: underline;
color: #069; }
a:hover, a:focus { text-decoration: underline; color: #069; }
blockquote {
background: #FFF;
margin: 0;
padding: 5px 20px;
border-left: 10px solid #CCC; }
blockquote { background: #FFF; margin: 0; padding: 5px 20px; border-left: 10px solid #CCC; }
code, pre {
font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", "Liberation Mono", "文泉驿等宽微米黑", "Courier New", Courier, SimSun, monospace;
font-size: 12px; }
code, pre { font-family: "Courier New"; font-size: 12px; }
code {
color: #900;
background-color: #fff;
padding: 2px 5px;
border-radius: 5px; }
code { color: #900; background-color: #fff; padding: 2px 5px; border-radius: 5px; }
pre {
overflow-x: auto;
padding: 20px 50px; }
pre { overflow-x: auto; padding: 20px 50px; }
pre, pre code {
color: #fafafa;
background-color: #223; }
pre, pre code { color: #fafafa; background-color: #223; }
pre code {
padding: 0; }
pre code { padding: 0; }
.hide {
display: none; }
.hide { display: none; }
.center {
text-align: center; }
.center { text-align: center; }
table {
border-collapse: collapse;
border-spacing: 0;
margin: 10pt auto;
background: #FFF; }
table td, table th {
border: 1px solid #CCC;
padding: 5px 15px;
margin: 0; }
table th {
border-color: #555;
background: #555;
color: #eee;
font-weight: normal; }
table tr:hover {
background: rgba(255, 255, 0, 0.2); }
table { border-collapse: collapse; border-spacing: 0; margin: 10pt auto; background: #FFF; }
h1, h2, h3, h4, h5, h6 {
font-weight: normal; }
table td, table th { border: 1px solid #CCC; padding: 5px 15px; margin: 0; }
.wrapper {
margin: 0 auto;
max-width: 1100px; }
table th { border-color: #555; background: #555; color: #eee; font-weight: normal; }
@media (max-width: 1120px) {
.wrapper {
max-width: 800px; } }
.header {
line-height: 30px;
background-color: rgba(53, 0, 138, 0.89);
padding: 10px;
margin: 0; }
.header:after {
clear: both;
content: ' ';
display: block; }
.header .site-title {
float: left;
color: #FFF;
text-decoration: none;
font-size: 15px;
line-height: 30px; }
.header .site-nav {
text-align: right; }
.header .site-nav a {
text-decoration: none;
color: white;
padding: 10px 20px;
white-space: nowrap; }
.header .site-nav a:hover, .header .site-nav a:focus {
background: #2b0070; }
table tr:hover { background: rgba(255, 255, 0, 0.2); }
.page-content {
background: #e0e0e3;
padding: 30px 0; }
.page-content .wrapper {
position: relative;
background: #FAFAFA;
box-shadow: 0 1px 4px #999;
outline: 1px solid #CCC; }
.page-content .wrapper:after {
clear: both;
content: '';
display: block; }
.page-content .wrapper:before {
content: '';
display: block;
position: absolute;
width: 300px;
height: 100%;
left: 800px;
top: 0;
background: #EEE; }
.page-content img {
max-width: 100%; }
h1, h2, h3, h4, h5, h6 { font-weight: normal; }
.col-main {
position: relative;
box-sizing: border-box;
padding: 30px;
width: 800px;
float: left; }
.wrapper { margin: 0 auto; max-width: 1100px; }
.col-second {
position: relative;
box-sizing: border-box;
float: left;
width: 300px;
padding: 20px;
background: #EEE;
z-index: 10; }
@media (max-width: 1120px) { .wrapper { max-width: 800px; } }
.col-box {
color: #666;
font-size: 13.125px;
padding-bottom: 20px; }
.col-box p {
margin: 0; }
.col-box ul {
padding-left: 20px;
margin: 0; }
.col-box:not(:first-child) {
border-top: 1px solid #ccc;
padding-top: 20px; }
.col-box .col-box-title {
color: #333;
margin-bottom: 10px;
font-size: 14.4375px; }
.header { line-height: 30px; background-color: black; padding: 10px; margin: 0; }
@media (max-width: 1120px) {
.page-content .wrapper:before {
display: none; }
.header:after { clear: both; content: ' '; display: block; }
.col-main,
.col-second {
width: auto;
float: none; }
.header .site-title { float: left; color: white; text-decoration: none; font-size: 15px; line-height: 30px; }
.col-box {
width: 50%;
float: left;
margin-bottom: 10px; }
.header .site-nav { text-align: right; }
.col-box:not(:first-child) {
border-top: none;
padding-top: 0; }
.header .site-nav a { text-decoration: none; color: white; padding: 10px 20px; white-space: nowrap; }
.col-second:after {
clear: both;
display: block;
content: ' '; } }
.col-box-author {
text-align: center; }
.col-box-author .avatar {
width: 135px;
height: 135px;
border-radius: 100%;
margin: 20px auto;
display: block; }
.col-box-author .name {
font-size: 15px; }
.col-box-author .contact {
margin-top: 10px; }
.col-box-author .contact a {
background: #999;
color: #eee;
padding: 5px 10px;
text-decoration: none;
border-radius: 5px;
white-space: nowrap; }
.col-box-author .contact a:hover {
transition: background 0.3s ease;
background: #666; }
.header .site-nav a:hover, .header .site-nav a:focus { background: black; }
.footer {
padding: 60px 0;
background-color: #e0e0e3;
text-align: center;
color: #666;
font-size: 13.125px; }
.page-content { background: #e0e0e3; padding: 30px 0; }
.post .post-header {
margin: 0 100px;
margin-bottom: 40px;
padding: 20px; }
.post .post-header .post-title {
font-size: 40px;
font-weight: normal;
margin: 0 -100px; }
@media screen and (max-width: 600px) {
.post .post-header .post-title {
font-size: 34px; } }
.post .post-header .post-meta {
color: #999;
font-size: 13.125px;
margin: 0 -100px; }
@media screen and (max-width: 600px) {
.post .post-header {
text-align: center;
margin-bottom: 10px;
padding: 10px; } }
.post .post-content {
color: #333; }
.post .post-content h1, .post .post-content h2, .post .post-content h3, .post .post-content h4, .post .post-content h5, .post .post-content h6 {
color: #000; }
.post .post-content h1, .post .post-content h2 {
margin-bottom: 10px;
margin-top: 30px; }
.post .post-content h1, .post .post-content h2, .post .post-content h3 {
border-bottom: 1px solid #CCC; }
.post .post-content pre {
margin: 0 -30px; }
@media screen and (max-width: 600px) {
.post .post-content pre {
margin: 0 -10px; } }
.post .post-content .middle-image {
display: block;
margin-left: auto;
margin-right: auto; }
.post .post-comments {
padding-top: 30px; }
.page-content .wrapper { position: relative; background: #FAFAFA; box-shadow: 0 1px 4px #999; outline: 1px solid #CCC; }
.home .page-heading {
font-size: 40px;
font-weight: normal;
margin: 20px; }
@media screen and (max-width: 600px) {
.home .page-heading {
margin: 10px;
font-size: 34px; } }
.home .rss-link {
float: right;
text-decoration: none;
border: 1px solid;
color: #999;
background: #fff;
font-size: 10.5px;
padding: 1px 8px; }
.home .rss-link:hover, .home .rss-link:focus {
color: #666; }
.home .post-list {
margin: 0;
padding: 20px 40px;
list-style: none; }
.home .post-list > li {
padding-bottom: 15px;
border-bottom: 1px solid #CCC;
margin-bottom: 15px; }
.home .post-list .post-title {
font-size: 28px;
font-weight: bold;
margin: 0; }
.home .post-list .post-meta {
font-size: 13.125px;
color: #666;
margin: 0 20px;
margin-bottom: .5em; }
.home .post-list .post-excerpt {
margin: 0 20px; }
.home .post-list .post-excerpt, .home .post-list .post-excerpt * {
font-size: 13.125px;
line-height: 13.125px;
padding-top: 0;
padding-bottom: 0;
color: #333; }
.home .post-list .post-excerpt code, .home .post-list .post-excerpt pre, .home .post-list .post-excerpt pre * {
color: #666;
background-color: #eee; }
.home .post-list .post-excerpt th {
border-color: #ccc;
background-color: #ccc; }
.home .post-list .post-excerpt a {
color: #069; }
.home .post-list .post-excerpt img {
display: block;
margin: 1em auto;
max-height: 16em;
opacity: .7;
transition: opacity .3s; }
.home .post-list .post-excerpt img:hover {
opacity: 1; }
@media screen and (max-width: 600px) {
.home .post-list {
padding: 10px; } }
.home .pagination {
text-align: center;
text-decoration: none;
color: #666;
margin: 30px 0; }
.home .pagination .page_number {
margin: 0 30px; }
.home .pagination .previous, .home .pagination .next {
padding: 10px 20px;
white-space: nowrap; }
.home .pagination a.previous, .home .pagination a.next {
color: #333;
border-radius: 20px;
border: 1px solid #CCC; }
.home .pagination a.previous:hover, .home .pagination a.next:hover {
background: #fefefe;
color: #000;
text-decoration: none; }
.page-content .wrapper:after { clear: both; content: ''; display: block; }
@media screen and (max-width: 800px) {
.page-content {
padding: 0; }
.page-content .wrapper:before { content: ''; display: block; position: absolute; width: 300px; height: 100%; left: 800px; top: 0; background: #EEE; }
.footer {
padding: 15px 0; } }
@media screen and (max-width: 600px) {
.header, .header .site-nav {
text-align: center; }
.header .site-title {
float: none; }
.page-content img { max-width: 100%; }
.col-main {
padding: 10px; }
.col-main { position: relative; box-sizing: border-box; padding: 30px; width: 800px; float: left; }
.col-box {
width: 100%;
float: none;
margin-bottom: 20px; }
.col-second { position: relative; box-sizing: border-box; float: left; width: 300px; padding: 20px; background: #EEE; z-index: 10; }
.col-box { color: #666; font-size: 15px; padding-bottom: 20px; }
.col-box p { margin: 0; }
.col-box ul { padding-left: 20px; margin: 0; }
.col-box:not(:first-child) { border-top: 1px solid #ccc; padding-top: 20px; }
.col-box .col-box-title { color: #333; margin-bottom: 10px; font-size: 16.5px; }
@media (max-width: 1120px) { .page-content .wrapper:before { display: none; } .col-main, .col-second { width: auto; float: none; } .col-box { width: 50%; float: left; margin-bottom: 10px; } .col-box:not(:first-child) { border-top: none; padding-top: 0; } .col-second:after { clear: both; display: block; content: ' '; } }
.col-box-author { text-align: center; }
.col-box-author .avatar { width: 135px; height: 135px; border-radius: 100%; margin: 20px auto; display: block; }
.col-box-author .name { font-size: 15px; }
.col-box-author .contact { margin-top: 10px; }
.col-box-author .contact a { background: #999; color: #eee; padding: 5px 10px; text-decoration: none; border-radius: 5px; white-space: nowrap; }
.col-box-author .contact a:hover { transition: background 0.3s ease; background: #666; }
.footer { padding: 60px 0; background-color: #e0e0e3; text-align: center; color: #666; font-size: 15px; }
.post .post-header { margin: 0 100px; margin-bottom: 40px; padding: 0px; }
.post .post-header .post-title { font-size: 40px; font-weight: normal; margin: 0 -100px; }
@media screen and (max-width: 600px) { .post .post-header .post-title { font-size: 34px; } }
.post .post-header .post-meta { color: #999; font-size: 15px; margin: 0 -100px; }
@media screen and (max-width: 600px) { .post .post-header { text-align: center; margin-bottom: 10px; padding: 10px; } }
.post .post-content { color: #333; }
.post .post-content h1, .post .post-content h2, .post .post-content h3, .post .post-content h4, .post .post-content h5, .post .post-content h6 { color: #000; }
.post .post-content h1 { font-size: xx-large; }
.post .post-content h1, .post .post-content h2 { margin-bottom: 10px; margin-top: 30px; }
.post .post-content h1, .post .post-content h2, .post .post-content h3 { border-bottom: 1px dotted #3f3f3f; }
.post .post-content pre { margin: 0 -30px; }
@media screen and (max-width: 600px) { .post .post-content pre { margin: 0 -10px; } }
.post .post-content .middle-image { display: block; margin-left: auto; margin-right: auto; }
.post .post-comments { padding-top: 30px; }
.home .page-heading { font-size: 40px; font-weight: normal; margin: 0px; }
@media screen and (max-width: 600px) { .home .page-heading { margin: 10px; font-size: 34px; } }
.home .rss-link { float: right; text-decoration: none; border: 1px solid; color: #999; background: #fff; font-size: 10.5px; padding: 1px 8px; }
.home .rss-link:hover, .home .rss-link:focus { color: #666; }
.home .post-list { margin: 0; padding: 10px 0px; list-style: none; }
.home .post-list > li { padding-bottom: 5px; border-bottom: 2px dotted #3f3f3f; margin-bottom: 5px; }
.home .post-list .post-title { font-size: 28px; font-weight: bold; margin: 0; }
.home .post-list .post-meta { font-size: 15px; color: #aaaaaa; margin: 0 0px; margin-bottom: .5em; }
.home .post-list .post-excerpt { margin: 0 0px; }
.home .post-list .post-excerpt, .home .post-list .post-excerpt * { font-size: 15px; line-height: 16.5px; padding-top: 0; padding-bottom: 0; color: #333; }
.home .post-list .post-excerpt code, .home .post-list .post-excerpt pre, .home .post-list .post-excerpt pre * { color: #666; background-color: #eee; }
.home .post-list .post-excerpt th { border-color: #ccc; background-color: #ccc; }
.home .post-list .post-excerpt a { color: #002335; }
.home .post-list .post-excerpt img { display: block; margin: 1em auto; max-height: 16em; opacity: .7; transition: opacity .3s; }
.home .post-list .post-excerpt img:hover { opacity: 1; }
@media screen and (max-width: 600px) { .home .post-list { padding: 10px; } }
.home .pagination { text-align: center; text-decoration: none; color: #666; margin: 30px 0; }
.home .pagination .page_number { margin: 0 30px; }
.home .pagination .previous, .home .pagination .next { padding: 10px 20px; white-space: nowrap; }
.home .pagination a.previous, .home .pagination a.next { color: #333; border-radius: 20px; border: 1px solid #CCC; }
.home .pagination a.previous:hover, .home .pagination a.next:hover { background: #fefefe; color: #000; text-decoration: none; }
@media screen and (max-width: 800px) { .page-content { padding: 0; } .footer { padding: 15px 0; } }
@media screen and (max-width: 600px) { .header, .header .site-nav { text-align: center; } .header .site-title { float: none; } .col-main { padding: 10px; } .col-box { width: 100%; float: none; margin-bottom: 20px; } pre { padding: 10px; } }
pre {
padding: 10px; } }
/* Monokai Theme from https://github.com/richleland/pygments-css/blob/master/monokai.css */
.highlight {
/* Comment */
/* Error */
/* Keyword */
/* Literal */
/* Name */
/* Operator */
/* Punctuation */
/* Comment.Multiline */
/* Comment.Preproc */
/* Comment.Single */
/* Comment.Special */
/* Generic.Emph */
/* Generic.Strong */
/* Keyword.Constant */
/* Keyword.Declaration */
/* Keyword.Namespace */
/* Keyword.Pseudo */
/* Keyword.Reserved */
/* Keyword.Type */
/* Literal.Date */
/* Literal.Number */
/* Literal.String */
/* Name.Attribute */
/* Name.Builtin */
/* Name.Class */
/* Name.Constant */
/* Name.Decorator */
/* Name.Entity */
/* Name.Exception */
/* Name.Function */
/* Name.Label */
/* Name.Namespace */
/* Name.Other */
/* Name.Property */
/* Name.Tag */
/* Name.Variable */
/* Operator.Word */
/* Text.Whitespace */
/* Literal.Number.Float */
/* Literal.Number.Hex */
/* Literal.Number.Integer */
/* Literal.Number.Oct */
/* Literal.String.Backtick */
/* Literal.String.Char */
/* Literal.String.Doc */
/* Literal.String.Double */
/* Literal.String.Escape */
/* Literal.String.Heredoc */
/* Literal.String.Interpol */
/* Literal.String.Other */
/* Literal.String.Regex */
/* Literal.String.Single */
/* Literal.String.Symbol */
/* Name.Builtin.Pseudo */
/* Name.Variable.Class */
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */
/* Generic Heading & Diff Header */
/* Generic.Subheading & Diff Unified/Comment? */
/* Generic.Deleted & Diff Deleted */
/* Generic.Inserted & Diff Inserted */ }
.highlight .hll {
background-color: #49483e; }
.highlight .c {
color: #75715e; }
.highlight .err {
color: #960050;
background-color: #1e0010; }
.highlight .k {
color: #66d9ef; }
.highlight .l {
color: #ae81ff; }
.highlight .n {
color: #f8f8f2; }
.highlight .o {
color: #f92672; }
.highlight .p {
color: #f8f8f2; }
.highlight .cm {
color: #75715e; }
.highlight .cp {
color: #75715e; }
.highlight .c1 {
color: #75715e; }
.highlight .cs {
color: #75715e; }
.highlight .ge {
font-style: italic; }
.highlight .gs {
font-weight: bold; }
.highlight .kc {
color: #66d9ef; }
.highlight .kd {
color: #66d9ef; }
.highlight .kn {
color: #f92672; }
.highlight .kp {
color: #66d9ef; }
.highlight .kr {
color: #66d9ef; }
.highlight .kt {
color: #66d9ef; }
.highlight .ld {
color: #e6db74; }
.highlight .m {
color: #ae81ff; }
.highlight .s {
color: #e6db74; }
.highlight .na {
color: #a6e22e; }
.highlight .nb {
color: #f8f8f2; }
.highlight .nc {
color: #a6e22e; }
.highlight .no {
color: #66d9ef; }
.highlight .nd {
color: #a6e22e; }
.highlight .ni {
color: #f8f8f2; }
.highlight .ne {
color: #a6e22e; }
.highlight .nf {
color: #a6e22e; }
.highlight .nl {
color: #f8f8f2; }
.highlight .nn {
color: #f8f8f2; }
.highlight .nx {
color: #a6e22e; }
.highlight .py {
color: #f8f8f2; }
.highlight .nt {
color: #f92672; }
.highlight .nv {
color: #f8f8f2; }
.highlight .ow {
color: #f92672; }
.highlight .w {
color: #f8f8f2; }
.highlight .mf {
color: #ae81ff; }
.highlight .mh {
color: #ae81ff; }
.highlight .mi {
color: #ae81ff; }
.highlight .mo {
color: #ae81ff; }
.highlight .sb {
color: #e6db74; }
.highlight .sc {
color: #e6db74; }
.highlight .sd {
color: #e6db74; }
.highlight .s2 {
color: #e6db74; }
.highlight .se {
color: #ae81ff; }
.highlight .sh {
color: #e6db74; }
.highlight .si {
color: #e6db74; }
.highlight .sx {
color: #e6db74; }
.highlight .sr {
color: #e6db74; }
.highlight .s1 {
color: #e6db74; }
.highlight .ss {
color: #e6db74; }
.highlight .bp {
color: #f8f8f2; }
.highlight .vc {
color: #f8f8f2; }
.highlight .vg {
color: #f8f8f2; }
.highlight .vi {
color: #f8f8f2; }
.highlight .il {
color: #ae81ff; }
.highlight .gu {
color: #75715e; }
.highlight .gd {
color: #f92672; }
.highlight .gi {
color: #a6e22e; }
.highlight { /* Comment */ /* Error */ /* Keyword */ /* Literal */ /* Name */ /* Operator */ /* Punctuation */ /* Comment.Multiline */ /* Comment.Preproc */ /* Comment.Single */ /* Comment.Special */ /* Generic.Emph */ /* Generic.Strong */ /* Keyword.Constant */ /* Keyword.Declaration */ /* Keyword.Namespace */ /* Keyword.Pseudo */ /* Keyword.Reserved */ /* Keyword.Type */ /* Literal.Date */ /* Literal.Number */ /* Literal.String */ /* Name.Attribute */ /* Name.Builtin */ /* Name.Class */ /* Name.Constant */ /* Name.Decorator */ /* Name.Entity */ /* Name.Exception */ /* Name.Function */ /* Name.Label */ /* Name.Namespace */ /* Name.Other */ /* Name.Property */ /* Name.Tag */ /* Name.Variable */ /* Operator.Word */ /* Text.Whitespace */ /* Literal.Number.Float */ /* Literal.Number.Hex */ /* Literal.Number.Integer */ /* Literal.Number.Oct */ /* Literal.String.Backtick */ /* Literal.String.Char */ /* Literal.String.Doc */ /* Literal.String.Double */ /* Literal.String.Escape */ /* Literal.String.Heredoc */ /* Literal.String.Interpol */ /* Literal.String.Other */ /* Literal.String.Regex */ /* Literal.String.Single */ /* Literal.String.Symbol */ /* Name.Builtin.Pseudo */ /* Name.Variable.Class */ /* Name.Variable.Global */ /* Name.Variable.Instance */ /* Literal.Number.Integer.Long */ /* Generic Heading & Diff Header */ /* Generic.Subheading & Diff Unified/Comment? */ /* Generic.Deleted & Diff Deleted */ /* Generic.Inserted & Diff Inserted */ }
.page-content .wrapper .post-toc > ul {
overflow: auto; }
.highlight .hll { background-color: #49483e; }
.util-notify1 {
position: absolute;
z-index: 100;
background: rgba(0, 0, 0, 0.7);
color: #FFF;
padding: 5px 10px;
font-size: 14px;
pointer-events: none;
opacity: 1;
transition: .2s ease; }
.util-notify1.hidden {
opacity: 0;
display: none; }
.highlight .c { color: #75715e; }
.highlight .err { color: #960050; background-color: #1e0010; }
.highlight .k { color: #66d9ef; }
.highlight .l { color: #ae81ff; }
.highlight .n { color: #f8f8f2; }
.highlight .o { color: #f92672; }
.highlight .p { color: #f8f8f2; }
.highlight .cm { color: #75715e; }
.highlight .cp { color: #75715e; }
.highlight .c1 { color: #75715e; }
.highlight .cs { color: #75715e; }
.highlight .ge { font-style: italic; }
.highlight .gs { font-weight: bold; }
.highlight .kc { color: #66d9ef; }
.highlight .kd { color: #66d9ef; }
.highlight .kn { color: #f92672; }
.highlight .kp { color: #66d9ef; }
.highlight .kr { color: #66d9ef; }
.highlight .kt { color: #66d9ef; }
.highlight .ld { color: #e6db74; }
.highlight .m { color: #ae81ff; }
.highlight .s { color: #e6db74; }
.highlight .na { color: #a6e22e; }
.highlight .nb { color: #f8f8f2; }
.highlight .nc { color: #a6e22e; }
.highlight .no { color: #66d9ef; }
.highlight .nd { color: #a6e22e; }
.highlight .ni { color: #f8f8f2; }
.highlight .ne { color: #a6e22e; }
.highlight .nf { color: #a6e22e; }
.highlight .nl { color: #f8f8f2; }
.highlight .nn { color: #f8f8f2; }
.highlight .nx { color: #a6e22e; }
.highlight .py { color: #f8f8f2; }
.highlight .nt { color: #f92672; }
.highlight .nv { color: #f8f8f2; }
.highlight .ow { color: #f92672; }
.highlight .w { color: #f8f8f2; }
.highlight .mf { color: #ae81ff; }
.highlight .mh { color: #ae81ff; }
.highlight .mi { color: #ae81ff; }
.highlight .mo { color: #ae81ff; }
.highlight .sb { color: #e6db74; }
.highlight .sc { color: #e6db74; }
.highlight .sd { color: #e6db74; }
.highlight .s2 { color: #e6db74; }
.highlight .se { color: #ae81ff; }
.highlight .sh { color: #e6db74; }
.highlight .si { color: #e6db74; }
.highlight .sx { color: #e6db74; }
.highlight .sr { color: #e6db74; }
.highlight .s1 { color: #e6db74; }
.highlight .ss { color: #e6db74; }
.highlight .bp { color: #f8f8f2; }
.highlight .vc { color: #f8f8f2; }
.highlight .vg { color: #f8f8f2; }
.highlight .vi { color: #f8f8f2; }
.highlight .il { color: #ae81ff; }
.highlight .gu { color: #75715e; }
.highlight .gd { color: #f92672; }
.highlight .gi { color: #a6e22e; }
.page-content .wrapper .post-toc > ul { overflow: auto; }
.util-notify1 { position: absolute; z-index: 100; background: rgba(0, 0, 0, 0.7); color: #FFF; padding: 5px 10px; font-size: 14px; pointer-events: none; opacity: 1; transition: .2s ease; }
.util-notify1.hidden { opacity: 0; display: none; }
/*# sourceMappingURL=main.css.map */
File diff suppressed because one or more lines are too long
-21
View File
@@ -181,27 +181,6 @@
}
}
body{
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Open Sans, Ubuntu, Fira Sans, Helvetica Neue, sans-serif;
font-size: 1.6rem;
color: #222;
background-color: #f0f0f0;
margin: 0;
-webkit-overflow-scrolling: touch;
overflow-y: scroll;
}
p{
margin-top: 0;
margin-bottom: 1.5rem;
line-height: 1.5;
}
p:last-child{
margin-bottom: 0;
}
.page{
min-height: 100vh;
display: flex;
+5 -7
View File
@@ -6,27 +6,25 @@
</description>
<link>https://codersherlock.github.com//</link>
<atom:link href="https://codersherlock.github.com//feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Sun, 09 Sep 2018 17:56:38 -0400</pubDate>
<lastBuildDate>Sun, 09 Sep 2018 17:56:38 -0400</lastBuildDate>
<generator>Jekyll v3.8.3</generator>
<pubDate>Tue, 15 Sep 2020 19:43:12 -0400</pubDate>
<lastBuildDate>Tue, 15 Sep 2020 19:43:12 -0400</lastBuildDate>
<generator>Jekyll v4.1.1</generator>
<item>
<title>Xv6 introduction</title>
<description>&lt;p&gt;I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;xv6-systemcall&quot;&gt;Xv6 Systemcall&lt;/h2&gt;
&lt;p&gt;To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file &lt;em&gt;user.h&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This interface-like function will then pass the function name, in this case function, to &lt;em&gt;usys.S&lt;/em&gt;. When using user mode function in programs, &lt;em&gt;usys.S&lt;/em&gt; will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from &lt;em&gt;syscall.c&lt;/em&gt; and determining whether this system call is available. We must define same name system function and add it into &lt;em&gt;syscall.h&lt;/em&gt; and &lt;em&gt;syscall.c&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;#define SYS_function ## // ## is the system call number
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SYS_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys_function&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function name&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function declaration&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;sys_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function declaration&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.&lt;/p&gt;
+5 -11
View File
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -44,9 +45,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -84,7 +83,6 @@
<div class="post-excerpt">
<p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p>
<p>
<a class="post-link" href="/archivers/intro-xv6">Read More &raquo;</a>
</p>
@@ -101,7 +99,6 @@
<div class="post-excerpt">
<p>This blog contains only some basic record of my works. For some details, I will write a unique blog just for some specific topics.</p>
<p>
<a class="post-link" href="/archivers/some-of-my-previews-exper-work">Read More &raquo;</a>
</p>
@@ -119,7 +116,6 @@
<p>In this blog, I will generally talk about how to use proper tools to monitor SSL traffics of a mobile devices. Currently, I only can dealing with those SSL traffics which use an obviously certification. Some applications may not using system root cert or they doesnt provide us a method to modify their own certs. For these situation, I still didnt find a good solutions for it. But Ill keep updating this if I get one.<br />
My current solution is using AP to forward all SSL traffic to a proxy, <a href="https://www.charlesproxy.com/">charles proxy</a> is my first choice (Prof asked). Its a non-free software which still update new versions now. So mainly, Ill talk about how to charles SSL proxy.</p>
<p>
<a class="post-link" href="/archivers/charles-is-not-a-good-tool">Read More &raquo;</a>
</p>
@@ -160,16 +156,14 @@ My current solution is using AP to forward all SSL traffic to a proxy, <a href="
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -200,7 +194,7 @@ My current solution is using AP to forward all SSL traffic to a proxy, <a href="
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
-239
View File
@@ -1,239 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About - Timeline « Stop Talking, Start Doing - 停止空想,开始行动</title>
<meta name="description" content="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.
">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//timeline/">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-82637164-1', 'auto');
ga('send', 'pageview');
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6651321038908478",
enable_page_level_ads: true
});
</script>
</head>
<body>
<header class="header">
<div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a>
<nav class="site-nav">
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/category/">Category</a>
</nav>
</div>
</header>
<div class="page-content">
<div class="wrapper">
<div class="col-main">
<div class="post">
<header class="post-header">
<h1 class="post-title">About - Timeline</h1>
</header>
<article class="post-content">
<div class="timeline">
<div class="timeline__group">
<span class="timeline__year">Now</span>
</div>
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">10</span>
<span clas="timeline__month">Sept</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<p>Look up at the Starry Sky<audio controls><source src="/static/2018-09/beihang.mp3 type="audio/mpeg"></audio></p>
<img src="http://www.fsaona.com/images/imagesbigimg.jpg" height="250">
</div>
</div>
</div>
<span class="timeline__year">2010</span>
</div>
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">10</span>
<span clas="timeline__month">Sept</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Transfered to another high school</p> -->
<img src="http://school.zhongkao.com/style/school/pictures/school/734/73421/logo.jpg" height="250">
</div>
</div>
</div>
<span class="timeline__year">2010</span>
</div>
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">1</span>
<span clas="timeline__month">Sept</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Attened high school</p> -->
<img src="http://www.fuzhong.sd.cn/uploadfile/2015/0704/20150704044140866.jpg" height="250">
</div>
</div>
</div>
<span class="timeline__year">2008</span>
</div>
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">1</span>
<span clas="timeline__month">Sept</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Attened middle school</p> -->
<img src="https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike72%2C5%2C5%2C72%2C24/sign=5bc3fe5949540923be646b2cf331ba6c/3812b31bb051f819506a0330dab44aed2e73e779.jpg" height="250">
</div>
</div>
</div>
<span class="timeline__year">2005</span>
</div>
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">1</span>
<span clas="timeline__month">Sept</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<!-- <p> Attened primary school</p> -->
<img src="http://www.sdsdfx.com:85/fxjylm/u/cms/www/201510/27194804xvgc.jpg" height="250">
</div>
</div>
</div>
<span class="timeline__year">1999</span>
</div>
<div class="timeline__group">
<div class="timeline__box">
<div class="timeline__date">
<span class="timeline__day">26</span>
<span class="timeline__month">Aug</span>
</div>
<div class="timeline__post">
<div class="timeline__content">
<p> Borned in <a href="https://en.wikipedia.org/wiki/Jinan">Jinan</a>, <a href="https://en.wikipedia.org/wiki/Shandong">Shandong Province</a>, China </p>
</div>
</div>
</div>
<span class="timeline__year">1993</span>
</div>
</div>
</article>
</div>
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
</p>
</div>
<div class="col-box">
<div class="col-box-title">Newest Posts</div>
<ul class="post-list">
<li><a class="post-link" href="/archivers/intro-xv6">Xv6 introduction</a></li>
<li><a class="post-link" href="/archivers/some-of-my-previews-exper-work">Some of my previews experiment works: 2016</a></li>
<li><a class="post-link" href="/archivers/charles-is-not-a-good-tool">Using charles proxy to monitor mobile SSL traffics</a></li>
<li><a class="post-link" href="/archivers/hello">Stop Talking is the worst title of one blog</a></li>
</ul>
</div>
<div class="col-box post-toc hide">
<div class="col-box-title">TOC</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
</div>
</footer>
<script src="/js/easybook.js"></script>
</body>
</html>
+7 -8
View File
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//timeline/">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -44,9 +45,7 @@
<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/about/">About Me</a>
@@ -61,6 +60,8 @@
</nav>
</div>
</header>
@@ -189,16 +190,14 @@
</div>
<div class="col-second">
<div class="col-box col-box-author">
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao - 碾子">
<div class="col-box-title name">Pengzhan Hao - 碾子</div>
<img class="avatar" src="/static/avatar.jpg" alt="Pengzhan Hao">
<div class="col-box-title name">Pengzhan Hao</div>
<p></p>
<p class="contact">
<a href="https://github.com/codersherlock">GitHub</a>
<a href="https://twitter.com/haopengzhan">Twitter</a>
<a href="mailto:haopengzhan@gmail.com">Email</a>
@@ -229,7 +228,7 @@
<footer class="footer">
<div class="wrapper">
&copy; 2016 Pengzhan Hao - 碾子
&copy; 2016 Pengzhan Hao
</div>
</footer>
+8 -8
View File
@@ -1,6 +1,6 @@
---
layout: page
title: About
title: About Me
permalink: /about/
public: true
nocomments: true
@@ -8,14 +8,14 @@ nocomments: true
# Pengzhan Hao
**Position:** Research Assistant in MOSLab
**Education:** Doctoral Student of SUNY at Binghamton
**Email:** phao3 at binghamton dot edu
**Position:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Research Assistant in MOSLab
**Education:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Doctoral Student of SUNY at Binghamton
**Email:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phao3 at binghamton dot edu
**Address:**
MOSLab, H-6 Engineering Building
Binghamton University
4400 Vestal Parkway East
Binghamton, NY 13902
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MOSLab, H-6 Engineering Building
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binghamton University
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4400 Vestal Parkway East
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binghamton, NY 13902
## Education
- 2017.08 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ph.D. in Computer Science, Binghamton University, NY, USA
+9 -9
View File
@@ -3,12 +3,12 @@
---
@charset "utf-8";
$base-font-family: "Open Sans", "Helvetica Neue", "DejaVu Sans", Arial, "PingFang SC", "Noto Sans CJK SC", "Hiragino Sans GB", "微软雅黑", Helvetica, sans-serif;
$base-font-family: "Times New Roman";//"DejaVu Sans Mono", "PingFang SC", "DejaVu Sans", "Open Sans", "Helvetica Neue", Arial, "Noto Sans CJK SC", "Hiragino Sans GB", "微软雅黑", Helvetica, sans-serif;
$base-font-size: 15px;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$small-font-size: $base-font-size;
$base-line-height: 1.35;
$code-font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", "Liberation Mono", "文泉驿等宽微米黑", "Courier New", Courier, SimSun, monospace;
$code-font-family: "Courier New"; //Menlo, Monaco, Consolas, "DejaVu Sans Mono", "Liberation Mono", "文泉驿等宽微米黑", "Courier New", Courier, SimSun, monospace;
$code-font-size: 12px;
// Width of the content area
@@ -17,13 +17,13 @@ $content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
$color-link: #036;
$color-link-hover: #069;
$color-link: rgb(0, 0, 0);
$color-link-hover: rgb(0, 35, 53);
$header-bg: rgba(53, 0, 138, 0.89);
$header-bg-hover: rgb(43, 0, 112);
$header-bg: rgba(0, 0, 0, 1);
$header-bg-hover: rgb(0, 0, 0);
$header-link: rgb(255, 255, 255);
$header-fg: #FFF;
$header-fg: rgb(255, 255, 255);
@mixin media-query($device) {
@media screen and (max-width: $device) {
-21
View File
@@ -181,27 +181,6 @@
}
}
body{
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Open Sans, Ubuntu, Fira Sans, Helvetica Neue, sans-serif;
font-size: 1.6rem;
color: #222;
background-color: #f0f0f0;
margin: 0;
-webkit-overflow-scrolling: touch;
overflow-y: scroll;
}
p{
margin-top: 0;
margin-bottom: 1.5rem;
line-height: 1.5;
}
p:last-child{
margin-bottom: 0;
}
.page{
min-height: 100vh;
display: flex;