Commit Graph

226 Commits

Author SHA1 Message Date
liuygzhuli e7f772444a Tools: acrnctl fix return value when it fails to execute the commands
Acrnctl commands return 0,even if when it fails to execute the commands.
 In this patch,fix this issue.It return none-zero when acrnctl commands
 failed in command executed.

 Tracked-On: #1262
 Signed-off-by:liuyonggang <yonggangx.liu@intel.com>
 Acked-by: Yan, Like <like.yan@intel.com>
2019-04-01 11:17:11 +08:00
liuygzhuli eea0ecd232 Tools: acrnctl fix return value when it fails to execute
the commands.

 acrnctl commands can manage multiple vms with a single
 command launched, which is not useful actually.
 To make the logic simple, this patch makes it to manage
 only a single vm by each command.

 Tracked-On: #1262
 Signed-off-by:liuyonggang <yonggangx.liu@intel.com>
 Acked-by: Yan, Like <like.yan@intel.com>
2019-04-01 11:17:11 +08:00
Jiang,Mao 71f75ebf23 Tools: acrnlog: fix confusing message "bad file descriptor" when start acrnlog
ACRNLog tries to open acrn_hvlog_last_* without check the presence of the device nodes at startup, which results a confusing message reporting "bad file descriptor" when there is no last device nodes exist. This commit fix the issue by checking the number of last devices before trying to open them.

Tracked-On: #2787
Signed-off-by: Jiang Mao <maox.jiang@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-29 12:15:20 +08:00
yuhong.tao@intel.com 5a7be9b869 tools: acrnctl fix cmd buffer is truncated when vmname too long
'acrnctl start vmname' use a cmd buffer with a sizeof 128 bytes,
cmd[128] buffer will be truncated, when vmnane size is bigger than
29 bytes. In that situation, vmnane size still smaller than
MAX_VM_OS_NAME_LEN, so it should be fixed.
Macro PATH_LEN is useful to determine the cmd[] buffer length, so move
it from acrn_mngr.c into acrn_mngr.h

Tracked-On: #2851
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yan Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-03-26 21:23:16 +08:00
yuhong.tao@intel.com b2f2d95246 tools: acrnctl restrict length of vmname to 32 bytes
When run 'acrnctl add launch_script.sh', vmname will be detected from
the launch script and stored in vmmngr_struct.name[MAX_VM_OS_NAME_LEN],
so vmname should not be longer than MAX_VM_OS_NAME_LEN.

Tracked-On: #2851
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-03-26 21:23:16 +08:00
liuygzhuli 0fb21cfa4a Tools: Acrnd fix reporting unnecessary error on NUC and UP2
The boards without IOC don't need to call get_sos_wakeup_reason function.
The HW IOC can be detected in runtime,via checking "/dev/cbc-early-signals" node.

Tracked-On:#1996
Signed-off-by: liuyonggang <yonggangx.liu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yuan Liu <yuan1.liu@intel.com>
2019-03-15 12:59:37 +08:00
David B. Kinder e9335fcee6 doc: fix utf-8 punctuation, branding, spelling
Fix some stray UTF-8 punctuation and symbol characters, unnecessary
trademark symbols, and some misspellings missed during regular reviews.

Tracked-On: #2712

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-14 09:13:58 -07:00
yuhong.tao@intel.com bd24e2de74 tools: acrnctl fix potential buffer overflow
When run 'acrnctl add', acrnctl dryruns launch script to get
vmname. Acrnctl assumes there are no more than 64 words in each
line of the script, and creates a buffer to hold 64 pointers to these
words. But we didn't check if the number of words exceed 64 limitation,
which can lead to buffer overflow. This commit fixed this potential
overflow problem.
And also refine some confusing error messages in 'acrnctl add'

Tracked-On: #2734
Acked-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
2019-03-13 10:21:59 +08:00
yuhong.tao@intel.com 204f9750a8 tools: acrnd: Fix launch UOS by timer list without fork()
When acrnd_vm_timer_func() launch UOS, it need fork() and run, so
that do not block the main process.

Tracked-On: #2716
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
yuhong.tao@intel.com 5d6f6ab798 tools: acrn-manager: fix a race condition on updating VM state
For a running or suspended VM, its state is updated in 2 steps.
It is first set to VM_CREATED, then set to VM_STARTED/VM_PAUSED. IF
one thread check a running/suspend VM, it may get wrong state VM_CREATED,
while another thread is updating the VMs state.

Tracked-On: #2716
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
Kaige Fu d5ec844f86 tools: acrn-manager: Replace pdebug with explicit err msg
pdebug just provide information about function name and source code line number.
From debug point of view, it is better to give developer more detailed err msg.

