Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbaJBIhP (ORCPT ); Thu, 2 Oct 2014 04:37:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44318 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106AbaJBIhM (ORCPT ); Thu, 2 Oct 2014 04:37:12 -0400 Date: Thu, 2 Oct 2014 10:36:35 +0200 From: Jiri Olsa To: Stephane Eranian Cc: LKML , Namhyung Kim , Arnaldo Carvalho de Melo , Peter Zijlstra , "mingo@elte.hu" , David Ahern Subject: Re: [BUG] perf tools: off-by-one error in map_groups__find_ams() Message-ID: <20141002083635.GF9764@krava.brq.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 01, 2014 at 09:16:31PM +0200, Stephane Eranian wrote: > Hi, > > It appears that there is a off-by-one bug in map_groups__find_ams(). > The upper-bound check in the test below should be >= because > end = start + len; The end address is outside the range. > > Please confirm. > > > int map_groups__find_ams(struct addr_map_symbol *ams, symbol_filter_t filter) > { > if (ams->addr < ams->map->start || ams->addr > ams->map->end) { yep, looks like bug to me jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/