Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp957663ybl; Fri, 30 Aug 2019 09:33:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkcR0zkM2ipe1pJ4QhHO5gaGfl+OZxrtxgnJ0lG28CV5Fbwo3ZwawlUcGdPKTQiZQSU+Ii X-Received: by 2002:a17:90a:be02:: with SMTP id a2mr16558668pjs.94.1567182825688; Fri, 30 Aug 2019 09:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567182825; cv=none; d=google.com; s=arc-20160816; b=xSabiz9PbbMjRI4Jr2WU844hfxbupQFZAeGdLgPFwdtURUUpTC1ncPD9wOWnbBdamC 8Jnl4Wkc/s/ulqkBoqzWhFhGJ9zpEpxomEKg9to7n7vcWd3Z8VyH1w/paxWqS+HEEax3 Ls6YI5OCG9Fbf+K46+bwQ+V9D7s7YyxvgyAtFcXQhDs5627SYU6l8Ohzke7iXVMqHMQQ sdth+Wr8aVtr5+oSLBG0XPY79WjmEVrh+MqdhQq1wBi9oa8Z3paTNBwH4aUc58QBwFKV HTHdjS9RL6Jtguk/HjA+UWKZrvI70bryqu3ruVHqlLJ4+kXZbKdn83UXyyagBMIZL+A8 /g/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=b8DqT0dlLYnanmpuozXTAoATfMukwSIv06EmsupW3JU=; b=Z/sB33WBD1N/8wMisYxpUT5Ao3QuB3vt3iEaARKJM0OoBG2zm3kEc7gRnX18v1Emb2 NuyBTLFY9QyLJoKAm9HEH/VZuPt/kN36VwnuzpzJLoN9QnLGZ45UD3A30fPm0+VZccSq A16czGWQFXEiwk+TwgeZu8sM3ImkZI3NB05E+0XPMyFRnlAD81GLwexRfnhQYAJooKfL /LejsJ/08Musws96btR7zU4phdFVol2A4iAIlo4nIoAgm1l90jzDLRJxB8rfy+O6PpTk DqwKPqNzZ5Qwo1k7eHzbM/gcy3fKx10SuI7JGZ2dBBHfAbsauWiXdVaPHF8eOxnvMBVV XV0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v24si4835553pgn.64.2019.08.30.09.33.30; Fri, 30 Aug 2019 09:33:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728007AbfH3QbQ (ORCPT + 99 others); Fri, 30 Aug 2019 12:31:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34626 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbfH3QbQ (ORCPT ); Fri, 30 Aug 2019 12:31:16 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1C3F1189DAD6; Fri, 30 Aug 2019 16:31:16 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-255.rdu2.redhat.com [10.10.120.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9608E10021B2; Fri, 30 Aug 2019 16:31:14 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20190820001805.241928-5-matthewgarrett@google.com> References: <20190820001805.241928-5-matthewgarrett@google.com> <20190820001805.241928-1-matthewgarrett@google.com> To: Matthew Garrett Cc: dhowells@redhat.com, jmorris@namei.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Kees Cook , Jessica Yu Subject: Re: [PATCH V40 04/29] lockdown: Enforce module signatures if the kernel is locked down MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3637.1567182673.1@warthog.procyon.org.uk> Date: Fri, 30 Aug 2019 17:31:13 +0100 Message-ID: <3638.1567182673@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Fri, 30 Aug 2019 16:31:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Garrett wrote: > enum lockdown_reason { > LOCKDOWN_NONE, > + LOCKDOWN_MODULE_SIGNATURE, > LOCKDOWN_INTEGRITY_MAX, > LOCKDOWN_CONFIDENTIALITY_MAX, > }; Aren't you mixing disjoint sets? > + [LOCKDOWN_MODULE_SIGNATURE] = "unsigned module loading", Wouldn't it be better to pass this string as a parameter to security_locked_down()? David