Tracked-On: #2716
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
yuhong.tao@intel.com 48774f716f tools: acrn-manager: print more debug information
Print more information at acrnd_add_work(), query_state()
try_do_works() and handle_acrnd_resume()

Tracked-On: #2716
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
Liu, Xinwu e299553896 tools: acrn-crashlog: new file to count all events happened in system
Since "history_event" file records limited events (5000 lines by default),
a new file named "all events" to count all kind of events.

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>
2019-02-28 13:18:57 +08:00
Liu, Xinwu 73e5323261 tools: acrn-crashlog: stop only collecting logs when exceeding configured size
Crashlog would drop all events after the storaged log size exceeds the
configured parameter "foldersize" previously, that basically means all
activities are stopped.

This patch brings other activities back (e.g. the records in the file
"history_event" will be updated continually), and restricts the "foldersize" by
stopping log collection.

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>
2019-02-28 13:18:57 +08:00
Tw 33ecdd7389 Makefile: undefine _FORTIFY_SOURCE prior using it
Currently, we are enforcing the _FORTIFY_SOURCE=2 without any
previous detection if the macro has been already defined, e.g.
by environment, or is just enabled by compiler by default on
some distributions (e.g. Gentoo).

This could result in the error like this:
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition

Tracked-On: #2344
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-02-28 11:56:45 +08:00
Long Liu f95da1832e dm: acrn-tool: Add del runC configuration in acrnctl del
The patch adds logic to delete runC configuration in acrnctl del command.
After launch the VM in container there will have configuration files in user
directory. When delete the VM by "acrnctl del" command the command will delete
the runC configuration files at same time.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-02-25 20:24:22 +08:00
Long Liu a0efd3e591 dm: acrn-tool: Add new parameter for acrnctl add
This patch adds the "-C" parameter handing in acrnctl. The "-C"
parameter be introduced for acrn-dm QoS feature. By current acrnctl
implementation, it will dry run the launch_uos.sh script to obtain the
VM name which defined during script execution.
The patch will strip "-C" parameter during the script dry run to avoid
create unexpected container, and add the "-C" parameter to the arguments
file after the script dry run.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-02-25 20:24:22 +08:00
Yan, Like b43f5cba57 tools: do not include unnecessary files in release build
This commit removes the unnecessary tool files in release build, including:
- entire acrnlog module
- entire acrntrace module
- acrnctl binary in acrn-manager

Tracked-On: #2575
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-02-22 16:09:04 +08:00
Ross Burton 912be6c4dd tools: respect CFLAGS and LDFLAGS from environment
The build environment might want to pass extra CFLAGS or LDFLAGS to the build of
the acrn tools. With conventional build systems like automake, Meson, etc this
is possible by just setting CFLAGS and LDFLAGS in the environment.

However as the tools are built using bare Makefiles, these environment variables
are overwritten.  Respect them by renaming the variables in the Makefiles to
e.g. LOG_CFLAGS and adding CFLAGS to that.

Tracked-On: #2316
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-24 09:33:00 +08:00
Ross Burton 5ba4afcffe Use $(MAKE) when recursing
Using 'make' directly means that the jobserver environment variables don't get
passed down, so sub-builds for example don't use -j.

This is documented as the wrong thing to do:
https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html#MAKE-Variable

Use $(MAKE) instead, and compile times drastically improve:

  acrn-devicemodel    do_compile   -13.5s   -89.6%      15.0s -> 1.6s

Tracked-On: #2370
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-24 08:22:32 +08:00
Liu, Xinwu d5b578fd84 tools: acrn-crashlog: Limit the log size of kmsg
Dmesg collects too much log when kernel meets log storm.
This patch reads kernel log from "/dev/kmsg" intead of dmesg and limits
the generated log size.

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>
2019-01-10 12:22:28 +08:00
Liu, Xinwu 156ea70821 tools: acrn-crashlog: Reboot system to cold after collecting reserve log
After panic, kernel will do warm boot to reserve memory for log collecting.
Need to cold reboot system as the original behaviour.

Tracked-On:#1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-01-10 11:01:40 +08:00
Yin Fengwei 73ab727434 dm: set correct thread name
When issue happen, we could identify which thread is impacted.
This could help stability issue debugging.

Tracked-On: #2037
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-14 19:50:50 +08:00
Yan, Like 04fef4f363 tools: acrn-manager: change path of vm conf files
The path of vm conf files changed from "/opt/acrn/conf" to "/usr/share/acrn/conf",
since "/opt" is not generally used on clearlinux.

