From patchwork Fri Feb 17 08:38:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Georget X-Patchwork-Id: 9579233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08D42600C5 for ; Fri, 17 Feb 2017 08:49:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2EA328672 for ; Fri, 17 Feb 2017 08:49:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E61C52868F; Fri, 17 Feb 2017 08:49:23 +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,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 E931728672 for ; Fri, 17 Feb 2017 08:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755835AbdBQItW (ORCPT ); Fri, 17 Feb 2017 03:49:22 -0500 Received: from lgeorget.eu ([178.170.116.192]:38341 "EHLO lgeorget.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbdBQItV (ORCPT ); Fri, 17 Feb 2017 03:49:21 -0500 X-Greylist: delayed 597 seconds by postgrey-1.27 at vger.kernel.org; Fri, 17 Feb 2017 03:49:21 EST Received: from localhost (unknown [193.54.192.15]) by lgeorget.eu (Postfix) with ESMTPSA id E05E56BE68; Fri, 17 Feb 2017 09:39:20 +0100 (CET) From: Laurent Georget To: linux-security-module@vger.kernel.org Cc: Chris Wright , Laurent Georget Subject: [PATCH] LSM: Document the d_instantiate LSM hook Date: Fri, 17 Feb 2017 09:38:57 +0100 Message-Id: <20170217083857.14207-1-laurent.georget@supelec.fr> X-Mailer: git-send-email 2.11.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Georget --- Hi everybody, this is a simple documentation patch for lsm_hooks.h to add a comment about the d_instantiate hook. I also noted that sb_kern_mount has no documentation despite an e-mail on the topic back in 2004 (http://lists.jammed.com/linux-security-module/2004/01/0011.html). Is that normal? Cheers, Laurent Georget include/linux/lsm_hooks.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index 558adfa5c8a8..d8900f758461 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h @@ -162,7 +162,6 @@ * @old creds which should be used for context calculation * @new creds to modify * - * * Security hooks for inode operations. * * @inode_alloc_security: @@ -428,6 +427,11 @@ * security module does not know about attribute or a negative error code * to abort the copy up. Note that the caller is responsible for reading * and writing the xattrs as this hook is merely a filter. + * @d_instantiate: + * Populate the security structure of a dentry or its backing inode as + * that dentry is installed in the dentry cache. + * @dentry contains a pointer to the new dentry. + * @inode contains a pointer to the inode backing the dentry. May be NULL. * * Security hooks for file operations *