Dispatch the new event id and log directory in one place.
Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
Remove unsafe api strlen except the parameter is a static string.
Tracked-On: #1254
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
Acrnprobe is using SHA to generate ids for events. These ids are only used
to index events, not for cryptographic purpose.
This patch unify the generating algorithm of short and long ids to
SHA256.
Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
Since ACRN has the capability to reboot and reboot reason is available
in SOS, acrnprobe could detect the crash of acrn and SOS kernel.
List of added crash types:
1. ACRNCRASH - crashed in hypervisor, this detection depends on
files in /tmp/acrnlog_last(provided by acrnlog).
2. IPANIC - crashed in SOS kernel, this detection depends on
pstore.
3. SWWDT_IPANIC - crashed in SOS kernel and reboot reason is wdt.
4. HWWDT_UNHANDLE - only recognize reboot reason is global, there is no
further clues that it's a SOS kernel crash or a
hypervisor crash.
5. SWWDT_UNHANDLE - only recognize reboot reason is wdt, there is no
further clues that it's a SOS kernel crash or a
hypervisor crash.
6. UNKNOWN - only recognize reboot reason is warm, there is no
further clues that it's a SOS kernel crash or a
hypervisor crash.
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
1. Reload the trigger file(s) of subcrash while doing crash reclassify.
2. Support simple format for trigger file.
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
This patch provides some utils for acrnprobe.
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>