From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764885AbcLTT4g (ORCPT ); Tue, 20 Dec 2016 14:56:36 -0500 Received: from mail-it0-f41.google.com ([209.85.214.41]:37037 "EHLO mail-it0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbcLTT4d (ORCPT ); Tue, 20 Dec 2016 14:56:33 -0500 MIME-Version: 1.0 In-Reply-To: <20161217005929.GA140260@beast> References: <20161217005929.GA140260@beast> From: Kees Cook Date: Tue, 20 Dec 2016 11:55:38 -0800 X-Google-Sender-Auth: UwpUxlzVmh0oLy5plWbd2k_Xh8Y Message-ID: Subject: Re: [PATCH] drm/ttm: use designated initializers To: Alexander Stein Cc: David Airlie , Gerd Hoffmann , Maling list - DRI developers , "virtualization@lists.linux-foundation.org" , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 18, 2016 at 10:53 PM, Alexander Stein 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