Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541AbcLSGG1 convert rfc822-to-8bit (ORCPT ); Mon, 19 Dec 2016 01:06:27 -0500 Received: from mga03.intel.com ([134.134.136.65]:46388 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920AbcLSGGZ (ORCPT ); Mon, 19 Dec 2016 01:06:25 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,372,1477983600"; d="scan'208";a="204373658" From: "Zheng, Lv" To: Kees Cook , "linux-kernel@vger.kernel.org" CC: "Moore, Robert" , "Wysocki, Rafael J" , Len Brown , "linux-acpi@vger.kernel.org" , "devel@acpica.org" Subject: RE: [PATCH] ACPICA: use designated initializers Thread-Topic: [PATCH] ACPICA: use designated initializers Thread-Index: AQHSWAGFqfEY6GyS/U6s6HA4MT6paKEOy+QA Date: Mon, 19 Dec 2016 06:06:21 +0000 Message-ID: <1AE640813FDE7649BE1B193DEA596E886CDFF348@SHSMSX101.ccr.corp.intel.com> References: <20161217010425.GA140581@beast> In-Reply-To: <20161217010425.GA140581@beast> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGI4Yjk0MzItZTJlYi00NmQ0LTk5ZWEtY2FkMjVmYTYxN2RhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ikc4YVlwRVpKOHZXNnB3b3l5YlBYV3B0T0RUcU5PN1dLVHd2VXdjQWZMYUU9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1771 Lines: 51 Hi, > From: Kees Cook [mailto:keescook@chromium.org] > Subject: [PATCH] ACPICA: use designated initializers > > Prepare to mark sensitive kernel structures for randomization by making > sure they're using designated initializers. These were identified during > allyesconfig builds of x86, arm, and arm64, with most initializer fixes > extracted from grsecurity. This commit is not suitable for ACPICA upstream. It's not portable. Please drop. Thanks Lv > > Signed-off-by: Kees Cook > --- > drivers/acpi/acpica/hwxfsleep.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c > index f76e0eab32b8..25cd5c66e102 100644 > --- a/drivers/acpi/acpica/hwxfsleep.c > +++ b/drivers/acpi/acpica/hwxfsleep.c > @@ -70,11 +70,12 @@ static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id); > /* Legacy functions are optional, based upon ACPI_REDUCED_HARDWARE */ > > static struct acpi_sleep_functions acpi_sleep_dispatch[] = { > - {ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_sleep), > - acpi_hw_extended_sleep}, > - {ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake_prep), > - acpi_hw_extended_wake_prep}, > - {ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake), acpi_hw_extended_wake} > + { .legacy_function = ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_sleep), > + .extended_function = acpi_hw_extended_sleep }, > + { .legacy_function = ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake_prep), > + .extended_function = acpi_hw_extended_wake_prep }, > + { .legacy_function = ACPI_HW_OPTIONAL_FUNCTION(acpi_hw_legacy_wake), > + .extended_function = acpi_hw_extended_wake } > }; > > /* > -- > 2.7.4 > > > -- > Kees Cook > Nexus Security