Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426404AbdDUWfg (ORCPT ); Fri, 21 Apr 2017 18:35:36 -0400 Received: from mail-it0-f45.google.com ([209.85.214.45]:35802 "EHLO mail-it0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1042732AbdDUWfb (ORCPT ); Fri, 21 Apr 2017 18:35:31 -0400 From: Kees Cook To: Jessica Yu Cc: Kees Cook , Rusty Russell , "Peter Zijlstra (Intel)" , Josh Poimboeuf , Ard Biesheuvel , Heinrich Schuchardt , Nicholas Piggin , Chris Metcalf , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] module: Add module name to modinfo Date: Fri, 21 Apr 2017 15:35:25 -0700 Message-Id: <1492814127-66318-1-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 348 Lines: 9 The mod structure is accessed for the "name" field prior to validating sanity in check_modstruct_version(). This becomes very obvious once struct layout randomization is happening, so instead add the module name to modinfo and use that until the mod struct has been sanity-checked. -Kees v2: - adjusted for more odd name load failure cases; jeyu