Commit Graph

83 Commits

Author SHA1 Message Date
CHEN Gang 31ebd98797 tools: acrn-crashlog: replace ldconfig with pkg-config in Makefile
This patch is to fix the dependency issue with autospec.

Using ldconfig in the autospec build environment is not
going to work as the packages do not have the cache
generate after a rpm install. This patch replaces ldconfig
with pkg-config to check the existance of the libraries.

Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Reviewed-by: Jin Zhi <zhi.jin@intel.com>
Reviewed-by: Liu Xinwu <xinwu.liu@intel.com>
Acked-by: Zhang Di <di.zhang@intel.com>
2018-07-03 16:44:58 +08:00
Kaige Fu 5907400182 tools: acrntrace: Remove unused pre_process.sh
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-07-03 10:19:31 +08:00
Kaige Fu ad89a22011 tools: acrntrace: Make all python scripts python3 module
The trend is to focus on Python3 and deprecate Python2. This patch make all the
acrntrace related scripts as Python3 module.

  - Add parentheses to all the print as Python3 required.

  - Remove suffix L and long() Python3 has deprecated. Python3 will treat all
    intergers as long.

  - Replace has_key() with "key in .keys()" because has_key() has been deprecated.

  - Other minor fixes.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-07-03 10:19:31 +08:00
Liu, Xinwu 41b39c5e1f tools: acrn-crashlog: Defer the vm events processing when failed
In the original design, acrnprobe marked all handled VMs'events as "synced"
in file vmrecordid(this patch changes the name to VM_eventsID.log).
Currently, the Android log events are not logged if the first attempt at
reading collecting them from the VM fails. This patch changes the logic
so that the acrn-crashlog tool will retry continuously.

This patch defines different tags for handled VMs'events, and only marks
VMs'events "synced" after it returns successfully.

Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: xiaojin2 <xiaojing.liu@intel.com>
Reviewed-by: Jin Zhi <zhi.jin@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Chen gang <gang.c.chen@intel.com>
2018-06-29 15:23:18 +08:00
Kaige Fu 136d5c30fb tools: acrntrace: Add irq related analyzer
This analyzer is implemented in vmexit_analyze. This patch make it as independent
analyzer with an option "--irq"

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 13:05:27 +08:00
Kaige Fu 8a233eec63 tools: acrntrace: Refactor vmexit_analyzer based on new trace format
- Refactor vmexit_analyzer based on new trace format (raw data). We can get
    the same output like original implementation.

  - Remove irq related analysis. Will add it back with an option "--irq".

  - Remove unused VMEXIT_EPT_VIOLATION_GVT

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 13:05:27 +08:00
Kaige Fu 2bdd8112bd tools: acrntrace: Using array for saving all analyzer
As we may analyze multi-cases at the same time. It's better to store all the
analyzer in an array. Then we can traverse the array and exec all analyzer one
by one.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 13:05:27 +08:00
Kaige Fu 2aa0d4074f tools: acrntrace: Make TSC frequency configurable
Originally, acrntrace stores cpu frequency in output file and use it for time-based
analysis. Actually, we should use TSC frequency instead of cpu frequency.

This patch change to using TSC frequency for time-based analysis and introduce
an option "-f --frequency" to let user configure TSC frequency.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 13:05:27 +08:00
Kaige Fu 0d9b163875 tools: acrntrace: Add new tool acrntrace_format
acrntrace_format.py is used for parsing raw trace data to human-readable file on
given format. A sample format file for acrntrace predefined trace events is available
in tools/acrntrace/scripts/formats in acrn source tree.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 13:05:27 +08:00
Kaige Fu a35a650f5f tools: acrntrace: output trace data as raw data
Benefits of outputing trace data as raw data:
  - Smaller trace data size
  - More convenient to add new trace entry. There is no need to change acrntrace
    when we add new trace entry to HV. All we need do is to update the analysis
    scripts to deal with this situation.

Trace data size(with 1 UOS):
~57M   -- with patch
~137M  -- without patch

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 13:05:27 +08:00
Shuo Liu 1c605a4f50 build: Using id tool to get builder username
Some build environment might has no USER pre-defined. So use id tool to
get builder username instead of USER environemnt.

