From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362Ab3AGBlw (ORCPT ); Sun, 6 Jan 2013 20:41:52 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:44054 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664Ab3AGBls (ORCPT ); Sun, 6 Jan 2013 20:41:48 -0500 MIME-Version: 1.0 Reply-To: mtk.manpages@gmail.com In-Reply-To: References: <1348179300-11653-1-git-send-email-keescook@chromium.org> <50749DE8.7010703@zytor.com> <5074A0AB.8040207@zytor.com> <87d30o7iy6.fsf@rustcorp.com.au> <87ipa8o4mn.fsf@rustcorp.com.au> <87sj97hs5e.fsf@rustcorp.com.au> <87fw2j5dlj.fsf@rustcorp.com.au> From: "Michael Kerrisk (man-pages)" Date: Mon, 7 Jan 2013 02:41:27 +0100 Message-ID: Subject: Re: [PATCH 1/4] module: add syscall to load module from fd To: Kees Cook Cc: Rusty Russell , "H. Peter Anvin" , LKML , Lucas De Marchi , jonathon@jonmasters.org, linux-man@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 6, 2013 at 9:24 PM, Kees Cook wrote: > On Sun, Jan 6, 2013 at 11:59 AM, Michael Kerrisk (man-pages) > wrote: >> Hi Rusty, (and Lucas, and Kees) >> >> On Thu, Jan 3, 2013 at 1:12 AM, Rusty Russell wrote: >>> Michael Kerrisk writes: >>>> Hi Rusty, >>> >>> Hi Michael, >>> >>>> The description here is rather thin. Could you supply a sentence or >>>> two for each of MODULE_INIT_IGNORE_MODVERSIONS and >>>> MODULE_INIT_IGNORE_VERMAGIC that would be suitable for the manual >>>> page? >>>> >>>> Thanks, >>> >>> There are one or two safety checks built into a module, which are >>> checked to match the kernel on module load. The first is a "vermagic" >>> string containing the kernel version number and prominent features (such >>> as CPU type). If the module was built with CONFIG_MODVERSIONS set, a >>> version hash is recorded for each symbol the module uses based on the >>> types it refers to: in this case, the kernel version number within the >>> "vermagic" string is ignored, as the symbol version hashes are assumed >>> to be sufficiently reliable. >>> >>> Using the MODULE_INIT_IGNORE_VERMAGIC flag indicates that the vermagic >>> is to be ignored, and the MODULE_INIT_IGNORE_MODVERSIONS flag indicates >>> that the version hashes are to be ignored. If the kernel is built to >>> permit such forced loading (ie. CONFIG_MODULE_FORCE_LOAD is set) then >>> loading will continue, otherwise it will fail with ENOEXEC as expected >>> for malformed modules. >>> >>> Hope that is more usable? >> >> Yes, that helps. I did some reworking of that text. Hopefully, I did >> not introduce any errors. >> >> Below is the text that is proposed to document finit_module() in the >> man pages. I'd appreciate any review (Kees, Lucas, Rusty?) > > Looks good to me! > > Reviewed-by: Kees Cook Thanks Kees! -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/