From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968968AbdADWbQ (ORCPT ); Wed, 4 Jan 2017 17:31:16 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:36701 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968907AbdADWbB (ORCPT ); Wed, 4 Jan 2017 17:31:01 -0500 MIME-Version: 1.0 In-Reply-To: <20170104085534.7c4d2b07@xeon-e3> References: <20161217010045.GA140343@beast> <1482254995.1984.20.camel@perches.com> <20170104085534.7c4d2b07@xeon-e3> From: Kees Cook Date: Wed, 4 Jan 2017 14:30:59 -0800 X-Google-Sender-Auth: QSo--j_vbkcB__5XIW9rIBWHenU Message-ID: Subject: Re: Designated initializers, struct randomization and addressing? To: Stephen Hemminger Cc: Julia Lawall , devel@driverdev.osuosl.org, Greg Kroah-Hartman , LKML , Bruno Faccini , Oleg Drokin , Vitaly Fertman , Joe Perches , Andreas Dilger , "John L. Hammond" , Bruce Korb , Emoly Liu 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, Jan 4, 2017 at 8:55 AM, Stephen Hemminger wrote: > On Tue, 3 Jan 2017 22:35:26 -0800 > Kees Cook wrote: > >> For randstruct and constify, the automatic selection is done on >> structures with only function pointers. (Additional structures can be >> added via a compiler attribute marking.) >> >> See is_pure_ops_struct(): > > Is there anyway to use this plugin to identify pure_ops structures not already marked as const? That's what the constify plugin does, yes. Though to deal with cases where something rarely written to, the pax_open_kernel/pax_close_kernel annotations are needed, which is why I don't have a sane port of the constify plugin yet. We need to build upstream-acceptable infrastructure for the write-rarely case. But, as Julia replied, yes, there's a huge list. :) -Kees -- Kees Cook Nexus Security