All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 1/3] vmcore: simplify read_from_olemem
Date: Wed, 09 Sep 2020 18:55:59 +0800	[thread overview]
Message-ID: <202009091859.2Wt1vqK0%lkp@intel.com> (raw)
In-Reply-To: <20200909075016.104407-2-kasong@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4161 bytes --]

Hi Kairui,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.9-rc4 next-20200908]
[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/0day-ci/linux/commits/Kairui-Song/Add-writing-support-to-vmcore-for-reusing-oldmem/20200909-155222
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
config: mips-randconfig-r035-20200909 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 8893d0816ccdf8998d2e21b5430e9d6abe7ef465)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

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 >>):

>> fs/proc/vmcore.c:118:14: warning: comparison of distinct pointer types ('typeof (to_copy) *' (aka 'unsigned int *') and 'typeof (((1UL) << 14) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
                   nr_bytes = min(to_copy, PAGE_SIZE - offset);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:884:19: note: expanded from macro 'min'
   #define min(x, y)       __careful_cmp(x, y, <)
                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:875:24: note: expanded from macro '__careful_cmp'
           __builtin_choose_expr(__safe_cmp(x, y), \
                                 ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:865:4: note: expanded from macro '__safe_cmp'
                   (__typecheck(x, y) && __no_side_effects(x, y))
                    ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:851:29: note: expanded from macro '__typecheck'
                   (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                              ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.

# https://github.com/0day-ci/linux/commit/03450912209f6cc4521a2d3a83d1cc8f4b5a850e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kairui-Song/Add-writing-support-to-vmcore-for-reusing-oldmem/20200909-155222
git checkout 03450912209f6cc4521a2d3a83d1cc8f4b5a850e
vim +118 fs/proc/vmcore.c

   104	
   105	/* Reads a page from the oldmem device from given offset. */
   106	ssize_t read_from_oldmem(char *buf, size_t count,
   107				 u64 *ppos, int userbuf,
   108				 bool encrypted)
   109	{
   110		unsigned long pfn, offset;
   111		size_t nr_bytes, to_copy = count;
   112		ssize_t tmp;
   113	
   114		offset = (unsigned long)(*ppos & (PAGE_SIZE - 1));
   115		pfn = (unsigned long)(*ppos / PAGE_SIZE);
   116	
   117		while (to_copy) {
 > 118			nr_bytes = min(to_copy, PAGE_SIZE - offset);
   119	
   120			/* If pfn is not ram, return zeros for sparse dump files */
   121			if (pfn_is_ram(pfn) == 0) {
   122				memset(buf, 0, nr_bytes);
   123			} else {
   124				if (encrypted)
   125					tmp = copy_oldmem_page_encrypted(pfn, buf,
   126									 nr_bytes,
   127									 offset,
   128									 userbuf);
   129				else
   130					tmp = copy_oldmem_page(pfn, buf, nr_bytes,
   131							       offset, userbuf);
   132	
   133				if (tmp < 0)
   134					return tmp;
   135			}
   136			*ppos += nr_bytes;
   137			buf += nr_bytes;
   138			to_copy -= nr_bytes;
   139			++pfn;
   140			offset = 0;
   141		}
   142	
   143		return count;
   144	}
   145	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27883 bytes --]

  reply	other threads:[~2020-09-09 10:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  7:50 [RFC PATCH 0/3] Add writing support to vmcore for reusing oldmem Kairui Song
2020-09-09  7:50 ` Kairui Song
2020-09-09  7:50 ` [RFC PATCH 1/3] vmcore: simplify read_from_olemem Kairui Song
2020-09-09  7:50   ` Kairui Song
2020-09-09 10:55   ` kernel test robot [this message]
2020-09-09  7:50 ` [RFC PATCH 2/3] vmcore: Add interface to write to old mem Kairui Song
2020-09-09  7:50   ` Kairui Song
2020-09-09 12:26   ` kernel test robot
2020-09-09 12:27   ` kernel test robot
2020-09-09  7:50 ` [RFC PATCH 3/3] x86_64: implement copy_to_oldmem_page Kairui Song
2020-09-09  7:50   ` Kairui Song
2020-09-09 14:04 ` [RFC PATCH 0/3] Add writing support to vmcore for reusing oldmem Eric W. Biederman
2020-09-09 14:04   ` Eric W. Biederman
2020-09-09 16:43   ` Kairui Song
2020-09-09 16:43     ` Kairui Song
2020-09-21  7:17     ` Kairui Song
2020-09-21  7:17       ` Kairui Song

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=202009091859.2Wt1vqK0%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.