linux - CentOS 7.2 上的 Dirty CoW 缓解措施 - 语义错误 : while resolving probe point

标签 linux system-calls centos7 rhel7 dirtyread

我正在按照此处所述在我的系统上实现临时补丁(非持久性)(在等待官方发行版内核时):

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 ~/>

有颜色(如果你喜欢的话):

enter image description here

阅读这篇文章:

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.

问题:

  • 这本质上是在说明 syscall 内核函数无法识别,对吗?
  • 有人在 CentOS 7.x 上成功实现了此临时修复吗?

感谢您的帮助

PS:抱歉,如果这看起来有点脚本 child 气(我还没有完全理解这个热修复)。

最佳答案

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

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

给出的命令是:

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

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

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

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

关于linux - CentOS 7.2 上的 Dirty CoW 缓解措施 - 语义错误 : while resolving probe point,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40193512/

相关文章:

c# - 如何在 ubuntu 18.04.2 上访问 nuget 包管理器控制台

c++ - 与 imread 相比,QImage 到 cv::Mat 转换奇怪的行为

centos - firewalld 更改默认目标

kubernetes - Kubeadm和在主节点上调度Pod的风险(Pod始终处于等待状态)

linux - Hadoop从本地上传文件到HDFS

linux - 使用 systemd,如何识别服务中的冷启动与重新启动?

linux - 无法为特定内核版本构建 Linux 内核模块

Linux 上的 Golang : How to use syscall. 系统调用?

c - 为什么 exevp 之前的 printf 没有运行?

c - 显示按状态过滤的进程的系统调用