Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3697782pxj; Mon, 7 Jun 2021 18:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+t2iK84xw99lQlKqMuPasw8aK3oEl9D2QrX4lnP32p1ocycP1pss9MC8cww2qFqEsjn8y X-Received: by 2002:a05:6402:1559:: with SMTP id p25mr23090608edx.343.1623115067845; Mon, 07 Jun 2021 18:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623115067; cv=none; d=google.com; s=arc-20160816; b=tvqwLVnpUaRNfSrheFFWwzScmbDDWxo2/tC9i1r0j7D/K4606/xESirF9bvs5lAgSM dOSyU46OPCktC4EAZQCsVS0PY9suSaN3F8vN6ISdNDwmTRwvp6qVunA1rCpp7XyhPz9f LysU+tHhyHeq+MuJbr9J4kbPUsC9QwAQz2SPgdmEyPVVtbT20mULTm2WxRZ+vNsySVXP ST00B2QkdV5qkR8b/+sbBHZLP4fB+jv1/ME6kN6hNHNtCkkQdK240WOEs+e0UG/LENLF TzjKVDvzHkthBdBMrQx3W8/QlTMA3iRPlQuk/O7lSrHhpoZhHWOOKtVFFAHu4XNVy+hR fM6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=Iu5YQGqDPhEz9F+VIcUJfU85SiKhA1vbZ9OvYgagwEM=; b=lT6Qq3d1AY/DEOi2Is9IcGNPTd7ozNIwNNm2AFRzc6Pew6hdajb24JuNCWh1dFkWcy +b1gd7RhtAesRpxTuBaWZS6Gm15yMcWTqQIMBGRzRTZhcrYwr0jey/HLOPCWUAEn+VET AW7sFcJBDdwdMlonXgCI5GjKcncX9zOioUoGu1NvKmMFEUgV7QacSUJOBci20sszSPKW sPwkZmlD/M14zamSvvDkcjzEsFUR9hNF0WvfmyOyh4knfgyY52GAcy6Sq/vZBDZXNP9B eg6NrGFo2By/Zq6MF6iDli1X9Yw96QegJfehMkpiS1jgVmQvTaZ8XBzAWGQ4kUxHZz7a G5DA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si5292448ejs.124.2021.06.07.18.17.25; Mon, 07 Jun 2021 18:17:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbhFHBQP (ORCPT + 99 others); Mon, 7 Jun 2021 21:16:15 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:4385 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbhFHBQP (ORCPT ); Mon, 7 Jun 2021 21:16:15 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FzXGv0mBMz6vLY; Tue, 8 Jun 2021 09:10:31 +0800 (CST) Received: from dggpeml500020.china.huawei.com (7.185.36.88) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 09:14:21 +0800 Received: from [10.174.177.174] (10.174.177.174) by dggpeml500020.china.huawei.com (7.185.36.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 09:14:20 +0800 Subject: Re: [PATCH -next] capability: fix doc warnings in capability.c To: "Serge E. Hallyn" CC: , , , , , , References: <20210605062602.678602-1-libaokun1@huawei.com> <20210607230913.GA12581@mail.hallyn.com> From: "libaokun (A)" Message-ID: <83a6dfaa-80ef-62ba-313b-fff03efc6d9d@huawei.com> Date: Tue, 8 Jun 2021 09:14:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210607230913.GA12581@mail.hallyn.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.174] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500020.china.huawei.com (7.185.36.88) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thank you for your advice. I didn't notice the order of the parameters. I'm about to send a patch v2 with the changes suggested by you. ?? 2021/6/8 7:09, Serge E. Hallyn ะด??: > 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 > .