From patchwork Thu Feb 28 22:43:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Casey Schaufler X-Patchwork-Id: 10834099 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 CF1721399 for ; Thu, 28 Feb 2019 22:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C163528EAB for ; Thu, 28 Feb 2019 22:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5D86290BB; Thu, 28 Feb 2019 22:44:10 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable 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 6FE4129192 for ; Thu, 28 Feb 2019 22:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726088AbfB1WoJ (ORCPT ); Thu, 28 Feb 2019 17:44:09 -0500 Received: from sonic307-10.consmr.mail.bf2.yahoo.com ([74.6.134.49]:34964 "EHLO sonic307-10.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727468AbfB1WoJ (ORCPT ); Thu, 28 Feb 2019 17:44:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1551393848; bh=eJSihQlHJC7zAJUsB7t9oIkvmwu96BhjijJbgq/9xEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject; b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ZrRaxXV 5_xNp3.HxPK_MLhYjWRrAP4VS3h6xO4zw0I9pMFrRTA_nMPRY6cFBpUL9hyRA5SPk0DWBbzOG1n5 4s8hbryRxAUA5w1qc1R6K64XW14vZSFebKG7PG6sTkNFVLiJ8lOaFP_kcSE8cDVUF29rwavBgKMo krd7wGS3SE1EGw4AklmdFTIYwQlioY5Yu3VgEbvbV4oUawfM.tyeiR8dlg6dpUYnwQH.2Suq6QOS lCZQncRIkDcRl2H6bcIE.qa.dGqCTFPQXdnSBhma4kYYM.AYJS0ugIrxtFpgdne3Wy2jgrnH.4DQ 2wP3SrgFjz3vT8f82diwPpIglhc3KNj2KkBcUYlf.uJDzTybKtHPcEIyMgqwys6QqiKY3WhCNqGO 7Zl7Gt6whq1StHu.9UfedkVfP6HqjPv.lF57qYUb.bKUhmEM5tj.WXOJU Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.bf2.yahoo.com with HTTP; Thu, 28 Feb 2019 22:44:08 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO localhost.localdomain) ([67.169.65.224]) by smtp428.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 731ec5e129ec3fdeedd3a533970a7e62; Thu, 28 Feb 2019 22:44:06 +0000 (UTC) From: Casey Schaufler To: jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Cc: keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, paul@paul-moore.com Subject: [PATCH 72/97] LSM: Add secmark refcounting to call_one list - part 2 Date: Thu, 28 Feb 2019 14:43:31 -0800 Message-Id: <20190228224356.2608-3-casey@schaufler-ca.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190228224356.2608-1-casey@schaufler-ca.com> References: <20190228224356.2608-1-casey@schaufler-ca.com> Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Add secmark_refcount_dec and secmark_refcount_inc to the LSM hooks for which only the designated module is called. Signed-off-by: Casey Schaufler --- security/security.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/security/security.c b/security/security.c index af3f6a89ee88..fc446af4c3bf 100644 --- a/security/security.c +++ b/security/security.c @@ -2125,6 +2125,8 @@ int security_setprocattr(const char *lsm, const char *name, void *value, loh->secctx_to_secid = secctx_to_secid; loh->socket_getpeersec_stream = socket_getpeersec_stream; loh->secmark_relabel_packet = secmark_relabel_packet; + loh->secmark_refcount_inc = secmark_refcount_inc; + loh->secmark_refcount_dec = secmark_refcount_dec; return size; }