一句话:提出 HFuzz,通过内核硬件探针与 FPGA 级优化加速异构应用的模糊测试,显著提升可观测性与效率。
异构应用由主机代码与内核代码组成,内核常被卸载到加速器执行,但其黑盒特性使静默挂起或异常结果难以诊断,且大矩阵输入导致变异搜索空间巨大。HFuzz 通过三方面提升真实异构架构上的模糊测试:自动在设备端内核中插入硬件探针并配合主机侧软件监视器生成测试指导;将计算密集型输入变异卸载到硬件内核以快速探索输入空间;利用循环展开、shannonization、数据预加载和动态内核共享四种 FPGA 级优化并行化模糊测试并加速片上内存访问。在 7 个 Intel OneAPI 开源项目上评估,硬件加速使模糊测试提速 4.7 倍,4 小时内发现 33 个缺陷和 25 个软件监控无法发现的独特异常行为症状,是首个用硬件优化加速模糊测试的工作。
There is a growing interest in the computer architecture community to incorporate heterogeneity and specialization to improve performance. Developers can create heterogeneous applications that consist of both host code and kernel code, where compute-intensive kernels can be offloaded from CPU to hardware accelerators. Testing such applications on real heterogeneous architectures is extremely challenging as kernels are black boxes, providing no information about the kernels’ internal execution to diagnose issues such as silent hangs or unexpected results. Additionally, inputs for heterogeneous applications are often large matrices, leading to a vast search space for identifying bug-revealing inputs. We propose a novel fuzz testing technique, HFuzz, to enable efficient testing on real heterogeneous architectures. HFuzz aims to increase both the observability of hardware kernels and testing efficiency through a three-pronged approach. First, HFuzz automatically generates test guidance by inserting device-side in-kernel hardware probes in addition to host-side software monitors. Second, it performs rapid input space exploration by offloading compute-intensive input mutations to hardware kernels. Third, HFuzz parallelizes fuzzing and enables fast on-chip memory access, by utilizing four FPGA-level optimizations including loop unrolling, shannonization, data preloading, and dynamic kernel sharing. We evaluate HFuzz on seven open-source OneAPI subjects from Intel. HFuzz speeds up fuzz testing by 4.7x with HW-accelerated input space exploration. By incorporating HW probes in tandem with SW monitors, HFuzz finds 33 defects within 4 hours and reveals 25 unique, unexpected behavior symptoms that could not be found by SW-based monitoring alone. HFuzz is the first to design hardware optimizations to accelerate fuzz testing.
@inproceedings{WangZRXK23,
title = {Leveraging Hardware Probes and Optimizations for Accelerating Fuzz Testing of Heterogeneous Applications},
author = {Jiyuan Wang and Qian Zhang and Hongbo Rong and Guoqing Harry Xu and Miryung Kim},
booktitle = {FSE},
year = {2023},
doi = {10.1145/3611643.3616318}
}