From patchwork Sun Sep 16 00:30:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10601627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4046414DB for ; Sun, 16 Sep 2018 00:32:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FA032A647 for ; Sun, 16 Sep 2018 00:32:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 238202A649; Sun, 16 Sep 2018 00:32:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8E172A647 for ; Sun, 16 Sep 2018 00:32:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbeIPFxH (ORCPT ); Sun, 16 Sep 2018 01:53:07 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:44732 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728159AbeIPFwH (ORCPT ); Sun, 16 Sep 2018 01:52:07 -0400 Received: by mail-pl1-f196.google.com with SMTP id ba4-v6so5783025plb.11 for ; Sat, 15 Sep 2018 17:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=b0Z1CYwKLnLjlLuTRAvVqGb4C3/ai0Sv79Sf+0Od5TU=; b=FG2tj/TLjj08QzPFUMh+IrjNW2vaWgk1rc4ucne41pTb5ALMdVqOtR0xwQapDuzsrQ CKhlh3UdY6GWxqvwhrI1zsaY1fh0M9EWJL5JiDmvjdn0LwqgjwWSBDMG/GtejC3S2xla zbkJyHD1im5YZFYyfSxt9z6bEnajjJ0pOunQc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=b0Z1CYwKLnLjlLuTRAvVqGb4C3/ai0Sv79Sf+0Od5TU=; b=GHxVakxrEzIJeuPJvAShcXMZz0RrKAgzFbhccVLgIm8wLmD6y36p5cM7VgWNBtndGX 2jrVRdFxlCSPSig/wzdOz8T59TCsar+t8DdsVLQhBfbeAsKH0z6WeJ/kEZE/3/bKtP1E 7Nx5KVOFI2+jqr/cpLNXYnxgdCL5SfHZFhyr50/Udwjzy5yf0ux+9RkDqx/HKAdKCgjC gaswo1noaRLIqyhZtW/K7q57K0FjLeEJNXnjIVKSHEOJtVF6F0VeRZHbHEtu18MIJvMX ID53YWBSMRZ1YAZGAj9aLtU/LodJoHmtk9uK2N6VXBHOU6oy77nfGfUkYUGIlohqufm5 /wUQ== X-Gm-Message-State: APzg51DP6dvwLnW6cnrW7d9zVTuIgRcFDn4oOSb/QF8bkc8KYYcleCVc q9YPyJkkdren/HkIDskk6OhqOw== X-Google-Smtp-Source: ANB0VdbdA+vOkq09PGWOLzclADc4ZMf1SBNlH4qbG+Ru7y7AiMoiNCVtFQO6hKfWoxjz/9mJrgx4BQ== X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr18129539plp.14.1537057871185; Sat, 15 Sep 2018 17:31:11 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id h132-v6sm15349764pfc.100.2018.09.15.17.31.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Sep 2018 17:31:08 -0700 (PDT) From: Kees Cook To: James Morris Cc: Kees Cook , Casey Schaufler , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , LKLM Subject: [PATCH 08/18] integrity: Initialize as LSM_TYPE_MINOR Date: Sat, 15 Sep 2018 17:30:49 -0700 Message-Id: <20180916003059.1046-9-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180916003059.1046-1-keescook@chromium.org> References: <20180916003059.1046-1-keescook@chromium.org> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The integrity LSM isn't really an LSM in that it never calls security_add_hooks(), but it uses the early security init because its hooks need to run before the VFS layer initializes. This is the very definition of a non-exclusive LSM, so mark it as such. Signed-off-by: Kees Cook --- security/integrity/iint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/security/integrity/iint.c b/security/integrity/iint.c index 20e60df929a3..d886183848c4 100644 --- a/security/integrity/iint.c +++ b/security/integrity/iint.c @@ -176,6 +176,7 @@ static int __init integrity_iintcache_init(void) return 0; } DEFINE_LSM(integrity) + .type = LSM_TYPE_MINOR, .init = integrity_iintcache_init, END_LSM;