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


Groups > linux.kernel > #1545450

Re: [PATCH] drm/ttm: use designated initializers

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH] drm/ttm: use designated initializers
Date 2016-12-20 21:00 +0100
Message-ID <sQyJQ-1tz-15@gated-at.bofh.it> (permalink)
References <sPbFF-2GI-75@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Dec 18, 2016 at 10:53 PM, Alexander Stein
<alexander.stein@systec-electronic.com> wrote:
> Hello Kees,
>
> While understanding what your patches (I've seen the other ones as well) do
> themself, I still don't get what your intention is, e.g. why you need this?
> Apart from a better readability.
>
> On Friday 16 December 2016 16:59:29, Kees Cook wrote:
>> Prepare to mark sensitive kernel structures for randomization by making
>> sure they're using designated initializers.
>
> Can you please elaborate what you mean with that sentence?

Hi! Sure: the coming (and optional) gcc plugin "randstruct" performs
structure layout randomization, which means that static initializers
cannot be "ordered" (they must be "designated"), since the place were
layout randomization occurs happens separate from how static
initializers are applied.

This change from ordered to designated is just to help the compiler do
the right thing.

-Kees

-- 
Kees Cook
Nexus Security

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


Thread

[PATCH] drm/ttm: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-17 02:10 +0100
  Re: [PATCH] drm/ttm: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-20 21:00 +0100

csiph-web