Also add a version cleanup for tools to keep them updated.

Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 11:55:03 +08:00
xiaojin2 cb39badf82 tools: acrn-crashlog: fix potential issues under common and usercrash
This patch is to fix buffer overflow, return value not unified and
variable type not matched issues. And add some judge logic to improve
code quality.

Changes:
1. Handle the fd properly in the failing case.
2. Fix buffer overflow issues and null pointer access issues.
3. Fix the format issue in log_sys.c.
4. Remove the useless branch and adjust the function logic.
5. Add some checks for the string length before using strcpy/strcat/memcpy.
6. Fix strncpy null-terminated issues.
7. Change the return value to unify the return type.

Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Signed-off-by: xiaojin2 <xiaojing.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Reviewed-by: Liu Xinwu <xinwu.liu@intel.com>
Acked-by: Zhang Di <di.zhang@intel.com>
2018-06-21 11:29:20 +08:00
Kaige Fu 6137ccd6d6 tools: acrn-crashlog: fix format-security warning
We will get the following warning when build acrn. This patch fix it.
No functional change.

In file included from log_sys.c:8:0:
log_sys.c: In function ‘do_log’:
log_sys.c:44:26: warning: format not a string literal and no format arguments [-Wformat-security]
  sd_journal_print(level, log);
                          ^

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-06-20 12:27:58 +08:00
David B. Kinder 685d82cdcc doc: fix formatting in acrnlog doc
A merged change had problems with the formatting of acrnlog options.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-20 11:28:36 +08:00
xiaojin2 3e8e607d5b tools: acrn-crashlog: Fix potential issues under acrnprobe
This patch is to fix potential issues, which are reported by static
analysis tool, for acrnprobe.

Changes:
1. Check the return value of sender_id() and get_sender_by_name(),
   since it could be -1 or NULL.
2. Remove the parameter len from create_event, take parameter path
   as a NULL-terminated string as default.
3. Modify for_each_* functions to avoid overflow.

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>
2018-06-20 11:27:55 +08:00
xiaojin2 0c39b9cddc tools: acrn-crashlog: Fix potential issues for load_conf module of acrnprobe
This patch is to fix potential issues, which are reported by static
analysis tool, for load_conf module of acrnprobe.

Changes:
1. Check the range of id while loading configuration, to avoid
   memory corruption.
2. Use strncpy instead of strcpy to avoid buf overflow.

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>
2018-06-20 11:27:55 +08:00
Tan Shen Joon b3ca8f43ff add acrnbridge-install to Makefile install target
This was missed out. Added
to fix the makefile install target.

Signed-off-by: Tan Shen Joon <shen.joon.tan@intel.com>
2018-06-20 11:27:24 +08:00
Liu, Xinwu fa5229052c tools: acrn-crashlog: Improve the efficiency of do_log
Get the header size by receiving return value of snprintf instead
of initialize log buffer and strlen.

Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
2018-06-20 11:26:24 +08:00
Yan, Like b8bdf171eb tools: acrnlog: improve for log incompleteness problem
1. add warning when log incompleteness observed;
2. decrease default polling interval to reduce chance of log incompleteness;
3. add option "-t" to allow user to specify the polling interval;
4. modified README.rst to reflect the options.

Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-06-19 16:20:31 +08:00
Yan, Like 57d6a933f6 tools: correct several Makefile problems
1. mkdir ./tools/build if it does not exist;
2. correct static lib path for acrn-manager;
3. do not remove acrnlog.service if build under source code dir by default.

Reviewed-by: Geoffroy VanCutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-06-19 15:33:31 +08:00
CHEN Gang 2e3af9e062 tools: acrn-crashlog: fix typo in Makefile
This patch is to fix libtelemetry.so typo in Makefile.

