Common commands


  • & -> get reference of the var
  • * -> deref an address

Without the Deref trait, the compiler can only dereference & references. …

Usage of Kprobe

KProbes is a debugging mechanism for the Linux kernel which can also be used for monitoring events inside a production system.

Fetch layout

General Setup

In this introduction, we use Virtualbox as our VM environment.

Here are the three servers we need:

  • LVS server : 2CPU core, 2G Ram, Host network vboxnet 2, vboxnet 3
  • Service server : 1CPU core, 1G Ram, Host network vboxnet 2, vboxnet 3
  • Test server: 1CPU core, 1G Ram, Host…

Cisco Router

How does OS do the protection mechanism?

From Segment Descriptor side

When OS loading the segment descriptor to the segment register it will check the type in segment descriptor table

  1. CS register can only load the descriptors with Executable flag
  2. DS(data segment register) permits the descriptors with Readable flag
  3. SS can load the descriptors with Writable flag



How does a linear address come from?

Process to generate Linear Address

Linear Address = Segment_Base + Effective Address

Segment Base is from Segment Descriptor

Now we talk about how to generate Segment Base Address

The process to get Segment Base Address

  1. Segment Selector to find the index in Segment Descriptor

idx = segment_selector >> 3

TI (Table Indicator) : A zero indicates the GDT; a one indicates the…

Debugged with GDB

Common usage

For Registers

For memory

Talk about Mutex

The difference bewteen Spinlock & Mutex. The spinlock keeps spinning and mutex calling yield() to give up for one schedule round to other processes

Brian Pan

Site Reliability Engineer in Greater LA

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store