Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3629436pxj; Mon, 7 Jun 2021 16:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7kQOSilElNc1TYwZrUJkCjKtBYhxp+OamWDqDr0eOOp4fWgCrk0OQM7mtT9fbEHjLbhf+ X-Received: by 2002:a05:6402:946:: with SMTP id h6mr22409321edz.261.1623107479288; Mon, 07 Jun 2021 16:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623107479; cv=none; d=google.com; s=arc-20160816; b=xXbTdlbcy6ppUHGpyk/oAU4rVpxoAtTPRB3zrQPXRVVY9hfHSHmNsCFIwaV3rqaXRm jeValxSkCRRyppzQ+yI6qWFU9RGi8KCbi6x9PwfCpTAVfTI9NfV2IZtNKM0GfUdx0rH3 jtLqnjXH7uApkTcYB5kX6oA5Yj4BsonbDbQhYHvgi0b1aZ/ht4xbgR4INLXzfqRKWbB9 CSdBeLaUNjN1JNyZ+SUWUdELTvQcPxJNqHwMcp4iDn9F42J1EY4ER8eVLdLlVDokU2SB 6+tK5Oo3xRNHig8+LfvtErjxpH2MpRnYtVlnWNAA0iHMXHkMPTe4M1atItp5WuVefRew HKmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Q7cESNKIqICpv1r0H8EB9sKqaB5tmItTss32ROGRYkE=; b=rNp1iojxyXy5sSxbFmOfXYpCnZKyWl545LsT6/xqIsd8XsNoash1ravXUT8ZIL6Rbl KmGYmxd4qXZG8ItJi5862kcyz9XvdIzVvTjNiQMfeNlWXI9lXN8pqZFlM1F6Wcih0o4O bdbOeT89ULRRfBMup9FNlQmI3cfXNxmkWXMz/3gFYQDroQV09Qkd6tEdzPuZ5Sq1913W oEDBt66CNu01wpgDQwUzhK9V7s1dpIsXjuVBjf+SvkDU/gWlvgBlVa3Ukt9m3ZBHZ5eR 70zKpgcvpx1OisU7doV5HghJ/iaIO2Zl3Kxa6OZbQDlhdVJ5/ZlYaIx/3ki+kYSt6wEo b+eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si7151536edc.575.2021.06.07.16.10.55; Mon, 07 Jun 2021 16:11:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230311AbhFGXLH (ORCPT + 99 others); Mon, 7 Jun 2021 19:11:07 -0400 Received: from mail.hallyn.com ([178.63.66.53]:37144 "EHLO mail.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbhFGXLG (ORCPT ); Mon, 7 Jun 2021 19:11:06 -0400 Received: by mail.hallyn.com (Postfix, from userid 1001) id 7E0A0867; Mon, 7 Jun 2021 18:09:13 -0500 (CDT) Date: Mon, 7 Jun 2021 18:09:13 -0500 From: "Serge E. Hallyn" To: Baokun Li Cc: serge@hallyn.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, weiyongjun1@huawei.com, yuehaibing@huawei.com, yangjihong1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH -next] capability: fix doc warnings in capability.c Message-ID: <20210607230913.GA12581@mail.hallyn.com> References: <20210605062602.678602-1-libaokun1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210605062602.678602-1-libaokun1@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 05, 2021 at 02:26:02PM +0800, Baokun Li wrote: > Fixes the following W=1 kernel build warning(s): > > kernel/capability.c:490: warning: Function parameter or > member 'mnt_userns' not described in 'privileged_wrt_inode_uidgid' > kernel/capability.c:506: warning: Function parameter or > member 'mnt_userns' not described in 'capable_wrt_inode_uidgid' > > Signed-off-by: Baokun Li > --- > kernel/capability.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/capability.c b/kernel/capability.c > index 46a361dde042..27a959aa897f 100644 > --- a/kernel/capability.c > +++ b/kernel/capability.c > @@ -480,6 +480,7 @@ EXPORT_SYMBOL(file_ns_capable); > /** > * privileged_wrt_inode_uidgid - Do capabilities in the namespace work over the inode? > * @ns: The user namespace in question > + * @mnt_userns: User namespace of the mount the inode was found from > * @inode: The inode in question > * > * Return true if the inode uid and gid are within the namespace. > @@ -495,6 +496,7 @@ bool privileged_wrt_inode_uidgid(struct user_namespace *ns, > /** > * capable_wrt_inode_uidgid - Check nsown_capable and uid and gid mapped > * @inode: The inode in question > + * @mnt_userns: User namespace of the mount the inode was found from The mnt_userns comes before the inode in this fn. > * @cap: The capability in question > * > * Return true if the current task has the given capability targeted at > -- > 2.31.1