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 1DC39C636CC for ; Sun, 19 Feb 2023 09:45:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2A2576B0074; Sun, 19 Feb 2023 04:45:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 18E3A6B0075; Sun, 19 Feb 2023 04:45:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 005E66B0078; Sun, 19 Feb 2023 04:45:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id DFD2A6B0074 for ; Sun, 19 Feb 2023 04:45:45 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B6170815B1 for ; Sun, 19 Feb 2023 09:45:45 +0000 (UTC) X-FDA: 80483559450.25.851E77B Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by imf05.hostedemail.com (Postfix) with ESMTP id A882B100007 for ; Sun, 19 Feb 2023 09:45:43 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=R+wQabxD; spf=pass (imf05.hostedemail.com: domain of lkp@intel.com designates 192.55.52.136 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676799943; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=uPuKxD8qyojP15qx7U5Jk7D2XE0Ic3KWRJIdQQYC3wY=; b=HuerQmQnu7xhyUh3M50i1SMj7hv6IoTG4RV8yT6F/xO/U1DXiCzGr3Kf+Uu6yujYGVjoR+ ojh9z4IZeiYrf1uyMDzOLC/fbUTyTv3VlMz90MDvdTd9E3uCMtpDuDnOnbvrlnF5ViQZKe gUh7xNe9M2rkggybdgUqrGeCsgfnLFo= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=R+wQabxD; spf=pass (imf05.hostedemail.com: domain of lkp@intel.com designates 192.55.52.136 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676799943; a=rsa-sha256; cv=none; b=eGvxwFW9pCYJDCA6jy1aakrzsM/3wohKRRj24YX0GKVy0XCn+nfWnDCvtyfYQ/MT9Htbfi 5wx1Pa//ZRVHyE/OFlssVWLLDy3sJJmtv49RTpzWU4Ias8yzV+uj7AOG+QYFQVhqAVC21Z TRo6oUeie0sWVeSzI1HXXt32HAl5S30= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676799943; x=1708335943; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xhcCnf0cNcsotIr4PN51gmS8bzJYzvKjq4kiT2RhNfs=; b=R+wQabxDVOveAldVSevl8kmmKWFMmrpcTWGT0UxErlB/j9GGnYditPle QQZC/Ta9HWe8UnQwROQg++JXTCnMpYND70u0KrCoDYKV3oPi3OkxR+esZ u9R7WptaMBeRxw4LjMY9r0c+FFi/eZSnTrgmETHCys2gFmP7MklN1AnQP 4n2qG6QbGlAcM58/0QfIsl8W2jHQ918CLg+jSv3e6UF0J/6zK5VOoAPSd 2K4Yfxk8cpbIEi1sz5zm9Dvi+j4zeZYQdMMOnJc0rHQC+NleyPVTW482d Djivrnfi+EkG6abA+VjTnCCMR2afXpeX81RgrwPeUURHwctN9es/m/PcH g==; X-IronPort-AV: E=McAfee;i="6500,9779,10625"; a="311867303" X-IronPort-AV: E=Sophos;i="5.97,310,1669104000"; d="scan'208";a="311867303" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2023 01:45:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10625"; a="759872251" X-IronPort-AV: E=Sophos;i="5.97,310,1669104000"; d="scan'208";a="759872251" Received: from lkp-server01.sh.intel.com (HELO 4455601a8d94) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 19 Feb 2023 01:45:34 -0800 Received: from kbuild by 4455601a8d94 with local (Exim 4.96) (envelope-from ) id 1pTgGD-000DEd-0n; Sun, 19 Feb 2023 09:45:33 +0000 Date: Sun, 19 Feb 2023 17:44:59 +0800 From: kernel test robot To: Nhat Pham , akpm@linux-foundation.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, bfoster@redhat.com, willy@infradead.org, arnd@arndb.de, linux-api@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH v10 2/3] cachestat: implement cachestat syscall Message-ID: <202302191728.rXGLcydi-lkp@intel.com> References: <20230219073318.366189-3-nphamcs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230219073318.366189-3-nphamcs@gmail.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A882B100007 X-Rspam-User: X-Stat-Signature: j1dqegbwnwk48744wjskg5osinuoh8nd X-HE-Tag: 1676799943-397076 X-HE-Meta: U2FsdGVkX1/t9zRsUDBCHRt/ZmM/CdMc+ujUIddvs4rF3azeJRdq58mCWphBOTBWgrqroSYedvvrKwHZ1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wJkmmQvjMGiaU48gEuimQaFsIQzzBtFmc6Ja2n6KiZJkb7hZq20jY53DrInKTZzNIV8JxumHjqsOnHJ3o15qlcebL4VbUMvAUjGhC6Ot9dgloqa9wD6BW8uKMuXnWlhBX6Y7AQtc3m/A4fnTXZIfXxY7oYbxapznX+2DItdzFfgqfVEGPti7/N9UAJg5YRHD9yoX/op0/xKPi3nRuP44DA6PMI+VaWuzW99+7J0Czg6WELiQ3C 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 Nhat, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 1440f576022887004f719883acb094e7e0dd4944] url: https://github.com/intel-lab-lkp/linux/commits/Nhat-Pham/workingset-refactor-LRU-refault-to-expose-refault-recency-check/20230219-153500 base: 1440f576022887004f719883acb094e7e0dd4944 patch link: https://lore.kernel.org/r/20230219073318.366189-3-nphamcs%40gmail.com patch subject: [PATCH v10 2/3] cachestat: implement cachestat syscall config: hexagon-randconfig-r014-20230219 (https://download.01.org/0day-ci/archive/20230219/202302191728.rXGLcydi-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db89896bbbd2251fff457699635acbbedeead27f) 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/d691a3b4a696ab20c9c5fe86c624e9e36814523c git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Nhat-Pham/workingset-refactor-LRU-refault-to-expose-refault-recency-check/20230219-153500 git checkout d691a3b4a696ab20c9c5fe86c624e9e36814523c # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202302191728.rXGLcydi-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/filemap.c:20: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from mm/filemap.c:20: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from mm/filemap.c:20: In file included from include/linux/kernel_stat.h:9: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:334: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ >> mm/filemap.c:4035:6: warning: no previous prototype for function 'ksys_cachestat' [-Wmissing-prototypes] long ksys_cachestat(unsigned int fd, size_t len, loff_t off, ^ mm/filemap.c:4035:1: note: declare 'static' if the function is not intended to be used outside of this translation unit long ksys_cachestat(unsigned int fd, size_t len, loff_t off, ^ static 7 warnings generated. vim +/ksys_cachestat +4035 mm/filemap.c 4033 4034 #ifdef CONFIG_CACHESTAT_SYSCALL > 4035 long ksys_cachestat(unsigned int fd, size_t len, loff_t off, 4036 struct cachestat __user *cstat, unsigned int flags) 4037 { 4038 struct fd f = fdget(fd); 4039 struct address_space *mapping; 4040 struct cachestat cs; 4041 pgoff_t first_index = off >> PAGE_SHIFT; 4042 pgoff_t last_index = 4043 len == 0 ? ULONG_MAX : (off + len - 1) >> PAGE_SHIFT; 4044 4045 if (!f.file) 4046 return -EBADF; 4047 4048 if (off < 0 || flags != 0) { 4049 fdput(f); 4050 return -EINVAL; 4051 } 4052 4053 memset(&cs, 0, sizeof(struct cachestat)); 4054 mapping = f.file->f_mapping; 4055 filemap_cachestat(mapping, first_index, last_index, &cs); 4056 fdput(f); 4057 4058 if (copy_to_user(cstat, &cs, sizeof(struct cachestat))) 4059 return -EFAULT; 4060 4061 return 0; 4062 } 4063 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests