From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752272AbdASLSd (ORCPT ); Thu, 19 Jan 2017 06:18:33 -0500 Received: from foss.arm.com ([217.140.101.70]:47074 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbdASLS1 (ORCPT ); Thu, 19 Jan 2017 06:18:27 -0500 Date: Thu, 19 Jan 2017 11:16:28 +0000 From: Mark Rutland To: Fu Wei Cc: Hanjun Guo , "Rafael J. Wysocki" , Len Brown , Daniel Lezcano , Thomas Gleixner , Marc Zyngier , Lorenzo Pieralisi , Sudeep Holla , linux-arm-kernel@lists.infradead.org, Linaro ACPI Mailman List , Linux Kernel Mailing List , ACPI Devel Maling List , rruigrok@codeaurora.org, "Abdulhamid, Harb" , Christopher Covington , Timur Tabi , G Gregory , Al Stone , Jon Masters , Wei Huang , Arnd Bergmann , Catalin Marinas , Will Deacon , Suravee Suthikulpanit , Leo Duran , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, Tomasz Nowicki , Christoffer Dall , Julien Grall Subject: Re: [PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver Message-ID: <20170119111628.GC11176@leverpostej> References: <20170118132541.8989-1-fu.wei@linaro.org> <20170118132541.8989-14-fu.wei@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 19, 2017 at 06:32:55PM +0800, Fu Wei wrote: > On 19 January 2017 at 17:11, Hanjun Guo wrote: > > On 2017/1/18 21:25, fu.wei@linaro.org wrote: > >> From: Fu Wei > >> + else if (!gtdt->platform_timer_count) > >> + pr_debug("No Platform Timer.\n"); > >> + else > >> + timer_count = gtdt->platform_timer_count; > >> + > >> + if (timer_count) { > >> + platform_timer = (void *)gtdt + > >> gtdt->platform_timer_offset; > >> + if (platform_timer < (void *)table + > >> + sizeof(struct acpi_table_gtdt)) { > >> + pr_err(FW_BUG "invalid timer data.\n"); > > > > > > It's ok but I didn't see other ACPI tables parsing did this check, > > maybe we can just remove it :) > > here, I want to make sure the FW is valid. > Once there is a FW bug, we could just return with error. :-) Yes, please keep the check! If anything, it would be nicer for the other ACPI code to verify things a little more stringently. Thanks, Mark.