Dirty CoW mitigation on CentOS 7.2 - semantic error: while resolving probe point

Dirty CoW mitigation on CentOS 7.2 - semantic error: while resolving probe point

我正在按照此处所述(在等待官方发行版内核的同时)在我的系统上实施临时补丁 (non-persistent):

https://bugzilla.redhat.com/show_bug.cgi?id=1384344#c13

我已经测试了写入脚本中的脏副本,目的是测试我系统上此错误的解决方案,但请注意,我遇到了语义错误,并且此错误在我的系统中仍然有效:

SuperUser Shell ~/> # stap -g -p 4 fix.stp 
semantic error: while resolving probe point: identifier 'syscall' at fix.stp:5:7
        source: probe syscall.ptrace {  // includes compat ptrace as well
                      ^

semantic error: no match

Pass 2: analysis failed.  [man error::pass2]
SuperUser Shell ~/>

有颜色(如果你喜欢):

阅读本文:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/SystemTap_Beginners_Guide/errors.html

我看到一个简单的解释:

semantic error: no match for probe point, while resolving probe point foo
The events / handler function foo could not be resolved altogether, for a variety of reasons. This error occurs when the script contains the event kernel.function("blah"), and blah does not exist. In some cases, the error could also mean the script contains an invalid kernel file name or source line number.

问题:

感谢您的帮助

PS:对不起,如果这看起来有点脚本 kiddy-ish(我还没有完全理解这个热修复)。

是的,我已经在 CentOS 7 上成功实施了这个临时缓解措施。

如该 bugzilla 条目的 comments 之一所述,您需要为内核安装 systemtap 和 debuginfo 才能使此缓解措施起作用。

给出的命令是:

yum install systemtap yum-utils
debuginfo-install kernel-$(uname -r)

根据您发布的内容,推测您已经拥有 systemtap,但您收到的错误提示您需要 debuginfo 包。上面的第二个命令应该安装正确的东西;您也可以从 http://debuginfo.centos.org/ 手动获取 RPM(这就是我最终做的)

顺便说一句,这种使用 systemtap 的缓解措施并不是真正的修复,它只会使概念验证程序之一失败。值得做,但不能替代真正的补丁内核。

我不明白为什么 Red Hat 和 CentOS 还没有推出补丁内核包,Ubuntu 和其他人几天前就推出了更新。有什么阻碍?