linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	John Hubbard <jhubbard@nvidia.com>,
	John Dias <joaodias@google.com>, Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] mm: fix is_pinnable_page against on cma page
Date: Tue, 3 May 2022 16:48:34 +0800	[thread overview]
Message-ID: <202205031644.EtLKbqIX-lkp@intel.com> (raw)
In-Reply-To: <20220502173558.2510641-1-minchan@kernel.org>

Hi Minchan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on hnaz-mm/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Minchan-Kim/mm-fix-is_pinnable_page-against-on-cma-page/20220503-013733
base:   https://github.com/hnaz/linux-mm master
config: hexagon-randconfig-r034-20220501 (https://download.01.org/0day-ci/archive/20220503/202205031644.EtLKbqIX-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 363b3a645a1e30011cc8da624f13dac5fd915628)
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/1b8636710c31d44310f1d344e337c207562b851d
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Minchan-Kim/mm-fix-is_pinnable_page-against-on-cma-page/20220503-013733
        git checkout 1b8636710c31d44310f1d344e337c207562b851d
        # 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 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from fs/statfs.c:2:
   In file included from include/linux/syscalls.h:88:
   In file included from include/trace/syscall.h:7:
   In file included from include/linux/trace_events.h:6:
   In file included from include/linux/ring_buffer.h:5:
   include/linux/mm.h:1630:47: error: use of undeclared identifier 'MIGRATE_CMA'; did you mean 'MIGRATE_SYNC'?
           return !(is_zone_movable_page(page) || mt == MIGRATE_CMA ||
                                                        ^~~~~~~~~~~
                                                        MIGRATE_SYNC
   include/linux/migrate_mode.h:18:2: note: 'MIGRATE_SYNC' declared here
           MIGRATE_SYNC,
           ^
   In file included from fs/statfs.c:2:
   In file included from include/linux/syscalls.h:88:
   In file included from include/trace/syscall.h:7:
   In file included from include/linux/trace_events.h:6:
   In file included from include/linux/ring_buffer.h:5:
   include/linux/mm.h:1631:9: error: use of undeclared identifier 'MIGRATE_ISOLATE'; did you mean 'MIGRATE_MOVABLE'?
                   mt == MIGRATE_ISOLATE || is_zero_pfn(page_to_pfn(page)));
                         ^~~~~~~~~~~~~~~
                         MIGRATE_MOVABLE
   include/linux/mmzone.h:44:2: note: 'MIGRATE_MOVABLE' declared here
           MIGRATE_MOVABLE,
           ^
>> fs/statfs.c:131:3: warning: 'memcpy' will always overflow; destination buffer has size 64, but size argument is 88 [-Wfortify-source]
                   memcpy(&buf, st, sizeof(*st));
                   ^
   1 warning and 2 errors generated.


vim +/memcpy +131 fs/statfs.c

c8b91accfa1059 Al Viro 2011-03-12  125  
c8b91accfa1059 Al Viro 2011-03-12  126  static int do_statfs_native(struct kstatfs *st, struct statfs __user *p)
c8b91accfa1059 Al Viro 2011-03-12  127  {
c8b91accfa1059 Al Viro 2011-03-12  128  	struct statfs buf;
7ed1ee6118ae77 Al Viro 2010-03-23  129  
c8b91accfa1059 Al Viro 2011-03-12  130  	if (sizeof(buf) == sizeof(*st))
c8b91accfa1059 Al Viro 2011-03-12 @131  		memcpy(&buf, st, sizeof(*st));
7ed1ee6118ae77 Al Viro 2010-03-23  132  	else {
c8b91accfa1059 Al Viro 2011-03-12  133  		if (sizeof buf.f_blocks == 4) {
c8b91accfa1059 Al Viro 2011-03-12  134  			if ((st->f_blocks | st->f_bfree | st->f_bavail |
c8b91accfa1059 Al Viro 2011-03-12  135  			     st->f_bsize | st->f_frsize) &
7ed1ee6118ae77 Al Viro 2010-03-23  136  			    0xffffffff00000000ULL)
7ed1ee6118ae77 Al Viro 2010-03-23  137  				return -EOVERFLOW;
7ed1ee6118ae77 Al Viro 2010-03-23  138  			/*
7ed1ee6118ae77 Al Viro 2010-03-23  139  			 * f_files and f_ffree may be -1; it's okay to stuff
7ed1ee6118ae77 Al Viro 2010-03-23  140  			 * that into 32 bits
7ed1ee6118ae77 Al Viro 2010-03-23  141  			 */
c8b91accfa1059 Al Viro 2011-03-12  142  			if (st->f_files != -1 &&
c8b91accfa1059 Al Viro 2011-03-12  143  			    (st->f_files & 0xffffffff00000000ULL))
7ed1ee6118ae77 Al Viro 2010-03-23  144  				return -EOVERFLOW;
c8b91accfa1059 Al Viro 2011-03-12  145  			if (st->f_ffree != -1 &&
c8b91accfa1059 Al Viro 2011-03-12  146  			    (st->f_ffree & 0xffffffff00000000ULL))
7ed1ee6118ae77 Al Viro 2010-03-23  147  				return -EOVERFLOW;
7ed1ee6118ae77 Al Viro 2010-03-23  148  		}
7ed1ee6118ae77 Al Viro 2010-03-23  149  
c8b91accfa1059 Al Viro 2011-03-12  150  		buf.f_type = st->f_type;
c8b91accfa1059 Al Viro 2011-03-12  151  		buf.f_bsize = st->f_bsize;
c8b91accfa1059 Al Viro 2011-03-12  152  		buf.f_blocks = st->f_blocks;
c8b91accfa1059 Al Viro 2011-03-12  153  		buf.f_bfree = st->f_bfree;
c8b91accfa1059 Al Viro 2011-03-12  154  		buf.f_bavail = st->f_bavail;
c8b91accfa1059 Al Viro 2011-03-12  155  		buf.f_files = st->f_files;
c8b91accfa1059 Al Viro 2011-03-12  156  		buf.f_ffree = st->f_ffree;
c8b91accfa1059 Al Viro 2011-03-12  157  		buf.f_fsid = st->f_fsid;
c8b91accfa1059 Al Viro 2011-03-12  158  		buf.f_namelen = st->f_namelen;
c8b91accfa1059 Al Viro 2011-03-12  159  		buf.f_frsize = st->f_frsize;
c8b91accfa1059 Al Viro 2011-03-12  160  		buf.f_flags = st->f_flags;
c8b91accfa1059 Al Viro 2011-03-12  161  		memset(buf.f_spare, 0, sizeof(buf.f_spare));
c8b91accfa1059 Al Viro 2011-03-12  162  	}
c8b91accfa1059 Al Viro 2011-03-12  163  	if (copy_to_user(p, &buf, sizeof(buf)))
c8b91accfa1059 Al Viro 2011-03-12  164  		return -EFAULT;
7ed1ee6118ae77 Al Viro 2010-03-23  165  	return 0;
7ed1ee6118ae77 Al Viro 2010-03-23  166  }
7ed1ee6118ae77 Al Viro 2010-03-23  167  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


      parent reply	other threads:[~2022-05-03  8:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 17:35 Minchan Kim
2022-05-02 18:02 ` David Hildenbrand
2022-05-02 18:22   ` Minchan Kim
2022-05-03  1:15     ` David Hildenbrand
2022-05-03 15:26       ` Minchan Kim
2022-05-03 16:02         ` David Hildenbrand
2022-05-03 17:20           ` Minchan Kim
2022-05-03 17:27             ` David Hildenbrand
2022-05-03 18:08               ` Minchan Kim
2022-05-03 18:12                 ` Minchan Kim
2022-05-04 22:48           ` Minchan Kim
2022-05-05  6:48             ` Minchan Kim
2022-05-05 17:00               ` Mike Kravetz
2022-05-05 17:25                 ` Peter Xu
2022-05-08  0:31                   ` David Hildenbrand
2022-05-05 17:27                 ` Minchan Kim
2022-05-08  0:28               ` David Hildenbrand
2022-05-02 19:15 ` kernel test robot
2022-05-02 21:10 ` kernel test robot
2022-05-03  8:48 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205031644.EtLKbqIX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jhubbard@nvidia.com \
    --cc=joaodias@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=minchan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox