Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbdHGCvQ (ORCPT ); Sun, 6 Aug 2017 22:51:16 -0400 Received: from ozlabs.org ([103.22.144.67]:54049 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbdHGCvP (ORCPT ); Sun, 6 Aug 2017 22:51:15 -0400 From: Rusty Russell To: Matthew Garrett Cc: linux-kernel@vger.kernel.org, jeyu@kernel.org Subject: Re: [PATCH] Allow automatic kernel taint on unsigned module load to be disabled In-Reply-To: References: <20170804180751.14896-1-mjg59@google.com> <878tixxk2j.fsf@rustcorp.com.au> Date: Mon, 07 Aug 2017 12:19:28 +0930 Message-ID: <8760e0xfbb.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1336 Lines: 33 Matthew Garrett writes: > On Sat, Aug 5, 2017 at 11:54 PM, Rusty Russell wrote: >> Matthew Garrett writes: >>> Distributions may wish to provide kernels that permit loading of >>> unsigned modules based on certain policy decisions. >> >> Sorry, that's way too vague to accept this patch. >> >> So I'm guessing a binary module is behind this vagueness. If you want >> some other method than signing to vet modules, please do it in >> userspace. You can do arbitrary things that way... > > Binary modules will still be tainted by the license checker. The issue > is that if you want to enforce module signatures under *some* > circumstances, you need to build with CONFIG_MODULE_SIG Not at all! You can validate them in userspace. > but that > changes the behaviour of the kernel even when you're not enforcing > module signatures. The same kernel may be used in environments where > you can verify the kernel and environments where you can't, and in the > latter you may not care that modules are unsigned. In that scenario, > tainting doesn't buy you anything. With your patch, you don't get tainting in the environment where you can verify. You'd be better adding a sysctl or equiv. to turn off force loading, and use that in your can-verify system. Cheers, Rusty.