|
Message-ID: <CAGXu5jJyoDiOeih5QMKYTSL+1Lg1yXFEJ38MLYrAnGMy5wRqQA@mail.gmail.com> Date: Sat, 15 Apr 2017 11:50:48 -0700 From: Kees Cook <keescook@...omium.org> To: Laura Abbott <labbott@...hat.com> Cc: "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, Michael Leibowitz <michael.leibowitz@...el.com> Subject: Re: [PATCH 00/18] Introduce struct layout randomization plugin On Thu, Apr 13, 2017 at 4:39 PM, Laura Abbott <labbott@...hat.com> wrote: > I gave this a quick spin on my aarch64 Rawhide machine. I needed to > change the following to work with gcc7 > > diff --git a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c > index a2d7e933c33f..8dd5134f161a 100644 > --- a/scripts/gcc-plugins/randomize_layout_plugin.c > +++ b/scripts/gcc-plugins/randomize_layout_plugin.c > @@ -529,8 +529,8 @@ static void randomize_layout_finish_decl(void *event_data, void *data) > > DECL_SIZE(decl) = 0; > DECL_SIZE_UNIT(decl) = 0; > - DECL_ALIGN(decl) = 0; > - DECL_MODE (decl) = VOIDmode; > + SET_DECL_ALIGN(decl, 0); > + SET_DECL_MODE(decl, VOIDmode); > SET_DECL_RTL(decl, 0); > update_decl_size(decl); > layout_decl(decl, 0); Very cool, thanks! I'll adjust the common header file to provide these macros for gcc pre-7 builds and update the series. > It boots but dies with a bunch of kernel faults somewhere after reaching > userspace. I'll pick up the debugging next week. I've been thinking about splitting up the structure marking patch into per-structure markings to make failure bisection easier. I assume there's a specific structure that is misbehaving on aarch64 (my first guess is always task_struct). -Kees -- Kees Cook Pixel Security
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.