Almost all SFI systems use heavyweight transitions that incur significant performance overhead from saving and restoring registers when context switching between application and sandbox code. We identify a set of zero-cost conditions that characterize when sandboxed code is well-structured enough so that security can be guaranteed via lightweight zero-cost transitions. We show that using WebAssembly (Wasm) as an intermediate representation for low-level code naturally results in a SFI transition system with zero-cost transitions, and modify the Lucet Wasm compiler and its runtime to use zero-cost transitions. Our modifications speed up font and image rendering in Firefox by up to 29.7% and 10% respectively. We also describe a new purpose-built fast SFI system, SegmentZero32, that uses x86 segmentation and LLVM with mostly off-the-shelf passes to enforce our zero-cost conditions. While this enforcement incurs some runtime cost within the sandboxed code, we find that, on Firefox image and font rendering benchmarks, the time saved per transition allows SegmentZero32 to outperform even an idealized hardware isolation system where memory isolation incurs zero performance overhead but the use of heavyweight transitions is required.


翻译:几乎所有SFI系统都使用重量级过渡,在应用和沙箱代码之间的环境转换时,从保存和恢复登记册中产生大量业绩管理费用。我们确定了一套零成本条件,在沙箱代码结构完善的情况下,能够保证安全。我们显示,使用WebAs(Wasm)作为低级代码的中间代表自然导致SFI过渡系统出现零成本过渡,并修改Lucet Wasm编译器及其使用零成本过渡的运行时间。我们的修改使Firefox的字体和图像的转换速度分别加快到29.7%和10%。我们还描述了一个新的目的设计的快速SFI系统(CreactionZero32),它使用x86分解和LLLVM(大部分是现出的通行证)来强制执行我们的零成本条件。虽然这一执行过程在沙箱代码范围内需要一定的运行时间成本,但我们发现,在Firefox图像和字体设定基准的运行时间上,我们节省的时间使得CEpreazeZero32能够超越一个理想的硬件隔离系统,甚至超越了理想化的硬隔离系统,其中要求进行高度的升级。

0
下载
关闭预览

相关内容

专知会员服务
154+阅读 · 2021年3月6日
专知会员服务
59+阅读 · 2020年3月19日
【强化学习资源集合】Awesome Reinforcement Learning
专知会员服务
93+阅读 · 2019年12月23日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
当 WebAssembly 遇上 Serverless
高可用架构
4+阅读 · 2019年5月17日
逆强化学习-学习人先验的动机
CreateAMind
15+阅读 · 2019年1月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
(TensorFlow)实时语义分割比较研究
机器学习研究会
9+阅读 · 2018年3月12日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
8+阅读 · 2018年7月12日
Arxiv
5+阅读 · 2018年5月5日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
当 WebAssembly 遇上 Serverless
高可用架构
4+阅读 · 2019年5月17日
逆强化学习-学习人先验的动机
CreateAMind
15+阅读 · 2019年1月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
(TensorFlow)实时语义分割比较研究
机器学习研究会
9+阅读 · 2018年3月12日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Top
微信扫码咨询专知VIP会员