Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbbLOGNb (ORCPT ); Tue, 15 Dec 2015 01:13:31 -0500 Received: from mga03.intel.com ([134.134.136.65]:9027 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753073AbbLOGN2 (ORCPT ); Tue, 15 Dec 2015 01:13:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,430,1444719600"; d="scan'208";a="707661347" From: "Chen, Yu C" To: Andy Lutomirski , "Zheng, Lv" CC: "Wysocki, Rafael J" , "Brown, Len" , Andy Lutomirski , Lv Zheng , "linux-kernel@vger.kernel.org" , Linux ACPI Subject: RE: [PATCH v4 7/7] ACPI / x86: introduce acpi_os_readable() support Thread-Topic: [PATCH v4 7/7] ACPI / x86: introduce acpi_os_readable() support Thread-Index: AQHRLXRnRL/kuZhBvUWr+aZgefsuPJ7KrTWAgADxgKA= Date: Tue, 15 Dec 2015 06:13:19 +0000 Message-ID: <36DF59CE26D8EE47B0655C516E9CE64028686D35@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjkwZDk2ZDAtZmRhMi00MTRlLTg4NzYtZDE5NjM4ZjYzZjE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoia0tkNWJ0alpzSU10SW9WWlhKZjB0d3VPN1lyNFFENTMyXC9sWTB5K1hzZkE9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tBF6Ddae031432 Content-Length: 1556 Lines: 39 Hi, Andy > -----Original Message----- > From: Andy Lutomirski [mailto:luto@amacapital.net] > Sent: Tuesday, December 15, 2015 7:28 AM > To: Zheng, Lv > Cc: Wysocki, Rafael J; Brown, Len; Andy Lutomirski; Lv Zheng; linux- > kernel@vger.kernel.org; Linux ACPI; Chen, Yu C > Subject: Re: [PATCH v4 7/7] ACPI / x86: introduce acpi_os_readable() support > > On Wed, Dec 2, 2015 at 6:43 PM, Lv Zheng wrote: > > From: Chen Yu > > > > This patch implements acpi_os_readable(). The function is used by > > ACPICA AML debugger to validate user specified pointers for dumping > > the memory as ACPICA descriptor objects. > > [cut] > > > > +bool __acpi_memory_readable(void *pointer, size_t length) { > > + unsigned long obj_start, obj_end; > > + unsigned long start_pfn, end_pfn; > > What does "readable" mean in this context? 'readable' means : the address provided by the user, is a dynamically allocated virtual address - because the acpi address space are allocated by 'kmalloc', acpi debugger must check if this address is a valid 'kmalloc' address before accessing it. This function does the sanity check that, the vitual address is a: 1. dynamically allocated address (beyond PAGE_OFFSET , but lower than high_memory, VMALLOC_START, eg) 2. besides, the physical address must be direct-mapped(so it would not be a hole). Thanks, yu ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?