Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1167384AbdDYHAy (ORCPT ); Tue, 25 Apr 2017 03:00:54 -0400 Received: from edison.jonmasters.org ([173.255.233.168]:60709 "EHLO edison.jonmasters.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165561AbdDYHAr (ORCPT ); Tue, 25 Apr 2017 03:00:47 -0400 To: Kees Cook , Jessica Yu References: <1492814127-66318-1-git-send-email-keescook@chromium.org> <1492814127-66318-3-git-send-email-keescook@chromium.org> Cc: Rusty Russell , "Peter Zijlstra (Intel)" , Josh Poimboeuf , Ard Biesheuvel , Heinrich Schuchardt , Nicholas Piggin , Chris Metcalf , linux-kernel@vger.kernel.org, Lucas De Marchi From: Jon Masters Organization: World Organi{s,z}ation Of Broken Dreams Message-ID: <161cb1b4-ccdc-fba1-c272-45b8ed261cb2@jonmasters.org> Date: Tue, 25 Apr 2017 03:00:42 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1492814127-66318-3-git-send-email-keescook@chromium.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 74.92.29.237 X-SA-Exim-Mail-From: jcm@jonmasters.org Subject: Re: [PATCH v2 2/2] module: Add module name to modinfo X-SA-Exim-Version: 4.2.1 (built Sun, 08 Nov 2009 07:31:22 +0000) X-SA-Exim-Scanned: Yes (on edison.jonmasters.org) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 617 Lines: 14 On 04/21/2017 06:35 PM, Kees Cook wrote: > Accessing the mod structure (e.g. for mod->name) prior to having completed > check_modstruct_version() can result in writing garbage to the error logs > if the layout of the mod structure loaded from disk doesn't match the > running kernel's mod structure layout. This kind of mismatch will become > much more likely if a kernel is built with different randomization seed > for the struct layout randomization plugin. > > Instead, add and use a new modinfo string for logging the module name. +Lucas - probably something that the modinfo kmod utility should track. Jon.