One of the many new features packed into the 6.13 kernel release was guard pages, a hardening mechanism that makes it possible to inject zero-access pages into a process's address space in an efficient way. That feature only supports anonymous (user-space data) pages, though. To make guard pages more widely useful, Lorenzo Stoakes has put together a patch set enabling the feature for file-backed pages as well; in the process, he examined and resolved a long list of potential problems that extending the feature could encounter. One potential problem was not on his list, though.
在 6.13 版本的内核中,众多新功能之一是“保护页”(guard pages),这是一种安全加固机制,可以高效地向进程的地址空间插入不可访问的页面。不过,该功能目前仅支持匿名(用户空间数据)页面。为了使保护页更广泛适用,Lorenzo Stoakes 提出了一个补丁集,使其也能用于文件映射页面。在此过程中,他分析并解决了一系列可能出现的问题,但有一个潜在问题并未在他的计划之中。
The purpose of a guard page is to prevent buggy (or malicious) code from overrunning a memory region. An inaccessible page placed at the end of a region will cause a segmentation fault should the running process try to read or write to it; well-placed guard pages can trap a number of common buffer overruns and similar problems. Prior to 6.13, though, the only way to put a guard page into a process's address space was