From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=FROM_EXCESS_BASE64, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D002C43387 for ; Fri, 11 Jan 2019 13:39:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0233120874 for ; Fri, 11 Jan 2019 13:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732736AbfAKNju (ORCPT ); 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.