Linux: system call: reboot,无日志信息打印

282 篇文章 ¥59.90 ¥99.00
在应用程序中使用glibc的reboot函数导致快速重启,跳过了常规的日志记录过程,使得调查重启源头变得困难。为了解决这个问题,可以考虑使用strace工具来追踪系统调用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近遇到一个例子,
说在应用程序里直接调用glibc库函数reboot
而这个库函数调用的是内核提供的系统调用
reboot
这个reboot的过程和直接从命令行的reboot
是完全不一样。
这个reboot更直接,更迅速。
导致没有日志输出,根本看不出来是谁做的reboot。

如果想调查是谁调用了reboot,应该怎么做?
使用strace?

SELinux : avc: denied { find } for interface=vendor.xiaomi.hw.touchfeature::ITouchFeature sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hardware.cld::ICld sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:hal_health_storage_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.qti.sla.service::ISlaService sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hidl.miwill::IMiwillService sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.qti.sla.service::ISlaService sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hidl.minet::IMiNetService sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hidl.minet::IMiNetService sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hw.touchfeature::ITouchFeature sid=u:r:system_app:s0 pid=3872 scontext=u:r:system_app:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hardware.fbo::IFbo sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hardware.fbo::IFbo sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hardware.campostproc::IMiPostProcService sid=u:r:platform_app:s0:c512,c768 pid=9054 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hw.touchfeature::ITouchFeature sid=u:r:system_app:s0 pid=10143 scontext=u:r:system_app:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hw.touchfeature::ITouchFeature sid=u:r:system_app:s0 pid=10143 scontext=u:r:system_app:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hw.touchfeature::ITouchFeature sid=u:r:system_app:s0 pid=11940 scontext=u:r:system_app:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hardware.wireless::IWirelessSwitch sid=u:r:system_app:s0 pid=12014 scontext=u:r:system_app:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0 SELinux : avc: denied { find } for interface=vendor.xiaomi.hardware.fbo::IFbo sid=u:r:system_server:s0 pid=1578 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
最新发布
07-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mzhan017

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值