无法在Linux上启用内核动态调试 [英] Cannot enable kernel dynamic debugging on linux
本文介绍了无法在Linux上启用内核动态调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已在内核配置文件中启用了CONFIG_DYNAMIC_DEBUG
标志,该文件是&安装了内核.然后,当我重新启动时,我可以看到/sys/kernel/debug/dynamic_debug/control
.
I have enabled the CONFIG_DYNAMIC_DEBUG
flag in kernel config file, built & installed the kernel. Then, when I reboot, I can see /sys/kernel/debug/dynamic_debug/control
.
但是,当我尝试动态启用这样的模块时:
However, when I tried to dynamically enable a module like so:
sudo echo 'module xhci_hcd +p' > /sys/kernel/debug/dynamic_debug/control
我得到了:
bash: /sys/kernel/debug/dynamic_debug/control: Permission denied
请注意,我正在使用sudo
.
推荐答案
重定向(使用>
shell运算符)不是作为root用户执行的.这就是为什么您会收到权限被拒绝错误的原因.我建议您在整个子外壳中运行整个命令,例如:
The redirection (with the >
shell operator) is not performed as root. That's why you get a permission denied error. I suggest you run the whole command in a sub shell like:
sudo sh -c "echo 'module xhci_hcd +p' > /sys/kernel/debug/dynamic_debug/control"
这篇关于无法在Linux上启用内核动态调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文