62
1 Ally: OS-Transparent Packet Inspection Using Sequestered Cores Jen-Cheng Huang 1 , Matteo Monchiero 2 , Yoshio Turner 3 , Hsien-Hsin Lee 1 1 Georgia Tech 2 Intel Labs 3 HP Labs

Ally: OS-Transparent Packet Inspection Using Sequestered Cores

Embed Size (px)

DESCRIPTION

Ally: OS-Transparent Packet Inspection Using Sequestered Cores. Deep Packet Inspection (DPI). Deployment of Packet Processing Services. Middle Boxes. Internet. Traffic Classification. Content Insertion. Intrusion Detection. Data Center. Problem. Local Traffic is growing in importance…. - PowerPoint PPT Presentation

Citation preview

Page 1: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

1

Ally: OS-Transparent Packet Inspection Using Sequestered Cores

Jen-Cheng Huang 1, Matteo Monchiero2, Yoshio Turner3, Hsien-Hsin

Lee1

1Georgia Tech 2Intel Labs 3HP Labs

Page 2: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

2

Deep Packet Inspection (DPI)

Data Center

MiddleBoxes

Intrusion Detection

ContentInsertion

TrafficClassification

Internet

Deployment of Packet Processing Services

Page 3: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

3

Problem

Internet

Data Center

MiddleBoxes

Local Traffic is growing in importance…

But The traffic within the data center is not inspected!

Page 4: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

4

Approach

“Co-locate” DPI with the server

DPI appliance

Server

Leverage abundant CPU resources

Leverage existing management interfaces on servers, e.g. HP iLO

Compatible with heterogeneous architecture, e.g. on-chip accelerators

Page 5: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

5

Requirements

• Transparency– Independent to the server’s software stack

• Efficiency– Low overhead packet interception

• Isolation– Resistant to attacks

Page 6: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

6

ETTM: a scalable fault tolerant network manager. C. Dixon et al. NSDI ‘11

Related Work

Transparency

Hypervisor Overhead

Hypervisor Vulnerability

Virtualization Support for DPI deployment

Hypervisor

DPI VM

Guest VM

HW

SW

Virtualized Platform

Processors

Page 7: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

7

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Ally Architecture

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

NIC Traffic

Page 8: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

8

Outline

• Introduction & Motivation• Architecture

– Overview– Multicore Partitioning– Packet interception

• Evaluation• Conclusions

Page 9: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

9

Northbridge

MMUMMU

MMUMMU

ServiceProcessor

NIC

Memory Controlle

r

Interconnect

IOMMUInterrupt

Unit

BIOS

ExternalNetwork

Main Memory

Core

Inte

rrup

tC

ontr

olle

r

MMU

Core

Inte

rrup

tC

ontr

olle

r

MMU

LastLevelCach

e

Management Network

Baseline Architecture

Page 10: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

10

Northbridge

MMUMMU

MMUMMU

ServiceProcessor

NIC

Memory Controlle

r

Interconnect

IOMMUInterrupt

Unit

BIOS

ExternalNetwork

Main Memory

Core

Inte

rrup

tC

ontr

olle

r

MMU

Core

Inte

rrup

tC

ontr

olle

r

MMU

LastLevelCach

e

Management Network

Ally ArchitectureUnprivileged

partitionPrivileged partition

Page 11: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

11

Outline

• Introduction & Motivation• Architecture

– Overview– Multicore Partitioning– Packet interception

• Evaluation• Conclusions

Page 12: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

12

Multicore Partitioning

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

Invisible

Page 13: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

13

Core SequestrationModify the BIOS to hide privileged core information from the OS

BSP core - the first core that boots AP cores - the other cores IPI - Inter-processor interrupts

OS retrieves cores information

BSPAP

AP

AP

Core InfoTable

Wakeup IPI Update

Ally Booting Procedure:

AP DPIEngine DPI core waits for

IN/OUT packetsInitialize

…...

Page 14: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

14

Memory Protection

TLB

TLB Miss Handler

CR3BoundaryRegister

Page Table

Range Checking

Main Memory

Privileged partition

Unprivileged partition

MMUUnprivileged Core

Partition the memory into two physically contiguous regions

TLB Miss

TLB Fill

Page 15: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

15

Outline

• Introduction & Motivation• Architecture

– Overview– Multicore Partitioning– Packet interception

• Evaluation• Conclusions

Page 16: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

16

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Packet Interception

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

NIC Traffic

Page 17: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

17

Packet InterceptionVirtualization of the Descriptor Queues

NIC

OS memory

Descriptor queues replicated

DPI memory

Only one copy of the packet buffers

Descriptor queues

Page 18: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

18

Packet Interception

• Virtualization of the Descriptor Queues– Device independent, software independent– No copying on packet buffers

• Processor and NIC communication– Queue manipulation uses Memory Mapped IO (MMIO)

accesses– NIC event notification uses Interrupt

Page 19: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

19

MMIO redirection

MMU

MMU detects specific MMIO addresses

MMU redirects RW to a reserved region in DPI memory

