Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3522762ybv; Sat, 15 Feb 2020 23:11:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwNy4oh/cpWgMCab/A/+7LTo1vJVaC9zlNrW8guBegaWoESinWMeqb/Fi4ITfN+Up94EEMt X-Received: by 2002:a05:6808:251:: with SMTP id m17mr6676912oie.15.1581837072230; Sat, 15 Feb 2020 23:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581837072; cv=none; d=google.com; s=arc-20160816; b=j7Vbe8t8ZdgpbAK9jrQT/ye6t0rfET4kn1+hfzzLcW5yP5QssSjlRRwXM4TXI/uCVp kP73vvJYeZB/w3iV6mLgieI+/r/H7Z0UPIJF3v9WEcui2P7n9/NH3NQXGTrhIy/jTTYL lA+Z7G9WEdGbuKYd79rfhRidLVu4/cg1wxNzSfo1W/guadzsZWPRFHtvfAw6MpAKxH68 mUPmSTlTRumLZKVO+UqTYz+bI746Fk7HzcRDHh7dm6orh2XVBfoJ/PZLDuvz2+feaQ1h NABohF7CrkNrDxdQbw/FIm9Dud1Q8FNQ9/v2mF7sQYFu60hLHEH3PMnymRFA5Y0OmlDk rdQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:subject :from:to:dkim-signature; bh=UqdYWoj1RW3ouISgmmvW3Gaa0hBFuEf6FqRqIIFofEU=; b=IhM59uJ9FxmgLvDAWpdCgcG1ifWqRiI8YFfpcbf7rZedK6eD69DU69JTJCC2yn3wVG L2UcTaGVWKuU4ry5OWoxJ04ao0PU+aoSBycbWF4xBgwiCxii0HnGo18x6SKqb9OuNKzs Yzc68g4ukXK77E9UpriNN3B1wL6BEEALmLEJut1CruLKpRPDSIzFyfwvWvPAunNcLky6 qvc6IOe6+U3et+4p6+AncqC5RLj7l4RVD5awM+uxj4QuWDyB0HHv6zIMkL/g/vBs0hud /MgK6j6O+S/kElYXC1GlbhLWJDTDGtrbdFO4+xlRHP1ZXIHgwKdhH1NBfaHSxU++9BuK SR1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EHFwYTsT; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3si5084731oie.86.2020.02.15.23.10.48; Sat, 15 Feb 2020 23:11:12 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EHFwYTsT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726020AbgBPHJF (ORCPT + 99 others); Sun, 16 Feb 2020 02:09:05 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55988 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgBPHJF (ORCPT ); Sun, 16 Feb 2020 02:09:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Cc:Subject:From:To:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=UqdYWoj1RW3ouISgmmvW3Gaa0hBFuEf6FqRqIIFofEU=; b=EHFwYTsTyQgHw9E4GTs9wl6pTb toslSL3+z6+RcG8CY1oYonbvVMr+bxX9qjB7g0GNiIV1a+7/7w93t+RL67g0+2WOdR1Ff0/t4hV9x fs1ADQfxx8QIxo5wx81vfYqh/vHgEMk82Kf/C7m43bJ0+eLaLLI143HHuH1aDnoSHNg3LhV0j/9IW N6zoFbwtoGBmf17bA8l550tkuD0RHJ1KG7tT/axzHiRZ/S7i0t5XIcL7NK7MDL+CqmaYXDR+4FDqU hor1QgfZ9TImPwMRDnVq5cZj0MHLonN2MSGhn8QBbY/JhWoPeMetozcX935BaleWc6pDAyI5IPFIY BeksFSqA==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3E2i-0006eB-NA; Sun, 16 Feb 2020 07:08:40 +0000 To: LKML , linux-security-module From: Randy Dunlap Subject: [RFC PATCH] security: : fix all kernel-doc warnings Cc: John Johansen , Kees Cook , Micah Morton , James Morris , "Serge E. Hallyn" , Paul Moore , Stephen Smalley , Eric Paris , Casey Schaufler , Kentaro Takeda , Tetsuo Handa Message-ID: Date: Sat, 15 Feb 2020 23:08:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap Fix all kernel-doc warnings in . Fixes the following warnings: ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'quotactl' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'quota_on' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'sb_free_mnt_opts' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'sb_eat_lsm_opts' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'sb_kern_mount' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'sb_show_options' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'sb_add_mnt_opt' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'd_instantiate' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'getprocattr' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'setprocattr' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'locked_down' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'perf_event_open' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'perf_event_alloc' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'perf_event_free' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'perf_event_read' not described in 'security_list_options' ../include/linux/lsm_hooks.h:1830: warning: Function parameter or member 'perf_event_write' not described in 'security_list_options' Signed-off-by: Randy Dunlap Cc: John Johansen Cc: Kees Cook Cc: Micah Morton Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Cc: Casey Schaufler Cc: Kentaro Takeda Cc: Tetsuo Handa --- Notes: a. The location for some of these might need to be modified. b. 'locked_down' was just missing a final ':'. c. Added a new section: Security hooks for perf events. include/linux/lsm_hooks.h | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) --- lnx-56-rc1.orig/include/linux/lsm_hooks.h +++ lnx-56-rc1/include/linux/lsm_hooks.h @@ -103,6 +103,10 @@ * @sb_free_security: * Deallocate and clear the sb->s_security field. * @sb contains the super_block structure to be modified. + * @sb_free_mnt_opts: + * Free memory associated with @mnt_ops. + * @sb_eat_lsm_opts: + * Eat (scan @orig options) and save them in @mnt_opts. * @sb_statfs: * Check permission before obtaining filesystem statistics for the @mnt * mountpoint. @@ -136,6 +140,10 @@ * @sb superblock being remounted * @data contains the filesystem-specific data. * Return 0 if permission is granted. + * @sb_kern_mount: + * Mount this @sb if allowed by permissions. + * @sb_show_options: + * Show (print on @m) mount options for this @sb. * @sb_umount: * Check permission before the @mnt file system is unmounted. * @mnt contains the mounted file system. @@ -155,6 +163,8 @@ * Copy all security options from a given superblock to another * @oldsb old superblock which contain information to clone * @newsb new superblock which needs filled in + * @sb_add_mnt_opt: + * Add one mount @option to @mnt_opts. * @sb_parse_opts_str: * Parse a string of security data filling in the opts structure * @options string containing all mount options known by the LSM @@ -451,6 +461,12 @@ * 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: + * Fill in @inode security information for a @dentry if allowed. + * @getprocattr: + * Read attribute @name for process @p and store it into @value if allowed. + * @setprocattr: + * Write (set) attribute @name to @value, size @size if allowed. * * Security hooks for kernfs node operations * @@ -1113,6 +1129,7 @@ * In case of failure, @secid will be set to zero. * * Security hooks for individual messages held in System V IPC message queues + * * @msg_msg_alloc_security: * Allocate and attach a security structure to the msg->security field. * The security field is initialized to NULL when the structure is first @@ -1302,6 +1319,10 @@ * @cap contains the capability . * @opts contains options for the capable check * Return 0 if the capability is granted for @tsk. + * @quotactl: + * Check whether the quotactl syscall is allowed for this @sb. + * @quota_on: + * Check whether QUOTAON is allowed for this @dentry. * @syslog: * Check permission before accessing the kernel message ring or changing * logging to the console. @@ -1449,11 +1470,24 @@ * @bpf_prog_free_security: * Clean up the security information stored inside bpf prog. * - * @locked_down + * @locked_down: * Determine whether a kernel feature that potentially enables arbitrary * code execution in kernel space should be permitted. * * @what: kernel feature being accessed + * + * Security hooks for perf events + * + * @perf_event_open: + * Check whether the @type of perf_event_open syscall is allowed. + * @perf_event_alloc: + * Allocate and save perf_event security info. + * @perf_event_free: + * Release (free) perf_event security info. + * @perf_event_read: + * Read perf_event security info if allowed. + * @perf_event_write: + * Write perf_event security info if allowed. */ union security_list_options { int (*binder_set_context_mgr)(struct task_struct *mgr);