From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCHv2] kvm: drop parameter validation Date: Tue, 14 Aug 2012 22:35:35 -0300 Message-ID: <20120815013535.GA14033@amt.cnet> References: <20120814162028.GA27670@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , gleb@redhat.com, kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38658 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968Ab2HOBlG (ORCPT ); Tue, 14 Aug 2012 21:41:06 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7F1f5XE020751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 Aug 2012 21:41:05 -0400 Content-Disposition: inline In-Reply-To: <20120814162028.GA27670@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 14, 2012 at 07:20:28PM +0300, Michael S. Tsirkin wrote: > We validate irq pin number when routing is setup, so > code handling illegal irq # in pic and ioapic on each injection > is never called. > Drop it, replace with BUG_ON to catch out of bounds access bugs. > > Signed-off-by: Michael S. Tsirkin > --- > > Changes from v1: > add BUG_ON at Gleb's suggestion > > arch/x86/kvm/i8259.c | 18 +++++++++--------- > virt/kvm/ioapic.c | 37 +++++++++++++++++++------------------ > 2 files changed, 28 insertions(+), 27 deletions(-) Applied, thanks.