MMU sends IPI to DPI core

DPI memory

DPI core

OS core

IPI

R/W redirection

Load/store

Page 20: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

20

Ally Hardware Properties

• Simple extensions to existing hardware components

• No impact expected on critical timing paths

• Compatible with virtualization support  (Intel VT-x/EPT, AMD SVM/NPT)

Page 21: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

21

Outline

• Introduction & Motivation• Architecture

– Overview– Multicore Partitioning– Packet interception

• Evaluation• Conclusions

Page 22: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

22

Evaluation

Full system emulationQEMU

Core sequestration

HW changes

Real machine prototype Hardware– Intel Core 2 duo 2.66 GHz with 1 Gbit Intel NICBenchmarks– Netperf– SPECwebSystems– Ally, Linux and Xen

Page 23: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

23

System Configurations

Queue Virtualization

NIC Driver

Kernel

Netperf/Specweb

Snort

DPI core OS coreHW

SW NIC Driver

Kernel

Netperf/Specweb

Snort

DPI core OS coreHW

SW

IP queue

Ally Linux

Page 24: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

24

System Configurations

Hypervisor

Dom0 Kernel

Netperf/Specweb

Snort

DPI core OS coreHW

SW

Xen

DomUKernel

Page 25: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

25

Netperf CPU Usage

Page 26: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

26

SPECweb CPU Usagecy

cles

/req

ues

t *

10

6

Page 27: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

27

Outline

• Introduction & Motivation• Architecture

– Overview– Multicore Partitioning– Packet interception

• Evaluation• Conclusions

Page 28: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

28

Conclusions

Ally: a framework for transparent deployment of packet inspection appliances

Ally uses a set of simple HW/FW extensions enable reliable multicore partitioning and efficient packet inspection

Ally is fully compatible with new virtualization technology as well as heterogeneous architecture

Page 29: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

29

Thanks

Page 30: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

30

Throughput

Page 31: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

31

DPI using Network Processor

Page 32: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

32

NIC

Unprivileged Partition

Multi-core processor

core

Conventional Architecture

Software Stack (OS + Applications)

core core cores cores cores

Page 33: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

33

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Transmission Path

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

Page 34: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

34

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Receive Path

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

Page 35: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

35

Integrated Northbridge

DPI core

Loca

l A

PIC

MMU

Interface

DPI core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

Platform Controller Hub

NIC

Memory Controll

er

On chip interconnect

Processor

IOMMUPCIe ctrlInterrupt

Unit

BIOSNetwork

Main Memory

DMI Ctrl

OS core

Loca

l A

PIC

MMU

Interface

Unprivileged partition Privileged partition

DPI core

Loca

l A

PIC

MMU

Interface

Last Level Cache

IOAPIC

Management NIC

Service Processo

r

Management Network

Privileged partition

Unprivileged partition

Page 36: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

36

Integrated Northbridge

DPI core

Loca

l A

PIC

MMU

Interface

DPI core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

Platform Controller Hub

NIC

Memory Controll

er

On chip interconnect

Processor

IOMMUPCIe ctrlInterrupt

Unit

BIOSNetwork

Main Memory

DMI Ctrl

OS core

Loca

l A

PIC

MMU

Interface

Unprivileged partition Privileged partition

DPI core

Loca

l A

PIC

MMU

Interface

Last Level Cache

IOAPIC

Management NIC

Service Processo

r

Management Network

Privileged partition

Unprivileged partition

Page 37: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

37

MMU Modification – Memory Protection

TLB

TLB Miss Handler

CR3Special_re

g

Page Table DPI core boundary register

phys_addr >

special_reg ?

Main Memory

Privileged partition

Unprivileged partition

Page 38: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

38

Memory Protection Procedure

TLB

TLB Miss HandlerTLB miss

Virtual Address

CR3Special_re

g

Page Table DPI core boundary register

phys_addr >

special_reg ?

Main Memory

Privileged partition

Unprivileged partition

Page 39: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

39

Memory Protection Procedure

TLB

TLB Miss HandlerTLB miss

Virtual Address

TLB fill

CR3Special_re

g

Page Table DPI core boundary register

phys_addr >

special_reg ?

Main Memory

Privileged partition

Unprivileged partition

Page 40: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

40

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Memory Protection

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

Invisible

Page 41: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

41

Integrated Northbridge

DPI core

Loca

l A

PIC

MMU

Interface

DPI core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

Platform Controller Hub

NIC

Memory Controll

er

On chip interconnect

Processor

IOMMUPCIe ctrlInterrupt

Unit

BIOSNetwork

Main Memory

DMI Ctrl

OS core

Loca

l A

PIC

MMU

Interface

Unprivileged partition Privileged partition

DPI core

Loca

l A

PIC

MMU

Interface

Last Level Cache

IOAPIC

Management NIC

Service Processo

r

Management Network

Privileged partition

Unprivileged partition

Page 42: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

42

Integrated Northbridge

DPI core

Loca

l A

PIC

MMU

Interface

DPI core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

OS core

Loca

l A

PIC

MMU

