Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp952648ybl; Fri, 30 Aug 2019 09:29:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjpXZ6g+eBeAxTdS6tTMjaFYUbF1WX603RbEa2Wl4Jkup6L7YSNQ0GJHnzz94k69eV3+R0 X-Received: by 2002:a17:90a:ff04:: with SMTP id ce4mr16636685pjb.77.1567182577311; Fri, 30 Aug 2019 09:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567182577; cv=none; d=google.com; s=arc-20160816; b=GtwsmIOW0Ip2iouGBa+XeWjptUKmp7wA66cJ0o+A6UkTiNjmfSuhPOPWCZqU9dPZ1+ z7aRsGAtEl/yYk5womTBmaonFLR6MG7zMKwXRM87Vo9MiLxuaf3lQz3sOlctJwbul4x7 tD0nt1biMIel3cY356edsnbJGpeLQou4dqMIfiNZYXTyow8BIEIUUkHa52CKIh57q5LC gBVBCV+kx0CxsdgSIiGNxzA5uvmhlqkSYBzgn9269N4XlQRJNJs2xzjC1Cb1XytvlYNA HXXnUVGJS/k6ND3sqUrFlIhHi8JkiI1pSlCyUDGMVFMiAmJ2wGV0MtlKX9Q7nuzZ3ZZv 73Gg== 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=ZIar88THYMMvLJbYCYjQU4hCqbqS0m/JCk32SWOz/4k=; b=CX3SbBlMCd4VKxzuiYLqifDhcZGfGOnHgQ5vCndHLUzhKYEgOLUXShIT62qkdmUe7x 0c2vjItFLzedFxaXCSpDrOf1U2qWD+hmZfbJyn2sB/FZVeJlq2gTBwqbazx+n/JYl/To 6pGvjozGU8MNnGClVYvgwA+354JgqgeInB4UaO1r+HDRGKbZLyr/P1jVmvcWKJ4TqnQX uCq1EOUP+DKVFXESaHPCS2ZfiGnE6jejr2MVR67JbZD9zYNVCZpKLlepSwED8OixHSIm FP07HzbH2UTGG0AuWKz3p96jn81sTl+Hrt0Zr/95SNyrR0mWKf05nhyZZ7KieCoMat0k 5cvg== 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 i14si6670347pfq.287.2019.08.30.09.29.21; Fri, 30 Aug 2019 09:29:37 -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 S1728188AbfH3Q22 (ORCPT + 99 others); Fri, 30 Aug 2019 12:28:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37600 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727809AbfH3Q22 (ORCPT ); Fri, 30 Aug 2019 12:28:28 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80220882EA; Fri, 30 Aug 2019 16:28:28 +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 DB8CA60166; Fri, 30 Aug 2019 16:28:26 +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-4-matthewgarrett@google.com> References: <20190820001805.241928-4-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, Matthew Garrett , Kees Cook Subject: Re: [PATCH V40 03/29] security: Add a static lockdown policy LSM MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3439.1567182506.1@warthog.procyon.org.uk> Date: Fri, 30 Aug 2019 17:28:26 +0100 Message-ID: <3440.1567182506@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 30 Aug 2019 16:28:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Garrett wrote: > +static char *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = { const char *const maybe? > +static enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE, > + LOCKDOWN_INTEGRITY_MAX, > + LOCKDOWN_CONFIDENTIALITY_MAX}; > + const? Isn't this also a 1:1 mapping? > +static int lock_kernel_down(const char *where, enum lockdown_reason level) Is the last parameter the reason or the level? You're mixing the terms. David