lkml.org 
[lkml]   [2015]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v4 7/7] ACPI / x86: introduce acpi_os_readable() support
Date
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 <lv.zheng@intel.com> wrote:
> > From: Chen Yu <yu.c.chen@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

\
 
 \ /
  Last update: 2015-12-15 08:01    [W:0.113 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site