28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

173<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Figure 3.35: System call hijacking. <strong>The</strong> rumphijack library intercepts system<br />

calls <strong>and</strong> determines whe<strong>the</strong>r <strong>the</strong> syscall request should be sent to <strong>the</strong> rump kernel<br />

or <strong>the</strong> host kernel for processing.<br />

selection is that <strong>the</strong>re is full control <strong>of</strong> which system call goes where. <strong>The</strong> downside<br />

is that it requires source level control <strong>and</strong> compilation. To use unmodified binaries,<br />

we must come up with a policy which determines which kernel h<strong>and</strong>les each syscall.<br />

A key point for us to observe is that in Unix a function call API in libc (e.g.<br />

open(const char *path, int flags, mode_t mode)) exists for all system calls.<br />

<strong>The</strong> libc stub abstracts <strong>the</strong> details <strong>of</strong> user-kernel communication. <strong>The</strong> abstraction<br />

makes it possible to change <strong>the</strong> nature <strong>of</strong> <strong>the</strong> call just by intercepting <strong>the</strong> call<br />

to open() <strong>and</strong> directing it elsewhere. If <strong>the</strong> details <strong>of</strong> making <strong>the</strong> request were<br />

embedded in <strong>the</strong> application itself, it would be much more difficult to override <strong>the</strong>m<br />

to call a remote rump kernel instead <strong>of</strong> <strong>the</strong> local host kernel.<br />

<strong>The</strong> rumphijack library (lib/librumphijack, Figure 3.35) provides a mechanism<br />

<strong>and</strong> a configurable policy for unmodified applications to capture <strong>and</strong> route part <strong>of</strong>

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

Saved successfully!

Ooh no, something went wrong!