From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753670AbcEDPq5 (ORCPT ); Wed, 4 May 2016 11:46:57 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35982 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbcEDPqz (ORCPT ); Wed, 4 May 2016 11:46:55 -0400 Date: Wed, 4 May 2016 23:43:47 +0800 From: Wang YanQing To: Ingo Molnar Cc: Matt Fleming , Thomas Gleixner , "H . Peter Anvin" , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, David Herrmann , Peter Jones , stable@vger.kernel.org, Tomi Valkeinen Subject: Re: [PATCH 2/3] x86/sysfb_efi: Fix valid BAR address range check Message-ID: <20160504154344.GA3146@udknight> Mail-Followup-To: Wang YanQing , Ingo Molnar , Matt Fleming , Thomas Gleixner , "H . Peter Anvin" , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, David Herrmann , Peter Jones , stable@vger.kernel.org, Tomi Valkeinen References: <1462303781-8686-1-git-send-email-matt@codeblueprint.co.uk> <1462303781-8686-3-git-send-email-matt@codeblueprint.co.uk> <20160504063524.GB12846@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160504063524.GB12846@gmail.com> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 04, 2016 at 08:35:24AM +0200, Ingo Molnar wrote: > > * Matt Fleming wrote: > > > From: Wang YanQing > > > > We can't just break out when meet start is equal to zero, > > Hm, wot? > > Thanks, > > Ingo Sorry for my poor English ,and poor commit message, this bring trouble for more than one maintainer, I guess. The old code use below comparion as condition to terminate valid range check without care whether there are more ranges in later BARs: " if (start == 0) break; " I guess original author think (or make a mistake) when we meet a address range begin from zero means it is a invalid address range, and no valid address ranges in remain BARs. So I said: We can't break the loop when meet range whose start address is zero, without check it and remaining BARs' range. Thanks.