Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932859AbbLNX2l (ORCPT ); Mon, 14 Dec 2015 18:28:41 -0500 Received: from mail-ob0-f177.google.com ([209.85.214.177]:34106 "EHLO mail-ob0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932453AbbLNX2j (ORCPT ); Mon, 14 Dec 2015 18:28:39 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Andy Lutomirski Date: Mon, 14 Dec 2015 15:28:19 -0800 Message-ID: Subject: Re: [PATCH v4 7/7] ACPI / x86: introduce acpi_os_readable() support To: Lv Zheng Cc: "Rafael J. Wysocki" , Len Brown , Andy Lutomirski , Lv Zheng , "linux-kernel@vger.kernel.org" , Linux ACPI , Chen Yu Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2561 Lines: 65 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. > > Signed-off-by: Chen Yu > Tested-by: Lv Zheng > Signed-off-by: Lv Zheng > --- > arch/x86/Kconfig | 1 + > arch/x86/include/asm/acenv.h | 1 + > arch/x86/kernel/acpi/boot.c | 44 +++++++++++++++++++++++++++++++++++++ > drivers/acpi/Kconfig | 3 +++ > drivers/acpi/osl.c | 12 ++++++++++ > include/acpi/platform/aclinux.h | 1 - > include/acpi/platform/aclinuxex.h | 5 ----- > 7 files changed, 61 insertions(+), 6 deletions(-) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index db3622f..6593b6a 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -19,6 +19,7 @@ config X86 > def_bool y > select ACPI_LEGACY_TABLES_LOOKUP if ACPI > select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI > + select ACPI_MEMORY_ACCESS_CHECK_SUPPORT if ACPI > select ANON_INODES > select ARCH_CLOCKSOURCE_DATA > select ARCH_DISCARD_MEMBLOCK > diff --git a/arch/x86/include/asm/acenv.h b/arch/x86/include/asm/acenv.h > index 1b010a8..a2a2849 100644 > --- a/arch/x86/include/asm/acenv.h > +++ b/arch/x86/include/asm/acenv.h > @@ -20,6 +20,7 @@ > > int __acpi_acquire_global_lock(unsigned int *lock); > int __acpi_release_global_lock(unsigned int *lock); > +bool __acpi_memory_readable(void *pointer, size_t length); > > #define ACPI_ACQUIRE_GLOBAL_LOCK(facs, Acq) \ > ((Acq) = __acpi_acquire_global_lock(&facs->global_lock)) > diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c > index e759076..4a5e22e 100644 > --- a/arch/x86/kernel/acpi/boot.c > +++ b/arch/x86/kernel/acpi/boot.c > @@ -1699,6 +1699,50 @@ int __acpi_release_global_lock(unsigned int *lock) > return old & 0x1; > } > > +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? --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/