Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678316
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin |
| Date | 2017-06-30 02:10 +0200 |
| Message-ID | <tXRFx-6oX-29@gated-at.bofh.it> (permalink) |
| References | <tLyyB-4R7-3@gated-at.bofh.it> <tLyyB-4R7-5@gated-at.bofh.it> <tXPNn-5cQ-13@gated-at.bofh.it> <tXQzM-5ww-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jun 29, 2017 at 3:53 PM, Kees Cook <keescook@chromium.org> wrote:
> I see a few possible solutions:
Or this ugly hack:
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e2ad3531e7fe..5d131f9f1dac 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -749,6 +749,19 @@ struct task_struct {
/* Namespaces: */
struct nsproxy *nsproxy;
+#ifdef CONFIG_ARM
+ /*
+ * Since task_struct is gigantic, some asmoffset locations
+ * (e.g. TSK_STACK_CANARY) for a randomized field may exceed
+ * an architecture's instruction immediate values. As a
+ * work-around to avoid changing the performance characteristics
+ * of the assembly, split the randomization into two groups,
+ * keeping the "early" fields within range of the immediates.
+ */
+ randomized_struct_fields_end
+ randomized_struct_fields_start
+#endif
+
/* Signal handlers: */
struct signal_struct *signal;
struct sighand_struct *sighand;
I suspect updating the ARM assembly (CONFIG-conditionally) to accept
>4095 offsets is probably the best solution.
-Kees
--
Kees Cook
Pixel Security
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Arnd Bergmann <arnd@arndb.de> - 2017-06-30 00:10 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Kees Cook <keescook@chromium.org> - 2017-06-30 01:00 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Kees Cook <keescook@chromium.org> - 2017-06-30 02:10 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Arnd Bergmann <arnd@arndb.de> - 2017-06-30 09:40 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-30 10:00 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Arnd Bergmann <arnd@arndb.de> - 2017-06-30 10:30 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Kees Cook <keescook@chromium.org> - 2017-06-30 16:50 +0200
Re: [PATCH v2 04/20] gcc-plugins: Add the randstruct plugin Arnd Bergmann <arnd@arndb.de> - 2017-06-30 17:30 +0200
csiph-web