Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp575744pxj; Thu, 20 May 2021 16:42:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMcG3L+oDN2bSEPFu6/r9zHuk3A12Uy8pS8c7RLXEQ7nOVnaBvUJu7N2WL14W21Bq3iG2M X-Received: by 2002:a5e:aa10:: with SMTP id s16mr8433984ioe.147.1621554136481; Thu, 20 May 2021 16:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621554136; cv=none; d=google.com; s=arc-20160816; b=GBAgeUC1PBb1H5kGJEGda7qduRHBuh9HqQs+SbKJtD79mm3fWCezbx4VelVV/OdzUT 8SAi3BhCIwjgD5flLhG1Ez86UthKgrlRQnmbw5OZ8a8jpYvO7Lzy89i6aJDKPLy0U1cs eDM3esEPZnXylE0fFltXKzfbr+BB7C0tRHilzVQ0tbrTTmlQkl8M1h9jzIvEk3pwTXps cJgKfGI7VrjaWrPmmLYAA1zAlSnREq2Ze/sXwIUgKMiRtz/a2yp0OtJFxoQIxTUOwC72 YeNBNelz6Vxz4D1mDB+oq4Q4luF8+054C4Yz7hwRGTAHYovWpD7w21LQtdxpbtKtH6TP BEpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S14LubNlQoD2XwLjh+JnJgmFzYIJHtZZWzBTvjUOf6k=; b=oGsKGLuFe8P6h7IgP3rEP4ojcNqprRe10p6sCr7wO1KzyT7ywS/BfPr/iZzB6x4si1 u52kdXMbCQa0GqRz7x9WoSnjZBFP4pD07nRKoklmPEAPOARrFLdXL+mVMTqU/3nnoDNO 286u2DzhPWAFHO8YEz1l7YBWD+kLZZHKnYIX+SVD6u8qDIdX4vtDdRmXyCKW/UVG4hHz aQzde/ohTgKPjB/lt8bmFXrg2ZaM5aNLkjut4yUl/t9XKNxpSoerPtEfrYYoO+dA0Ajb QTRqrVLcyZ8DtYVoxqBfPtX4IapWUUm7VyaVmOuV8VgaocxOQX8WK9sfbLQHgAQo6ada 7taw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aZ6qlDu+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si3883140iow.6.2021.05.20.16.42.02; Thu, 20 May 2021 16:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aZ6qlDu+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241097AbhETLdK (ORCPT + 99 others); Thu, 20 May 2021 07:33:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:58198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239292AbhETLMi (ORCPT ); Thu, 20 May 2021 07:12:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2E31661D52; Thu, 20 May 2021 10:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505271; bh=tL1WG2HabN56/tkOGg5mdffeNgPB6ImRJFOAt+HNIac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aZ6qlDu+a90xpg9ra1uKxvdEDIxrpWHyMjAOEeo2/VCGzZuG7LATS3O+221lD0n6d JfztrrL/T45MguY/JHB74C593zBUbHgUImJXuXjMSubf6cVAQ0yg9DBPtWFaS27ojq cVJtHdztflk0E91QJU74N7LZC1HlLsdfCk1MrlQM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tetsuo Handa Subject: [PATCH 4.4 059/190] misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct Date: Thu, 20 May 2021 11:22:03 +0200 Message-Id: <20210520092104.119087326@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tetsuo Handa commit 376565b9717c30cd58ad33860fa42697615fa2e4 upstream. KMSAN complains that the vmci_use_ppn64() == false path in vmci_dbell_register_notification_bitmap() left upper 32bits of bitmap_set_msg.bitmap_ppn64 member uninitialized. ===================================================== BUG: KMSAN: uninit-value in kmsan_check_memory+0xd/0x10 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.11.0-rc7+ #4 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020 Call Trace: dump_stack+0x21c/0x280 kmsan_report+0xfb/0x1e0 kmsan_internal_check_memory+0x484/0x520 kmsan_check_memory+0xd/0x10 iowrite8_rep+0x86/0x380 vmci_send_datagram+0x150/0x280 vmci_dbell_register_notification_bitmap+0x133/0x1e0 vmci_guest_probe_device+0xcab/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30 Local variable ----bitmap_set_msg@vmci_dbell_register_notification_bitmap created at: vmci_dbell_register_notification_bitmap+0x50/0x1e0 vmci_dbell_register_notification_bitmap+0x50/0x1e0 Bytes 28-31 of 32 are uninitialized Memory access of size 32 starts at ffff88810098f570 ===================================================== Fixes: 83e2ec765be03e8a ("VMCI: doorbell implementation.") Cc: Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20210402121742.3917-1-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman --- drivers/misc/vmw_vmci/vmci_doorbell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/misc/vmw_vmci/vmci_doorbell.c +++ b/drivers/misc/vmw_vmci/vmci_doorbell.c @@ -334,7 +334,7 @@ int vmci_dbell_host_context_notify(u32 s bool vmci_dbell_register_notification_bitmap(u32 bitmap_ppn) { int result; - struct vmci_notify_bm_set_msg bitmap_set_msg; + struct vmci_notify_bm_set_msg bitmap_set_msg = { }; bitmap_set_msg.hdr.dst = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID, VMCI_SET_NOTIFY_BITMAP);