From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755519AbcC1XVI (ORCPT ); Mon, 28 Mar 2016 19:21:08 -0400 Received: from smtprelay0221.hostedemail.com ([216.40.44.221]:60115 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753317AbcC1XVG (ORCPT ); Mon, 28 Mar 2016 19:21:06 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2894:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3874:4250:4321:5007:6119:6742:7903:8957:10004:10400:10848:11232:11658:11914:12517:12519:12740:13069:13311:13357:13439:14659:14721:21080:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: wind06_255fd0292f803 X-Filterd-Recvd-Size: 2310 Message-ID: <1459207234.25110.31.camel@perches.com> Subject: Re: [PATCH v2 5/5] LSM: LoadPin for kernel file loading restrictions From: Joe Perches To: Kees Cook , James Morris Cc: "Serge E. Hallyn" , Andrew Morton , Kalle Valo , Mauro Carvalho Chehab , Guenter Roeck , Jiri Slaby , Paul Moore , Stephen Smalley , Mimi Zohar , Casey Schaufler , Andreas Gruenbacher , Andy Shevchenko , Rasmus Villemoes , Ulf Hansson , Vitaly Kuznetsov , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1459199662-16558-6-git-send-email-keescook@chromium.org> References: <1459199662-16558-1-git-send-email-keescook@chromium.org> <1459199662-16558-6-git-send-email-keescook@chromium.org> Content-Type: text/plain; charset="ISO-8859-1" Date: Mon, 28 Mar 2016 16:20:34 -0700 Mime-Version: 1.0 X-Mailer: Evolution 3.18.5.2-0ubuntu1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-03-28 at 14:14 -0700, Kees Cook wrote: > This LSM enforces that kernel-loaded files (modules, firmware, etc) > must all come from the same filesystem, with the expectation that > such a filesystem is backed by a read-only device such as dm-verity > or CDROM. This allows systems that have a verified and/or unchangeable > filesystem to enforce module and firmware loading restrictions without > needing to sign the files individually. trivia: > diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c [] > +#define pr_fmt(fmt) "LoadPin: " fmt Using #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt would be a lot more common. Is there some reason the logging messages should be prefixed with "LoadPin: " instead of "loadpin: "?