Signed-off-by: Liu Xinwu <xinwu.liu@intel.com>
Acked-by: Zhang Di <di.zhang@intel.com>
2018-06-14 15:45:00 +08:00
yuhong.tao@intel.com 24ccdf2807 Tools:acrn-manager: use RELEASE in Makefile
The debug macro -DMNGR_DEBUG is selected by RELEASE value.
E.g., run 'make RELEASE=1' at the root of source code.

Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-06-14 13:40:44 +08:00
Geoffroy Van Cutsem 35f06b8382 Documentation: fix incorrect link in acrn-probe documentation
There is a mismatch in the 'telemetrics-clients' reference which
causes a warning (and a dead link).

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-12 14:08:26 -07:00
CHEN Gang 7d13e5be1b tools: acrn-crashlog: add documents for acrn-crashlog
This patch adds the documents for acrn-crashlog:
README.rst: General introduction for acrn-crashlog.
acrnprobe/README.rst: Introduction for acrnprobe in detail.
usercrash/README.rst: Introduction for usercrash in detail.

Signed-off-by: xiaojin2 <xiaojing.liu@intel.com>
Signed-off-by: Liu Xinwu <xinwu.liu@intel.com>
Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-11 21:46:56 -07:00
yuhong.tao@intel.com 64515cfe58 Tools:acrn-manager Fix wrong descrition of mngr_send_msg()
There is a mistake on description for mngr_send_msg() in acrn_mngr.h
We mistake the ack_len to req_len

Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-06-11 16:45:24 +08:00
Tan Shen Joon b7ad7052bd convert bridge creation to service
update to systemd config files so that the bridge will be up
when systemd-networkd is started.

Signed-off-by: Tan Shen Joon <shen.joon.tan@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
2018-06-11 16:36:43 +08:00
Tan Shen Joon 2dfa5f6c40 fix spelling errors for acrn-manager
Signed-off-by: Tan Shen Joon <shen.joon.tan@intel.com>
2018-06-11 09:19:42 +08:00
Kaige Fu 83791190d6 tools: acrnctl: Fix wrong descrition of mngr
There are some inappropriate descrition related to mngr, like "vmm msg".
Replace all "vmm" with "mngr".

No functional change.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-08 13:46:19 +08:00
Kaige Fu 2dd4e8f81a tools: acrnctl: Add support for reseting vm
Add command reset to stop and then start vm.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu 7a0e8ddeec tools: acrnctl: Add support for resuming vm
Add command resume to resume vm from suspend state.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu d6eb39daf4 tools: acrnctl: Add support for suspending vm
Add command suspend to switch vm to suspend state.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu 665c2ee93f tools: acrnctl: Add support for continuing vm
Add command continue to start vm from pause state.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu 1933d60c29 tools: acrnctl: Add support for pausing vm
Add command pasue to pause vm.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu 3000edc6ad tools: acrnctl: Free vmmngr list after vm ops done
vmmngr_struct entry is allocated in get_vm_list. we should free it after vm ops done.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu 2da5e7c16a tools: acrnctl: Use new IPC lib to connect acrn-dm
this patch aim at
    1. Use new IPC lib to connect acrn-dm.
    2. Export list_vm, start_vm and stop_vm and acrnd will use them later.
    3. Rename vmm releated struct and function

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Kaige Fu 143c49b0d2 tools: acrnctl: Refactor help info
Add unified function .valid_args to check validation of args.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-07 14:36:18 +08:00
Yan, Like c84766a869 Tools: add Makefile for all tools
Add a Makefile under ./tools to avoid changing top-level Makefile frequently

Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-06-07 09:56:33 +08:00
CHEN Gang de4b596e3a tools: acrn-crashlog: change source of config file
This patch is to change the source of config file according
to the doc of telemetrics-client:

There is a config file installed at
``/usr/share/defaults/telemetrics/telemetrics.conf``
To make modifications, copy that file to
``/etc/telemetrics/telemetrics.conf``
and modify the /etc version.

Otherwise, the modification may be lost after ``swupd update``.

Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Reviewed-by: Zhang Di <di.zhang@intel.com>
Reviewed-by: Jin Zhi <Zhi.jin@intel.com>
Reviewed-by: Liu Xinwu <xinwu.liu@intel.com>
2018-06-07 09:55:58 +08:00
Geoffroy Van Cutsem 7f2a7d47dd Tools Makefiles: enhancement to keep source code tree clean
Running 'make' will leave 3 files in the source code tree that
are not cleaned by a subsequent 'make clean'. These are:
* tools/acrn-crashlog/acrnprobe/include/version.h
* tools/acrn-crashlog/usercrash/include/version.h
* tools/acrn-manager/acrn_mngr.o
(as reported by 'git status' after 'make')