Interface

Platform Controller Hub

NIC

Memory Controll

er

On chip interconnect

Processor

IOMMUPCIe ctrlInterrupt

Unit

BIOSNetwork

Main Memory

DMI Ctrl

OS core

Loca

l A

PIC

MMU

Interface

Unprivileged partition Privileged partition

DPI core

Loca

l A

PIC

MMU

Interface

Last Level Cache

IOAPIC

Management NIC

Service Processo

r

Management Network

Privileged partition

Unprivileged partition

Page 43: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

43

MMU Modification – MMIO Redirection

TLB

Redirection BitPhysical Page

TLB Miss HandlerCheck

uncacheable address map

Redirection

Table

Physical Address

Remapped Address

Page 44: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

44

MMIO Redirection – TLB Miss

• On a TLB miss, the TLB miss handler does the page table walk

TLB

Redirection BitPhysical Page

Virtual Address

TLB missTLB Miss Handler Page Table Lookup

Page 45: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

45

MMIO Redirection – TLB Miss

• The TMH checks if the resulting physical address falls in an uncacheable page and hence potentially a MMIO page

TLB

Redirection BitPhysical Page

TLB Miss Handler Physical AddressCheck

uncacheable address map

Page 46: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

46

MMIO Redirection – TLB Miss

• If the page is uncacheable, the TMH looks up the redirection table to check if any address in this page needs to be redirected

TLB

Redirection BitPhysical Page

TLB Miss HandlerCheck

uncacheable address map

Redirection

Table

Physical Address

Remapped Address

Physical Address

Page 47: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

47

MMIO Redirection – TLB Miss

• If any address in the page needs to be redirected, the TMH sets the redirection bit in addition to fill the TLB

TLB

Redirection BitPhysical Page

TLB Miss HandlerCheck

uncacheable address map

TLB fill

Redirection

Table

Physical Address

Remapped Address

Page 48: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

48

MMIO Redirection – TLB Hit

• On a TLB hit, if the redirection bit is set, the MMU looks up the Last Level Cache (LLC) used to cache translations in Redirection Table

TLB

Redirection Bit

Physical Page

Offset

Physical Address

Virtual Address

LLC

Physical Address

Remapped Address

Page 49: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

49

MMIO Redirection – TLB Hit

• If a translation is found, the MMU returns the translated address and sends IPI to privileged cores.

TLB

Redirection Bit

Physical Page

LLC

Physical Address

Remapped Address

Translated Address

Generate IPI

Physical Address

Hit

Page 50: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

50

MMIO Redirection – TLB Hit

• If the LLC misses, then Redirection Table Lookup is performed

TLB

Redirection Bit

Physical Page

LLC

Physical Address

Remapped Address

Redirection Table LookupPhysical

AddressMiss

Page 51: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

51

Interrupt Unit Modification

DPI core

OS core

Interrupt Unit

NIC

If Source == NIC, Redirect Interrupt

Page 52: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

52

• When NIC raises an interrupt, The interrupt Unit redirects the interrupt to DPI core

Interrupt Redirection

DPI core

OS core

Interrupt Unit

NIC

If Source == NIC, Redirect Interrupt

Interrupt

Page 53: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

53

• After the NIC interrupt is handled, DPI core sends an IPI to OS core mimicking NIC interrupt

Interrupt Redirection

DPI core

OS core

Interrupt Unit

NIC

If Source == NIC, Redirect Interrupt

IPI

Page 54: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

54

Summary of Hardware Modifications

Unit Description Purpose

OS-core MMU

Prevent memory accesses to DPI memory from OS-core

Protection

Redirect MMIO accesses to DPI memory from OS-core and interrupt DPI core

Packet Interception

IOMMU Prevent non authorized DMA to DPI Memory Protection

IOAPIC Redirect NIC interrupts to DPI-core Packet Interception

All Units Protected configuration registers Protection

Page 55: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

55

Functional Evaluation

Full system emulation• QEMU• Validate Hardware and Firmware Changes

Page 56: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

56

DPI core Usage

Page 57: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

57

SPECweb Cache Misses

Page 58: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

58

NIC

Unprivileged Partition

Multi-core processor

core

Privileged Partition

Memory Protection

Software Stack (OS + Applications)

Software Stack (DPI Application)

core core core core core

Invisible

How?Modified MMU

Page 59: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

59

Challenges

- Make privileged partition protected and invisible from the unprivileged partition- Core Sequestration- Memory Protection

- Intercept packets efficiently- Packet Interception

Page 60: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

60

Ally System

NIC

Linux

kernel

NIC Traffic

Queue Virtualization

NIC Driver

Other Apps

Snort

DPICore

Core

Page 61: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

61

Linux System

NIC

Linux

kernel

NIC Traffic

IP queue

NIC Driver

Other Apps

Snort

Core Core

Page 62: Ally: OS-Transparent Packet Inspection Using Sequestered Cores

62

Xen System

NIC

Linux

VM #0

NIC Traffic

IP queue

Hypervisor

Other Apps

Snort

Core Core

VM #1