28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

76<br />

<strong>the</strong> double underscore namespace to a single underscore namespace <strong>and</strong> exclude<br />

<strong>the</strong> double underscore namespace from <strong>the</strong> rename. <strong>The</strong>re were two exceptions<br />

to <strong>the</strong> double underscore rule which had to be excluded from <strong>the</strong> rename as well:<br />

_GLOBAL_OFFSET_TABLE_ <strong>and</strong> architecture specific ones. We h<strong>and</strong>le <strong>the</strong> architecture<br />

specific ones with a quirk table. <strong>The</strong>re is one quirk each for PA-RISC, MIPS,<br />

<strong>and</strong> PowerPC64. For example, <strong>the</strong> MIPS toolchain generates <strong>the</strong> symbol _gp_disp,<br />

which needs to be excluded from <strong>the</strong> renaming. Experience <strong>of</strong> over 2.5 years shows<br />

that once support for an architecture is added, no maintenance is required.<br />

We conclude mass renaming symbols is a practical <strong>and</strong> feasible solution for <strong>the</strong><br />

symbol collision problem which, unlike manual renaming, does not require knowledge<br />

<strong>of</strong> <strong>the</strong> set <strong>of</strong> symbols that <strong>the</strong> application namespace exports.<br />

3.2.2 Privileged Instructions<br />

Kernel code dealing with for example <strong>the</strong> MMU may execute CPU instructions<br />

which are available only in privileged mode. Executing privileged instructions while<br />

in non-privileged mode should cause a trap <strong>and</strong> <strong>the</strong> host OS or VMM to take control.<br />

Typically, this trap will result in process termination.<br />

Virtualization <strong>and</strong> CPU emulation technologies solve <strong>the</strong> problem by not executing<br />

privileged instructions on <strong>the</strong> host CPU. For example, Xen [11] uses hypercalls,<br />

User Mode Linux [26] does not use privileged instructions in <strong>the</strong> usermode machine<br />

dependent code, <strong>and</strong> QEMU [13] h<strong>and</strong>les such instructions in <strong>the</strong> machine emulator.<br />

In practice kernel drivers do not use privileged instructions because <strong>the</strong>y are found<br />

only in <strong>the</strong> architecture specific parts <strong>of</strong> <strong>the</strong> kernel. <strong>The</strong>refore, we can solve <strong>the</strong><br />

problem by defining that it does not exist in our model — if <strong>the</strong>re are any it is a<br />

failure in modifying <strong>the</strong> OS to support rump kernels.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!