Manufacturers of modern electronic devices are constantly attempting to implement additional features into ever-increasingly complex and performance demanding systems. This race has been historically driven by improvements in the processor's clock speed, but as power consumption and real estate concerns in the embedded space pose an growing challenge, multithreading approaches have become more prevalent and relied upon. Synchronization is essential to multithreading systems, as it ensures that threads do not interfere with each others' operations and produce reliable and consistent outputs whilst maximizing performance and efficiency. One of the primary mechanisms guaranteeing synchronization in RISC architectures is the load-link/store conditional routine, which implements an atomic operation that allows a thread to obtain a lock. In this study, we implement, test, and manipulate an LL/SC routine in a multithreading environment using GDB. After examining the routine mechanics, we propose a concise implementation in ARMv7l, as well as demonstrate the importance of register integrity and vulnerabilities that occur when integrity is violated under a limited threat model. This work sheds light on LL/SC operations and related lock routines used for multithreading.
翻译:现代电子设备的制造商不断试图在日益复杂和要求性能的系统中增加新的特征,这种竞赛历来是由处理器时速的改进驱动的,但是,由于内嵌空间的电力消耗和房地产问题构成越来越大的挑战,多轨办法已变得更加普遍和依赖。同步对于多读系统至关重要,因为它确保线条不会干扰彼此的操作,产生可靠和一致的产出,同时最大限度地提高性能和效率。保证RISC结构同步的主要机制之一是负载链/存储有条件的例行程序,即执行原子操作,使线线能锁定。在这项研究中,我们使用GDB在多读环境中实施、测试和操作LL/SC常规。在审查常规机械之后,我们建议在ARMv7l中简明地实施一个简易的操作程序,并表明在有限的威胁模式下完整性被破坏时登记的完整性和脆弱性的重要性。这项工作为LL/SC操作和多读的相关锁程序提供了光。