From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754183AbdEFHQN (ORCPT ); Sat, 6 May 2017 03:16:13 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:37489 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753652AbdEFHQE (ORCPT ); Sat, 6 May 2017 03:16:04 -0400 MIME-Version: 1.0 In-Reply-To: References: <20161217010127.GA140378@beast> From: Kees Cook Date: Sat, 6 May 2017 00:16:02 -0700 X-Google-Sender-Auth: aYMKiPCufe2vnLD0n0vByxavXdU Message-ID: Subject: Re: [PATCH] sgi-xp: use designated initializers To: Robin Holt Cc: LKML , Cliff Whickman 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 Wed, Mar 29, 2017 at 1:48 PM, Kees Cook wrote: > On Tue, Jan 3, 2017 at 3:19 PM, Kees Cook wrote: >> On Wed, Dec 21, 2016 at 8:24 AM, Robin Holt wrote: >>> On Fri, Dec 16, 2016 at 7:01 PM, Kees Cook wrote: >>>> Prepare to mark sensitive kernel structures for randomization by making >>>> sure they're using designated initializers. These were identified during >>>> allyesconfig builds of x86, arm, and arm64, with most initializer fixes >>>> extracted from grsecurity. >>> >>> I guess I don't understand the context enough here to give you a >>> Signed-off-by. Can you give us more background on this randomization? >> >> Sure thing! The randomization is on the order of function pointers in >> all-pointer structures (like struct xpc_interface). As long as the >> memory containing the structure isn't shared externally, this >> randomization should have no operational effect. The reason explicit >> no-op functions were added was to avoid ugly casts, etc. > > Friendly ping ... any chance this can land in -next soon? > >>> From what I see in the code here, I can see you are providing >>> equivalent functionality and I would give it a signed-off-by, but I am >>> not sure this randomization of which you speak is not going to cause >>> problems for XP, XPC, XPNET, and XPMEM (out of tree GPL kernel >>> module). >> >> Ah, hm, does this module share the structure without being built >> against the kernel? (If built with the kernel, the randomization >> plugin will keep things in the right order.) > > Regardless of your answer, this randomization can be turned off. > Switching to designated initializers here is mainly just a clean up. Any thoughts on this? I'd love to get this landed, and I'm happy to carry the patch myself, if it helps. Anyone able to Ack? Thanks! -Kees -- Kees Cook Pixel Security