From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753730AbdBUUvc (ORCPT ); Tue, 21 Feb 2017 15:51:32 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:34053 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752100AbdBUUv0 (ORCPT ); Tue, 21 Feb 2017 15:51:26 -0500 Date: Tue, 21 Feb 2017 12:51:23 -0800 From: Stephen Hemminger To: Kees Cook Cc: Eddie Kovsky , Jessica Yu , Rusty Russell , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , LKML , "kernel-hardening@lists.openwall.com" Subject: Re: [PATCH v2 1/3] module: verify address is read-only Message-ID: <20170221125123.076be7e9@xeon-e3> In-Reply-To: References: <20170218055844.1457-1-ewk@edkovsky.org> <20170218055844.1457-2-ewk@edkovsky.org> <20170220091417.14b21484@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Feb 2017 12:32:16 -0800 Kees Cook wrote: > On Mon, Feb 20, 2017 at 9:14 AM, Stephen Hemminger > wrote: > > On Fri, 17 Feb 2017 21:58:42 -0800 > > "Eddie Kovsky" wrote: > > > >> Implement a mechanism to check if a module's address is in > >> the rodata or ro_after_init sections. It mimics the exsiting functions > >> that test if an address is inside a module's text section. > >> > >> Signed-off-by: Eddie Kovsky > > > > I don't see the point of this for many of the hyper-v functions. > > They are only called from a small number of places, and this can be validated > > by code inspection. Adding this seems just seems to be code bloat to me. > > I think it has value in that it effectively blocks any way for > non-ro_after_init structures from being passed into these functions. > Since there are so few callers now, it's the perfect place to add > this. > > -Kees > Maybe for a more used API, but for such a corner case it is code bloat.