This patch changes the location of these files so they are
created in the target build directory and hence properly
cleaned when running 'make clean'

Other minor changes to the Makefiles include:
* Remove BASEDIR by the built-in CURDIR variable
* Add .PHONY targets

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-05 10:22:24 +08:00
Yan, Like 476f39e032 Tools:acrnlog: install acrnlog.service
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-06-01 17:11:45 +08:00
David B. Kinder f4122d99c5 license: Replace license text with SPDX tag
Replace the BSD-3-Clause boiler plate license text with an SPDX tag.

Fixes: #189

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-06-01 10:43:06 +08:00
Kaige Fu e32a5cadf2 tools: acrnctl: Fix regression of acrnctl list
commit(4d274a5 Tools: acrn-manager-interface) change location and naming scheme
to the follow.
    /run/acrn/mngr/vmname.monitor.pid.socket

This patch adapt parse vmname according new naming scheme.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-01 10:26:27 +08:00
Geoffroy Van Cutsem 11f4b014cb Documentation: small addition to the 'acrnlog' tool documentation
Make it clear that some commands mentionned in the 'acrnlog' tool
documentation are meant to be run in the hypervisor shell and *not*
the Service OS shell (as are the other commands throughout the rest
of that document).

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-05-31 11:46:03 -07:00
yuhong.tao@intel.com eada59c934 DM: adapt dm-monitor and acrnctl to use the helpers
Adapt dm-monitor and acrnctl to use the helper functions and new message
definitions in acrn_mngr.h.
These jobs must be done in one commit to avoid build problems:
1. message transmission and callback registration code are moved
 to libacrn-mngr.a, so old functions in dm-monitor could be removed to
 make code clean;
2. remove unnecessary monior_msg.h;
3. minor changes to acrnctl accordingly.

Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
signed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-05-31 11:25:47 +08:00
yuhong.tao@intel.com 53ecd932ad Tools: acrn-manager: add definitions of message sturcts
We define messages into three types, accroding to which component is
responsible to handle it:
1. message handled by sos lifecycle service, from vm manager;
2. message handled by vm manager, from sos lifecycle service&dm;
3. message handled by dm, from vm manager.

Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
signed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-05-31 11:25:47 +08:00
yuhong.tao@intel.com 7d7cf309eb Tools: acrn-manager: add lib with IPC helpers
Add lib to help IPC between components, including SOS lifecycle service,
acrn manager and devicemodule.
Following helper functions are included:
  int mngr_open_un() - create a descripter for vm management IPC
  void mngr_close() - close descripter and release the resouces
  int mngr_add_handler() - add a handler for message specified by msg
  int mngr_send_msg() - send a message and wait for ack

Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
Sigbed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-05-31 11:25:47 +08:00
David B. Kinder 50324e5876 doc: fix tools docs formatting and clarity
This continues the editing from PR #276 with formatting and clarity
edits to have these tool documents blend in with the rest of the ACRN
documentation.  It also builds on PR #307 that set up the doc build
infrastructure to allow leaving these tool docs within the tools/
folder.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-05-30 10:36:31 -07:00
Taimoor f4b9412013 fix acrntrace README
fix acrnlog README

Fix acrn-manager README

Signed-off-by: T <shrmrf@users.noreply.github.com>
2018-05-29 14:24:17 -07:00
Kaige Fu 26b089932c tools: acrnctl: Properly null-terminate cmd_out and buf
Library function strtok_r and printf accept a string with the constraint that
the string they receive is properly null-terminated.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
2018-05-29 14:13:20 +08:00
Kaige Fu 11abe6e81e tools: acrnctl: fix possibility of buffer overflow
Replace strcpy with strncpy to avoid possibility of buffer overflow

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
2018-05-29 14:13:20 +08:00