Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp808347imu; Fri, 11 Jan 2019 09:23:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN62NqyfUa8fGATGEkpgP0yH0U5DFQ48C35bWyf6SgRnoOse4NIBMoLItsTIdAhlmAheUlsu X-Received: by 2002:a17:902:8c91:: with SMTP id t17mr15005466plo.119.1547227380084; Fri, 11 Jan 2019 09:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547227380; cv=none; d=google.com; s=arc-20160816; b=aTOqzeDahDZDyVutM5LPzH1Fpa/BiD+MI0UnpNl452K0RhuQ3VeuY2goKxmd+oifuv hoqWYS3X5KgkbebsKF8vVqK2Va3v0y5w38qVqiDlWzgO8FKza8MSG2McA9ZuA4dWcyO9 XGmatlnZK5B6s4XAcPxDupMJHC6UI12EmC5IiRLE56x6I85zz94usST71YHsPGUFGopD e/iBC+Bu63OqJc4MiicNg5d9HHGr+Fqy5421HiwLuReqSJmELuLeLIxkFfkWwuXdJL5c 7GKSssJeSpEp5P+t19vYvHNoUapEtp5YSL0xzHWH6ZYoYfro+BxDBTL8r2QVu0LUNgBj HXhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=IMaNM6t8Y/uF5OIdCIpk6QvimEkdNzASu3rHmdMuoJQ=; b=HZLFHr0iBJzEEhQH3thpg1ztw/ZULezA9uwATn/PSc0p2NLDEAuw4vxoCl0/tFmhN4 c/zL4MBsMFUdL9WqVLZcbuO1SGjGwwIWB/omseMdXD2CRX+1CPottekJrYfE1sLp2bxD aeMwcfRB7yfmY++/jUakghtkpIMXi/S+PKYN5y/MRom9++h9T4t8U481GLK0fWoOY5UZ /KtmtXjr7eQz3mRz769s9owp03cv+h9rqV4lU8ynb52yoj6+oRb7DDyxd1GyR4AbdLEZ C1XhNujTCufJ/2w6n/mzLEQ9lJeN26ykL+WQSgWIFh4AlMAfksy1LmYpgoUyn/VOX2Sy J52g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si17414354plk.174.2019.01.11.09.22.41; Fri, 11 Jan 2019 09:23:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732103AbfAKNju (ORCPT + 99 others); Fri, 11 Jan 2019 08:39:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49292 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728542AbfAKNju (ORCPT ); Fri, 11 Jan 2019 08:39:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 531A0C057FA3; Fri, 11 Jan 2019 13:39:50 +0000 (UTC) Received: from flask (unknown [10.40.205.161]) by smtp.corp.redhat.com (Postfix) with SMTP id 6D08E451D; Fri, 11 Jan 2019 13:39:46 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Fri, 11 Jan 2019 14:39:45 +0100 Date: Fri, 11 Jan 2019 14:39:45 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: "Gustavo A. R. Silva" Cc: Luwei Kang , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] KVM: x86: Fix bit shifting in update_intel_pt_cfg Message-ID: <20190111133944.GC14852@flask> References: <20181226204059.GA11391@embeddedor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181226204059.GA11391@embeddedor> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 11 Jan 2019 13:39:50 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-12-26 14:40-0600, Gustavo A. R. Silva: > ctl_bitmask in pt_desc is of type u64. When an integer like 0xf is > being left shifted more than 32 bits, the behavior is undefined. > > Fix this by adding suffix ULL to integer 0xf. > > Addresses-Coverity-ID: 1476095 ("Bad bit shift operation") > Fixes: 6c0f0bba85a0 ("KVM: x86: Introduce a function to initialize the PT configuration") > Signed-off-by: Gustavo A. R. Silva > --- Applied, thanks.