Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp845402iob; Wed, 4 May 2022 09:06:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7id9IkAfJTQAzR82hiFooW7eSZGSCre7B5NO/UaWlntOAh3dgtjh+8Emf5dvNYiD7Wc2J X-Received: by 2002:a17:907:6092:b0:6f3:9d63:3b45 with SMTP id ht18-20020a170907609200b006f39d633b45mr22126645ejc.703.1651680414457; Wed, 04 May 2022 09:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651680414; cv=none; d=google.com; s=arc-20160816; b=X0dasql18fXRjvI34COEvE7sQuaOikj0ue/E7LoDCaTeMZUTo2OT+6cXSGXYeXNAZI 86q9Nku7Z0ZeqitGU8XP+QqbQgG3exK5zoSsByJFNSa/6UI9eXnbEj0+iiNembvR3rv3 Tuq5HvIfSgtH9zGBT8oiiOSLuMebX9ezwp00Xr3zfR/DrLZb7wXECNqFtOhjfbhjM7rZ VORAPC2Y7tGl/HYAl+QouLFY5rWdwk+R2S3uyY5zfZaucLIcYnGkt/0t29frHtcDS6tC ansTzEuwcr0ZY+CpldGlpJ9iWr3kIXixma428xW5PjbJfRmeoWWCMEPkvDmRyIjRfjJx djng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IfKhNJupmatvjfrXETwaG5hH6rnVIJs2nfFo0iWKPQA=; b=xr+krpUbgmLk5Klt0neZkYrPICUNTHzSmkR6iKqvISOlNL7u2sbF8VoMp8DZIOncbv 6CsETfynWBJ9rNqnQjaCyWKYHm1TmYVXP2G9ZZa362QiLbRkY/8eLRXjdTAzNXTeU7ka VWs4LcOnb8m0UMwAq7c5mC6nRr3AeGxcEnnTI7sqUcTEmlL3NLIJngAgZwUp/zGVkCR0 GLxa9Mhe0YDHKh20Mik+Vih0ShGbQQ0UUT5vR4HAwHtYrYR/h8N4g5YjDpRXxp7ofUOi AWDJdGnXKLiDwmEK6jYKswvZA9+8IuNQZ88fFH1W5V8u1E56G3/nLZKZ3TDZh/4ciBwu EgGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JgsQrAjN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho7-20020a1709070e8700b006e88e5388eesi18496004ejc.864.2022.05.04.09.06.28; Wed, 04 May 2022 09:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JgsQrAjN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345169AbiEDHFk (ORCPT + 99 others); Wed, 4 May 2022 03:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232560AbiEDHFi (ORCPT ); Wed, 4 May 2022 03:05:38 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EDAA21260; Wed, 4 May 2022 00:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651647722; x=1683183722; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7ZCqlQA5sx7gnt6UXenHJLpYVoVKeBIUo5U3B8t8rmE=; b=JgsQrAjNoJ2bKHpmeKPP0rymm4WqEYDo24MUUewYIoYW2YCZbO+tbXTg W3A8ppj9USsIf09Ak+kXTlJKXTJri9oiCdi/rQvT44YlYz8v394LWa0dN Kfn/VssNM90dJL2YaLpgQNwjDYoURjPIp++ntxf/J6NvMN+LJgNsMqMJu ajep2Urat2qbuK0ZHEDlqugapvSSsztxSVYApTPV0FGhLCRu26/YL8xM1 3SlErWBs+K4t6mqQ8bra2384HEma3siIYo2NaHQyD4dm/Umz/52mULEaO e2tCUZZw5/9M4opfpxyUgreVIiLXLgP0GQ/aI7N/r6fLRlB6NJb0nUDxn w==; X-IronPort-AV: E=McAfee;i="6400,9594,10336"; a="267279980" X-IronPort-AV: E=Sophos;i="5.91,197,1647327600"; d="scan'208";a="267279980" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2022 00:02:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,197,1647327600"; d="scan'208";a="653603446" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 04 May 2022 00:01:55 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1nm91G-000B9r-MZ; Wed, 04 May 2022 07:01:54 +0000 Date: Wed, 4 May 2022 15:01:44 +0800 From: kernel test robot To: Guowei Du , jack@suse.cz Cc: kbuild-all@lists.01.org, amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, jmorris@namei.org, serge@hallyn.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-security-module@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, paul@paul-moore.com, stephen.smalley.work@gmail.com, eparis@parisplace.org, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com, selinux@vger.kernel.org, duguoweisz@gmail.com, duguowei Subject: Re: [PATCH] fsnotify: add generic perm check for unlink/rmdir Message-ID: <202205041421.bHwZBEFK-lkp@intel.com> References: <20220503183750.1977-1-duguoweisz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220503183750.1977-1-duguoweisz@gmail.com> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guowei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pcmoore-selinux/next] [also build test WARNING on linus/master jmorris-security/next-testing v5.18-rc5] [cannot apply to jack-fs/fsnotify next-20220503] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Guowei-Du/fsnotify-add-generic-perm-check-for-unlink-rmdir/20220504-024310 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next config: h8300-randconfig-s032-20220501 (https://download.01.org/0day-ci/archive/20220504/202205041421.bHwZBEFK-lkp@intel.com/config) compiler: h8300-linux-gcc (GCC) 11.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/intel-lab-lkp/linux/commit/6f635019bbd2ab22a64e03164c8812a46531966e git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Guowei-Du/fsnotify-add-generic-perm-check-for-unlink-rmdir/20220504-024310 git checkout 6f635019bbd2ab22a64e03164c8812a46531966e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) security/security.c:358:25: sparse: sparse: cast removes address space '__rcu' of expression >> security/security.c:1169:35: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct path *path @@ got struct path const *dir @@ security/security.c:1169:35: sparse: expected struct path *path security/security.c:1169:35: sparse: got struct path const *dir security/security.c:1180:35: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected struct path *path @@ got struct path const *dir @@ security/security.c:1180:35: sparse: expected struct path *path security/security.c:1180:35: sparse: got struct path const *dir vim +1169 security/security.c 1160 1161 int security_path_rmdir(const struct path *dir, struct dentry *dentry) 1162 { 1163 int ret; 1164 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) 1165 return 0; 1166 ret = call_int_hook(path_rmdir, 0, dir, dentry); 1167 if (ret) 1168 return ret; > 1169 return fsnotify_path_perm(dir, dentry, MAY_RMDIR); 1170 } 1171 -- 0-DAY CI Kernel Test Service https://01.org/lkp