




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Flexible Hardware Acceleration for Instruction-Grain Program MonitoringJoint work with Michael Kozuch1, Theodoros Strigkos2, Babak Falsafi3, Phillip B. Gibbons1, Todd C. Mowry1,2, Vijaya Ramachandran4,Olatunji Ruwase2, Michael Ryan1, Evangelos Vlachos2Shimin Chen1Intel Research Pittsburgh 2CMU 3EPFL
2、 4UT AustinFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen2Instruction-Grain MonitoringSoftware often contain bugsMemory corruptions, data races, , crashesSecurity attacks often designed to exploit bugsInstruction-grain lifeguards can helpDynamic monitoring: during
3、 application executionInstruction-grain: e.g., memory access, data flowEnables a wide range of powerful lifeguards ApplicationLifeguardFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen3Example Instruction-Grain LifeguardsAddrCheck: Monitor malloc/free, memory accesse
4、sCheck if all memory accesses visit allocated memory regionsMemCheck: AddrCheck + check uninitialized valuesCopying partially uninitialized structures is not an errorLazy error detection to avoid many false positives Track propagation of uninitialized valuesTaintCheck: detect overwrite-based securit
5、y exploitsTainted data: data from network or diskTrack propagation of tainted data to detect violationsLockSet: detect data races in parallel programsNethercote04Nethercote & Seward 03 07Savage et al.97Newsome & Song05Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen
6、4Design Space of Support PlatformSpecific LifeguardGeneral Purpose: Wide Range of LifeguardsDynamic binary instrumentation (DBI)10-100X slowdownsGeneral-Purpose HW improving DBI3-8X slowdownsLifeguard-specific hardwareThis paperPerformanceGoodPoorBruening04 Luk et al05Nethercote04Crandall & Chong04,
7、 Dalton et al07, Shetty et al06, Shi et al06, Suh et al04, Venkataramani07, Venkataramani08, Zhou et al07Chen et al06 Corliss03Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen5OutlineIntroductionBackgroundThree Hardware Acceleration TechniquesExperimental Evaluation
8、ConclusionFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen6ApplicationTaintCheck Lifeguardif (taint(F)=1) error;Example Lifeguard: TaintCheckPurpose: detect overwrite-based security exploitsMetadata kept for application memory and registersTainted data: data from ne
9、twork or diskTrack taint propagationDetect violation: e.g., tainted jump target addressmov %eax Amov B %eaxadd %ebx Djmp *(F)taint(%eax) = taint(A)taint(B) = taint(%eax)taint(%ebx)|= taint(D)Newsome & Song05Detect exploit before attack code takes controlFlexible Hardware Acceleration for Instruction
10、-Grain Program MonitoringShimin Chen7TaintCheck w/ Detailed TrackingTaintCheck:Detect violation1 taint bit / application byteTaintCheck w/ detailed tracking:Construct taint propagation trailMore detailed metadata per application location PC of Instruction that tainted this location“tainted from” add
11、ressNot supported by previous lifeguard-specific HWInputViolationNewsome & Song05Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen8Instruction-Grain Lifeguard Metadata CharacteristicsOrganization variesper application byte/wordsize, format, semantics vary greatlyFreq
12、uently updatede.g., propagation trackingFrequently checkede.g., memory accessesFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen9Lifeguard Supportrare eventsRareUpdateCheckmetadata Event-capture and deliveryApplication (unmodified)Lifeguard (software)Event HandlersRa
13、re e.g., malloc/free, system callsFrequent e.g., memory access,data movementEventsGeneral-Purpose HW improving DBI Performance bottlenecks: metadata mapping, updates, and checks123Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen10Our Contributionsrare eventsRareUpda
14、teCheckmetadata Event-capture and deliveryApplication (unmodified)Lifeguard (software)Event HandlersRare e.g., malloc/free, system callsFrequent e.g., memory access,data movementEventsM-TLBIFITMetadata-TLBfor metadata mappingInheritance Trackingfor metadata updatesIdempotent Filtersfor metadata chec
15、ksFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen11OutlineIntroductionBackgroundThree Hardware Acceleration TechniquesMetadata-TLBInheritance TrackingIdempotent FiltersExperimental EvaluationConclusionFlexible Hardware Acceleration for Instruction-Grain Program Mon
16、itoringShimin Chen12Metadata-TLB: MotivationMetadata per app byte/wordElement size may varyTwo-level structure:Robustness & space efficiencyMapping: application address metadata addressFrequently used in almost every handlerCan be very costlymetadataLevel-1indexLevel-2 chunksFlexible Hardware Accele
17、ration for Instruction-Grain Program MonitoringShimin Chen13Example (TaintCheck) map *mp = level1_indexsrc_addr16; mov %eax, %ecx shr $16, %ecx mov level1_index(,%ecx,4),%ecx int idx = (src_addr & 0 xffff)2; and $0 xffff, %eax shr $2, %eax UChar mem_taint = mpidx; movzbl (%ecx,%eax,1), %eax reg_tain
18、tdest_reg |= mem_taint; or%al, reg_taint(%edx) nlba (); nlbavoid dest_reg_op_mem_4B (UINT32 src_addr /*%eax*/, UINT32 dest_reg /*%edx */) / app instruction type: dest_reg dest_reg op mem(src_addr) / handler operation: reg_taint(dest_reg)|= mem_taint(src_addr)Metadata Mapping takes 5 out of 8 instruc
19、tions !Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen14Our Solution: Metadata-TLBA TLB-like HW associative lookup tableLMA (Load Metadata Address) instruction:Application address lifeguard metadata addressManaged by (user-mode) lifeguard softwareFlexible Hardware
20、Acceleration for Instruction-Grain Program MonitoringShimin Chen15Example (TaintCheck) w/ M-TLB map *mp = level1_indexsrc_addr16; mov %eax, %ecx shr $16, %ecx mov level1_index(,%ecx,4),%ecx int idx = (src_addr & 0 xffff)2; and $0 xffff, %eax shr $2, %eax UChar mem_taint = mpidx; movzbl (%ecx,%eax,1)
21、, %eax reg_taintdest_reg |= mem_taint; or%al, reg_taint(%edx) nlba (); nlbavoid dest_reg_op_mem_4B (UINT32 src_addr /*%eax*/, UINT32 dest_reg /*%edx */) / app instruction type: dest_reg dest_reg op mem(src_addr) / handler operation: reg_taint(dest_reg)|= mem_taint(src_addr) UChar *p = LMA_macro(src_
22、addr); LMA %eax, %ecx UChar mem_taint = *p; mov (%ecx), %al reg_taintdest_reg |= mem_taint; or%al, reg_taint(%edx) nlba (); nlbaReduce handler size by half !Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen16Inheritance Tracking: MotivationPropagation tracking is exp
23、ensiveMetadata updates for almost every app instructionPrevious hardware solutions track propagationautomatically update metadata in hardwareProblem: only support simple metadata semanticse.g., do not support TaintCheck w/ detailed trackingOur goal: flexibility AND performanceIdea: inheritance struc
24、ture is common, so lets track inheritance in hardware!Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen17Problem with General Inheritance TrackingProblem: state explosion for binary operations !mov %eax Amov B %eaxtaint(%eax) = taint(A)taint(B) = taint(%eax)Applicati
25、onPropagation Tracking%eax inherits from AB inherits from %eaxInheritance Trackingadd %ebx Dtaint(%ebx) |= taint(D)insert D into %ebxs inherit-from listFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen18Unary Inheritance TrackingMany lifeguards can take advantage of
26、unary IT:MemCheckTaintCheckLarge performance improvements if usedCan be disabled if unary IT does not match the lifeguardcheckcheckknownFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen19Tracking Register InheritanceOriginal eventIT table for registersState Transitio
27、n& Event to DeliverDeliver eventIT(%rs)IT(%rd)Transformed eventMore details in the paper: IT table and state transition table details Conflict detectionFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen20Examplemem_to_regreg_to_memApplicationBefore mem_to_memInheritan
28、ce Trackingmem_to_regdest_reg_op_memreg_to_mem imm_to_memCan significantly reduce metadata update events!mov %eax Amov B %eaxmov %ebx Cadd %ebx Dmov E %ebxFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen21Idempotent Filters: IdeaTypically, metadata checks give the s
29、ame result ifEvent parameters are the same andMetadata are the sameIdea: filter out idempotent (redundant) eventsFor example:AddrCheck:After checking that a memory location is allocatedSubsequent loads/stores to the same location are safeUntil the next free() eventLockSet: (surprisingly)In between s
30、ynchronization events (e.g., lock/unlock)Check first load to a locationCheck first store to a locationFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen22OutlineIntroductionBackgroundThree Hardware Acceleration TechniquesExperimental EvaluationLog-Based Architectures
31、(LBA)Simulation Study (w/ reduced input sets)PIN-based Analysis (w/ full inputs)ConclusionFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen23Log-Based Architecturesrare eventsRareUpdateCheckmetadata Event-capture and deliveryApplication (unmodified)Lifeguard (softwar
32、e)Event HandlersRare e.g., malloc/free, system callsFrequent e.g., memory access,data movementEventsLog-Based Architecture (LBA)Flexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen24PPPPPPPPPPPPPPPPIdea: Exploiting Chip MultiprocessorsLBA componentsFlexible Hardware Acc
33、eleration for Instruction-Grain Program MonitoringShimin Chen25Simulation Setup: Dual-Core LBA SystemLog Transport(e.g. L2 cache)Core 1Core 2decompressCompress capturedispatchOperating System: Fedora Core 5Application LifeguardIT & IFM-TLBApplication and lifeguard are processesApplication is stalled
34、 when log buffer is fullModel a 2-level cache hierarchyExtend Virtutech SimicsFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen26Overall Performance: TaintCheck1.36XLBA baselineLBA optimizedSlowdown =application execution time w/o lifeguardapplication execution time
35、w/ lifeguardFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen27Applying Our Techniques One by OneAddrCheckTaintCheckTaintCheck w/ detailed trackingLockSetMemCheck3.231.901.027.806.053.813.273.362.291.364.212.711.500.01.02.03.04.05.06.07.08.09.010.0BASEMTL
36、BMTLB+IFBASEMTLBMTLB+ITMTLB+IT+IFBASEMTLBMTLB+ITBASEMTLBMTLB+ITBASEMTLBMTLB+IFaverage slowdownsIT, IF, and M-TLB are indeed complementaryAchieve dramatically better performanceFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen28PIN-Based Analysis: ITIT removes 35.8% to 82.0% of the propagation eventsFlexible Hardware Acceleration for Instruction-Grain Program MonitoringShimin Chen29PIN-Based Analysis: IF010203040506070808163264128256number
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- ESD静电防护知识课件
- 国学智慧与传统文化汇报模板
- 38900培训课件教学课件
- 吉林省长春市2025届高三下学期2月质量监测(二)(二模)地理 含解析
- 人教版数学小学六年级下册第一课广角鸽巢问题习题
- 人教版数学六年级下册第一单元《负数》同步练习含答案
- 人教版数学【基础+提升】小学六下1.1认识负数同步练习含答案
- 2025年广西贵港市港南区重点名校初三第二学期期末质量抽测化学试题试卷含解析
- 河南省郑州市巩义市2024-2025学年小升初模拟数学测试卷含解析
- 2025年山东省宁津县市级名校初三年级四月调研考试化学试题含解析
- 国开(安徽)2024年秋《质量管理》形成新考核1-4答案
- 大象版一年级下册科学全册教案
- GB/T 6003.2-2024试验筛技术要求和检验第2部分:金属穿孔板试验筛
- 人工智能大模型
- HIV感染者精神障碍管理专家共识(2024版)解读
- 舌尖上的植物学学习通超星期末考试答案章节答案2024年
- 艺术品保存状态对价格的考量
- 四年级信息技术下册 第2课 美化调查图表教案 粤教版
- 招投标法对签订合同的规定(2024版)
- 《客舱安全与应急处置》-课件:15秒开舱门
- 高功率固体激光器热管理新技术研究
评论
0/150
提交评论