Tracked-On: #2040
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-13 09:09:41 +08:00
David B. Kinder e4143ca138 doc: fix use of double dashes
Sphinx transforms ``--`` into an en-dash within a paragraph (not within
a code, pre, or kbd block though).  This presents a problem documenting
command parameters such as ``--name`` where the ``--`` is transformed
into a single en-dash.  Rather than disabling all smartquote
transformations in the Sphinx conf.py (setting ``smartquotes = False``),
we fixes cases where ``--`` should not be transformed by using a block
that is ignored by the smartquote transformation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-12 15:06:43 -08:00
yuhong.tao@intel.com bc5b27a73d tools: acrnctl: increase STOP_TIMEOUT to 30s when reset VM
The 'acrnctl reset' is implemented by a stop/start sequence. Reset failure was
observed since UOS is not able to shutdown within default 10s timeout.
This commit increased the default timeout to be 30s, and added an explicit error
message if 'acrnctl reset' due to UOS shutdown timeout.

Tracked-On: #2016
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2018-12-12 15:41:13 +08:00
yuhong.tao@intel.com 7ee0e2e2a4 tools: acrnctl: Fix path error when run "acrnctl add" cmd
There is a bug to run 'acrnctl add /[path]/script.sh', when the
launch script has an absolute path. Acrnctl will generate wrong path
for temp files and fail to add VM.

And message '/opt/acrn/conf: No such file or directory' always comes
out, until user once successfully run 'acrnctl add' cmd. That is reported
by _scan_added_vm(), because 'opt/acrn' is missing, only 'acrnctl add'
can create it, we should also check it in _scan_added_vm().

Tracked-On: #2013
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-12-10 09:26:08 +08:00
Kaige Fu d737d6e63f tools: acrnlog: give user hint when acrn hvlog devices not found
If module acrn_hvlog is configured as "m" and we don't insert it before
launching acrnlog tool, acrnlog will run normally instead of throw
out an error in current implementation. And no log files are generated.
It will cause confusing here.

So, this patch throw out an error massage to user about the absence of acrn
hvlog devices.

BTW, this patch replaces cpuid/num related concept to devid/cnt which is more
suitable for /dev/acrn_hvlog_xxx.

Tracked-On: #1975
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-12-05 13:16:20 +08:00
Kaige Fu d85a0b70ed tools: acrntrace: give user hint when acrn trace devices not found
If module acrn_trace is configured as "m" and we don't insert it before
launching acrntrace tool, acrntrace will run normally instead of throw
out an error in current implementation. And no trace files are generated.
It will cause confusing here.

So, this patch throw out an error massage to user about the absence of acrn
trace devices.

BTW, this patch replaces cpuid/num related concept to devid/cnt which is more
suitable for /dev/acrn_trace_xxx.

Tracked-On: #1975
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-12-05 13:16:20 +08:00
David Kinder 1ba7cebb1d Update tools/README.rst
Co-Authored-By: gvancuts <geoffroy.vancutsem@intel.com>
2018-11-28 12:24:44 -08:00
Geoffroy Van Cutsem 419feb1a61 Documentation: add a README.rst to the tools/ folder
Add a basic README.rst file to the tools/ folder to give a very brief
introduction and redirect the reader to the online documentation for more
details.

Tracked-On: #1896
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-11-28 12:24:44 -08:00
yuhong.tao@intel.com 2f33d1bcf2 tools: acrn-manager: Fix acrnctl mistake displaying suspended to paused
When UOS is sleeping, 'acrnctl list' command show it is 'paused', not
'suspended'. That is not correct. Because pausing an UOS means to block
its VCPUs immediately, otherwise suspending an UOS means to put it to
sleep.

Tracked-On: #1910
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-28 13:42:27 +08:00
Liu, Xinwu 3d1332f392 tools: acrn-crashlog: refine the log storage
1. remove watching TOMBSTONE in AaaG.
2. add a configurable parameter "foldersize" in MB, sender will drop
   all events when the storaged log size exceeds this parameter.

Tracked-On:#1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Chen Gang <gang.c.chen@intel.com>
Acked-by: Zhang Di <di.zhang@intel.com>
2018-11-27 14:26:25 +08:00
Ming Liu 7978188c1d tools: acrn-manager: set MAX_NAME_LEN to 32
I am currently using Yocto build and deploy UOS images, it would be
much more convenient to let the VMs to have the same names with when
they are being built. For instance, a typical image name in Yocto is
like: uos-image-weston, but it can not show the name completely with
'acrnctl list', since the length limit is 16.

Increasing the limit to 32 would fix this problem.

Tracked-On: #1837
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2018-11-19 12:52:46 +08:00
zhonghua 9dacc4a57d tools:acrn-crashlog:fix potential issue
this patch fix potential issue of initialization
about local variable in fsutils.c

