From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 2/9] xen: arm: Implement variable levels in dump_pt_walk Date: Mon, 08 Sep 2014 14:33:39 -0700 Message-ID: <540E20B3.4010401@linaro.org> References: <4427aba8dad3155fca151a0b63bfdf78e3a91033.1409847257.git.ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: tim@xen.org, vijay.kilari@gmail.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, I forgot one point on my previous mail. On 04/09/14 09:14, Ian Campbell wrote: > - if ( first_table_offset(addr) >= LPAE_ENTRIES ) > - return; > + mappings[root_level] = root; > + > + for ( level = root_level; ; level++ ) > + { I would add the check "level < 3" or an ASSERT in the beginning of the loop. So we could catch a possible overflow on offsets later if someone decide to modify it. Regards, -- Julien Grall