From: Kees Cook <keescook@chromium.org>
To: kernel-hardening@lists.openwall.com
Cc: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] randstruct: Disable randomization of ACPICA structs
Date: Mon, 19 Jun 2017 13:56:40 -0700 [thread overview]
Message-ID: <1497905801-69164-4-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1497905801-69164-1-git-send-email-keescook@chromium.org>
Since the ACPICA source is maintained externally to the kernel, we can
neither switch it to designated initializers nor mark it
__no_randomize_layout. Until ACPICA-upstream changes[1] land to handle the
designated initialization, explicitly skip it in the plugin.
[1] https://github.com/acpica/acpica/pull/248
Signed-off-by: Kees Cook <keescook@chromium.org>
---
scripts/gcc-plugins/randomize_layout_plugin.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c
index f777ead58ba8..e6e02a40d522 100644
--- a/scripts/gcc-plugins/randomize_layout_plugin.c
+++ b/scripts/gcc-plugins/randomize_layout_plugin.c
@@ -346,6 +346,10 @@ static int relayout_struct(tree type)
!strcmp((const char *)ORIG_TYPE_NAME(type), "RAWPCIFACTORY"))
return 0;
+ /* Skip ACPICA structs until refreshed with designated_init. */
+ if (!strcmp((const char *)ORIG_TYPE_NAME(type), "acpi_sleep_functions"))
+ return 0;
+
/* throw out any structs in uapi */
xloc = expand_location(DECL_SOURCE_LOCATION(TYPE_FIELDS(type)));
--
2.7.4
next prev parent reply other threads:[~2017-06-19 20:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 20:56 [PATCH v3 0/4] randstruct: Enable function pointer struct detection Kees Cook
2017-06-19 20:56 ` [PATCH 1/4] task_struct: Allow randomized layout Kees Cook
2018-03-26 11:52 ` Peter Zijlstra
2018-03-26 12:03 ` Peter Zijlstra
2018-03-26 17:43 ` Kees Cook
2017-06-19 20:56 ` [PATCH 2/4] randstruct: opt-out externally exposed function pointer structs Kees Cook
2017-06-19 20:56 ` Kees Cook [this message]
2017-06-20 6:56 ` [PATCH 3/4] randstruct: Disable randomization of ACPICA structs Christoph Hellwig
2017-06-20 19:25 ` Kees Cook
2017-06-20 20:35 ` Christoph Hellwig
2017-06-20 20:52 ` Rafael J. Wysocki
2017-06-20 21:34 ` Rafael J. Wysocki
2017-06-22 23:57 ` Kees Cook
2017-06-22 23:59 ` Rafael J. Wysocki
2017-06-23 0:20 ` Kees Cook
2017-06-19 20:56 ` [PATCH 4/4] randstruct: Enable function pointer struct detection Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497905801-69164-4-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®