From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch] KVM: make checks stricter in coalesced_mmio_in_range() Date: Wed, 19 Oct 2011 15:26:24 -0200 Message-ID: <20111019172624.GB8575@amt.cnet> References: <20111019061510.GA12399@elgon.mountain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org, kernel-janitors@vger.kernel.org To: Dan Carpenter Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49338 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751217Ab1JSR2M (ORCPT ); Wed, 19 Oct 2011 13:28:12 -0400 Content-Disposition: inline In-Reply-To: <20111019061510.GA12399@elgon.mountain> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Oct 19, 2011 at 09:15:10AM +0300, Dan Carpenter wrote: > My testing version of Smatch complains that addr and len come from > the user and they can wrap. The path is: > -> kvm_vm_ioctl() > -> kvm_vm_ioctl_unregister_coalesced_mmio() > -> coalesced_mmio_in_range() > > I don't know what the implications are of wrapping here, but we may > as well fix it, if only to silence the warning. There are no negative implications, if variables wrap unregistration fails. Applied, thanks.