Hi, Andy > -----Original Message----- > From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Tuesday, December 15, 2015 7:28 AM > To: Zheng, Lv > Cc: Wysocki, Rafael J; Brown, Len; Andy Lutomirski; Lv Zheng; linux- > ker...@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 <lv.zh...@intel.com> wrote: > > From: Chen Yu <yu.c.c...@intel.com> > > > > 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�����r��y����b�X��ǧv�^�){.n�+����{����zX����ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?�����&�)ߢf��^jǫy�m��@A�a��� 0��h���i