Tracked-On: #1024
Signed-off-by: Zhonghua <zhonghua.sun@intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2018-11-15 16:39:54 +08:00
Yan, Like d49a6f6fca capture acrnd AaaG booting messages to journald
It's for AaaG boot time measurement only.

Tracked-On: #1759
Signed-off-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-08 15:14:15 +08:00
Tianhua Sun 313941e853 tools: acrn-manager: remove unsafe api sscanf
function sscanf is banned according to the security
requirements. So remove sscanf api.

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Tao, Yuhong <yuhong.tao@intel.com>
2018-11-05 09:50:04 +08:00
Tianhua Sun e24464a039 tools: acrnlog: remove usage of banned APIs
1, remove unsafe function sscanf
2, replace strlen with strnlen
3, replace atoll with strtoll and replace aoti with strtol

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Tao, Yuhong <yuhong.tao@intel.com>
2018-11-05 09:50:04 +08:00
Liu, Xinwu 3ffa9686ca tools: acrn-crashlog: fix potential issues
Changes include:
1. check the parameter of snprintf
2. remove atoi
3. remove sscanf
4. fix one memleak

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2018-11-02 11:52:01 +08:00
Tianhua Sun b12c7b741b tools: acrn-manager: remove usage of banned APIs
1, replace strlen with strnlen
2, Return value check for strncpy function

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
2018-11-01 11:22:26 +08:00
Tianhua Sun af760f8dce tools: acrn-manager: refine the usage of api 'snprintf'
Return value check for snprintf function

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
2018-11-01 11:22:26 +08:00
Tianhua Sun 5493804cab tools: acrnlog: refine the usage of api 'snprintf'
Return value check for snprintf function

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
2018-11-01 11:22:26 +08:00
Tianhua Sun a2383b06bf tools: acrntrace: remove unsafe api and return value check for snprintf
1, Return value check for snprintf function
2, Replace 'atoi' with 'strtol'

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
2018-11-01 11:22:26 +08:00
CHEN Gang 2f8c31f6b4 tools: acrn-crashlog: update the documents
This patch updates the documents according to the latest implementation
of crashlogctl.

Tracked-On: #1024
Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Reviewed-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
2018-10-25 10:03:40 -07:00
xiaojin2 6d076caaa6 tools: acrn-crashlog: remove unsafe apis in usercrash
Since strlen/vsnprintf/ato* api are not safe, so use strnlen instead of
strlen, use vasprintf instead of vsnprintf and use strtol instead of
atoi.

Tracked-On: #1254
Signed-off-by: xiaojin2 <xiaojing.liu@intel.com>
Reviewed-by: Huang Yonghua <yonghua.huang@intel.com>
Reviewed-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
2018-10-25 13:43:04 +08:00
Kaige Fu d29937374a tools: acrnd: Stop all vms when SOS shutdown/reboot
When SOS shutdown/reboot, systemd will send SIGTERM to acrnd. We should catch up
this signal and stop all vms gracefully.

BTW, this path also fix the following error when stop acrnd service by removing
ExecStop config. Systemd will send SIGTERM signal to process by default.

systemd[9378]: acrnd.service: Failed to execute command: No such file or directory
systemd[9378]: acrnd.service: Failed at step EXEC spawning /usr/bin/killall: No such file or directory
-- Subject: Process /usr/bin/killall could not be executed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/bin/killall could not be executed and failed.
--
-- The error number returned by this process is 2.

Tracked-On: #1563
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-25 13:30:14 +08:00
yuhong.tao@intel.com a853c05546 tools: acrnctl: fix: resume default wakeup reason is CBC_WK_RSN_BTN
UOS requires an wakeup reason when resumed from S3 suspend. If user
use "acrnctl resume [VMNAME]" without an reason, 0x0 will be used
as default reason, and this is not work. We can use CBC_WK_RSN_BTN
instead.

Tracked-On: #1550
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-24 18:13:10 +08:00
Liu, Xinwu 9368373fd9 tools: acrn-crashlog: check the pointer after getting sender
get_sender_from_name would return NULL if the name of sender is not
configured in acrnprobe.xml.
This patch check the return value of it.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Huang Yonghua <yonghua.huang@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
2018-10-23 09:11:48 +08:00
Yan, Like 4ce80e5ccc tools: acrn-manager: fix a potential compiler warning
Tracked-On: #1479
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-22 09:03:19 +08:00
Yan, Like e8c86566b1 tools: acrn-manager: fix a potential NULL pointer dereference
check the return value of vmmngr_find() before dereference in wait_vm_stop()

Tracked-On: #1479
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-22 09:03:19 +08:00