From ed51cfd7414c29c311336dfd6be59a9c4ec6f3ff Mon Sep 17 00:00:00 2001 From: Yonghua Huang Date: Sat, 12 Oct 2019 14:36:00 +0800 Subject: [PATCH] hv: fix error debug message in hcall_set_callback_vector this patch is to fix error debug message for invalid 'param' case, there is no string variable for '%s' output, which will potenially trigger hypervisor crash as it may access random memroy address and trigger SMAP violation. Tracked-On: #4114 Signed-off-by: Yonghua Huang --- hypervisor/common/hypercall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/common/hypercall.c b/hypervisor/common/hypercall.c index c06f3fe2d..6adb32eb0 100644 --- a/hypervisor/common/hypercall.c +++ b/hypervisor/common/hypercall.c @@ -1110,7 +1110,7 @@ int32_t hcall_set_callback_vector(const struct acrn_vm *vm, uint64_t param) } if ((param > NR_MAX_VECTOR) || (param < VECTOR_DYNAMIC_START)) { - pr_err("%s: Invalid passed vector\n"); + pr_err("%s: Invalid passed vector\n", __func__); return -EINVAL; }