From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42870C433EF for ; Wed, 27 Apr 2022 08:51:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 95C426B0071; Wed, 27 Apr 2022 04:51:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90CBB6B0072; Wed, 27 Apr 2022 04:51:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D4126B0073; Wed, 27 Apr 2022 04:51:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 6DD246B0071 for ; Wed, 27 Apr 2022 04:51:41 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4262C62347 for ; Wed, 27 Apr 2022 08:51:41 +0000 (UTC) X-FDA: 79402040802.31.D0460B5 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf08.hostedemail.com (Postfix) with ESMTP id 6068C16004A for ; Wed, 27 Apr 2022 08:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651049500; x=1682585500; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=cVH9YL+ouYJr/1XgoYPp1CM6c1MoJ+5usEhlyy5+ads=; b=m7HDvPlkeXZNAiCk6BH3obRZuxGHYMpVjyVWQXa+RagjuGeNvX74rbvv KyRIIGsXRfRUekDbjA6XOycrZSB8S24qH25bKV1PhVlOl4z6oRy7S+ytz xS6Ldq42g0vDfgUyqbZqa7bpVDDJaAXdxn+ytuAg8qAkzHYxnoEBVYBTQ rGLYQd9dZJgoIsipR/l7TeMUIh2E6gAK3popsaYsVC5DMmRAPhk+S59IT iyyx+Sp+VuK5VB9zi7jyv5XfWeq1Wx3O5IRweCJEUMJ96QQaNgp/lsW3G fu6zKaOwgsYT22VpJH0OjE+oF9CS7zx/TGSOX1tPonP+e1zgLBB+b68gu g==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="246429606" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="246429606" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 01:51:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="539736231" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2022 01:51:34 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1njdOX-0004WY-HH; Wed, 27 Apr 2022 08:51:33 +0000 Date: Wed, 27 Apr 2022 16:51:32 +0800 From: kernel test robot To: cgel.zte@gmail.com, glider@google.com, elver@google.com, akpm@linux-foundation.org Cc: kbuild-all@lists.01.org, dvyukov@google.com, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, xu xin , Zeal Robot Subject: Re: [PATCH] mm/kfence: fix a potential NULL pointer dereference Message-ID: <202204271645.QTJoeela-lkp@intel.com> References: <20220427071100.3844081-1-xu.xin16@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220427071100.3844081-1-xu.xin16@zte.com.cn> X-Rspamd-Queue-Id: 6068C16004A X-Stat-Signature: aeg64kkozh8h4jodp6icar8dqg7quh66 X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=m7HDvPlk; spf=none (imf08.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.151) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspamd-Server: rspam09 X-HE-Tag: 1651049494-618992 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on hnaz-mm/master] url: https://github.com/intel-lab-lkp/linux/commits/cgel-zte-gmail-com/mm-kfence-fix-a-potential-NULL-pointer-dereference/20220427-151258 base: https://github.com/hnaz/linux-mm master config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20220427/202204271645.QTJoeela-lkp@intel.com/config) compiler: hppa-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/920e9e639493bc72bee803c763f09760e3acd063 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review cgel-zte-gmail-com/mm-kfence-fix-a-potential-NULL-pointer-dereference/20220427-151258 git checkout 920e9e639493bc72bee803c763f09760e3acd063 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash mm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): mm/kfence/core.c: In function '__try_free_kfence_meta': mm/kfence/core.c:1067:37: error: 'addr' undeclared (first use in this function) 1067 | kfence_guarded_free(addr, meta, false); | ^~~~ mm/kfence/core.c:1067:37: note: each undeclared identifier is reported only once for each function it appears in mm/kfence/core.c: In function '__kfence_free': >> mm/kfence/core.c:1075:37: warning: passing argument 1 of 'kfence_report_error' makes integer from pointer without a cast [-Wint-conversion] 1075 | kfence_report_error(addr, false, NULL, NULL, KFENCE_ERROR_INVALID); | ^~~~ | | | void * In file included from mm/kfence/core.c:37: mm/kfence/kfence.h:129:40: note: expected 'long unsigned int' but argument is of type 'void *' 129 | void kfence_report_error(unsigned long address, bool is_write, struct pt_regs *regs, | ~~~~~~~~~~~~~~^~~~~~~ vim +/kfence_report_error +1075 mm/kfence/core.c 1069 1070 void __kfence_free(void *addr) 1071 { 1072 struct kfence_metadata *meta = addr_to_metadata((unsigned long)addr); 1073 1074 if (!meta) { > 1075 kfence_report_error(addr, false, NULL, NULL, KFENCE_ERROR_INVALID); 1076 return; 1077 } 1078 1079 __try_free_kfence_meta(meta); 1080 } 1081 -- 0-DAY CI Kernel Test Service https://01.org/lkp