Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550454

Re: Designated initializers, struct randomization and addressing?

From Julia Lawall <julia.lawall@lip6.fr>
Newsgroups linux.kernel
Subject Re: Designated initializers, struct randomization and addressing?
Date 2017-01-04 07:30 +0100
Message-ID <sVNfb-OR-1@gated-at.bofh.it> (permalink)
References <sPbFF-2GI-81@gated-at.bofh.it> <sQwym-89-19@gated-at.bofh.it> <sVH05-4YR-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Tue, 3 Jan 2017, Kees Cook wrote:

> On Tue, Dec 20, 2016 at 9:29 AM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2016-12-16 at 17:00 -0800, Kees Cook wrote:
> >> Prepare to mark sensitive kernel structures for randomization by making
> > sure they're using designated initializers.
> >
> > About the designated initializer patches,
> > which by themselves are fine of course,
> > and the fundamental randomization plugin,
> > c guarantees that struct member ordering
> > is as specified.
> >
> > how is the code to be verified so that
> > any use of things like offsetof and any
> > address/indexing is not impacted?
>
> AIUI, offsetof() works correctly in the face of this plugin, since the
> ordering happens before the pass that handles offsetof(). Anything
> that _does not_ use offsetof(), however, needs fixing. Based on the
> work done in grsecurity, I don't see any added offsetof() uses that
> are specific to the randomization plugin.
>
> (Note that the randomization plugin is only on function pointer
> structures, where using an offsetof() should be rare to none, and on
> hand-selected structures, where missing offsetof() should be easy to
> audit.)

What is the precise definition of "function pointer structures"?  Only
function pointers?  At least one function pointer?

thanks,
julia

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: lustre: ldlm: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-17 02:10 +0100
  Re: [PATCH] staging: lustre: ldlm: use designated initializers James Simmons <jsimmons@infradead.org> - 2016-12-19 17:30 +0100
    Re: [PATCH] staging: lustre: ldlm: use designated initializers Bruce Korb <bruce.korb@gmail.com> - 2016-12-19 17:50 +0100
      Re: [PATCH] staging: lustre: ldlm: use designated initializers James Simmons <jsimmons@infradead.org> - 2016-12-19 18:20 +0100
      Re: [PATCH] staging: lustre: ldlm: use designated initializers Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-20 08:20 +0100
        RE: [PATCH] staging: lustre: ldlm: use designated initializers "Hammond, John" <john.hammond@intel.com> - 2016-12-20 16:00 +0100
          Re: [PATCH] staging: lustre: ldlm: use designated initializers Bruce Korb <bruce.korb@gmail.com> - 2016-12-20 17:50 +0100
            Re: [PATCH] staging: lustre: ldlm: use designated initializers Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-20 20:00 +0100
          Re: [PATCH] staging: lustre: ldlm: use designated initializers Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-20 20:20 +0100
            Re: [PATCH] staging: lustre: ldlm: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-20 20:50 +0100
    Re: [PATCH] staging: lustre: ldlm: use designated initializers Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-20 11:50 +0100
  Designated initializers, struct randomization and addressing? Joe Perches <joe@perches.com> - 2016-12-20 18:40 +0100
    Re: Designated initializers, struct randomization and addressing? Kees Cook <keescook@chromium.org> - 2017-01-04 00:50 +0100
      Re: Designated initializers, struct randomization and addressing? Bruce Korb <bruce.korb@gmail.com> - 2017-01-04 01:00 +0100
        Re: Designated initializers, struct randomization and addressing? Kees Cook <keescook@chromium.org> - 2017-01-04 01:20 +0100
      Re: Designated initializers, struct randomization and addressing? Julia Lawall <julia.lawall@lip6.fr> - 2017-01-04 07:30 +0100
        Re: Designated initializers, struct randomization and addressing? Kees Cook <keescook@chromium.org> - 2017-01-04 07:40 +0100
          Re: Designated initializers, struct randomization and addressing? Stephen Hemminger <stephen@networkplumber.org> - 2017-01-04 18:00 +0100
            Re: Designated initializers, struct randomization and addressing? Julia Lawall <julia.lawall@lip6.fr> - 2017-01-04 18:40 +0100
            Re: Designated initializers, struct randomization and addressing? Kees Cook <keescook@chromium.org> - 2017-01-04 23:40 +0100

csiph-web