Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543902 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2016-12-17 02:10 +0100 |
| Last post | 2016-12-19 07:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] ACPICA: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-17 02:10 +0100
Re: [PATCH] ACPICA: use designated initializers "Rafael J. Wysocki" <rafael@kernel.org> - 2016-12-17 03:20 +0100
RE: [PATCH] ACPICA: use designated initializers "Zheng, Lv" <lv.zheng@intel.com> - 2016-12-19 07:10 +0100
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-12-17 02:10 +0100 |
| Subject | [PATCH] ACPICA: use designated initializers |
| Message-ID | <sPbFF-2GI-89@gated-at.bofh.it> |
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.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
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
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-12-17 03:20 +0100 |
| Message-ID | <sPcLn-3kp-3@gated-at.bofh.it> |
| In reply to | #1543902 |
On Sat, Dec 17, 2016 at 2:04 AM, Kees Cook <keescook@chromium.org> wrote:
> 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.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> 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 }
> };
>
> /*
> --
The problem here is like in the other patch sent earlier today. If we
change that here, it will diverge from the upstream file it has been
generated from.
Thanks,
Rafael
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-12-19 07:10 +0100 |
| Message-ID | <sPZj4-42w-3@gated-at.bofh.it> |
| In reply to | #1543902 |
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 <keescook@chromium.org>
> ---
> 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web