From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbdASM2u (ORCPT ); Thu, 19 Jan 2017 07:28:50 -0500 Received: from mail-io0-f180.google.com ([209.85.223.180]:34124 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752341AbdASM2p (ORCPT ); Thu, 19 Jan 2017 07:28:45 -0500 MIME-Version: 1.0 In-Reply-To: <20170119111628.GC11176@leverpostej> References: <20170118132541.8989-1-fu.wei@linaro.org> <20170118132541.8989-14-fu.wei@linaro.org> <20170119111628.GC11176@leverpostej> From: Fu Wei Date: Thu, 19 Jan 2017 20:28:14 +0800 Message-ID: Subject: Re: [PATCH v20 13/17] acpi/arm64: Add GTDT table parse driver To: Mark Rutland 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On 19 January 2017 at 19:16, Mark Rutland wrote: > 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! Yes, we will keep this check :-) Thanks! > > If anything, it would be nicer for the other ACPI code to verify things > a little more stringently. > > Thanks, > Mark. -- Best regards, Fu Wei Software Engineer Red Hat