mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: kbuild-all@01.org, gregkh@linuxfoundation.org, Jason@zx2c4.com,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] drivers: char: mem: Fix thinko in kmem address checks
Date: Thu, 5 Jan 2017 00:46:54 +0800	[thread overview]
Message-ID: <201701050049.kVCQIUfF%fengguang.wu@intel.com> (raw)
In-Reply-To: <641a72e66f81d1244d8420074bc5def88d3929d4.1483529604.git.robin.murphy@arm.com>

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

Hi Robin,

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.10-rc2 next-20170104]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Robin-Murphy/drivers-char-mem-Fix-thinko-in-kmem-address-checks/20170104-235754
config: tile-allmodconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All warnings (new ones prefixed by >>):

   drivers/char/mem.c: In function 'read_kmem':
>> drivers/char/mem.c:384:2: warning: passing argument 1 of 'kaddr_to_pfn' makes pointer from integer without a cast [enabled by default]
   arch/tile/include/asm/page.h:281:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int'
   drivers/char/mem.c: In function 'write_kmem':
   drivers/char/mem.c:515:2: warning: passing argument 1 of 'kaddr_to_pfn' makes pointer from integer without a cast [enabled by default]
   arch/tile/include/asm/page.h:281:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int'

vim +/kaddr_to_pfn +384 drivers/char/mem.c

   368	
   369		vma->vm_pgoff = pfn;
   370		return mmap_mem(file, vma);
   371	}
   372	
   373	/*
   374	 * This function reads the *virtual* memory as seen by the kernel.
   375	 */
   376	static ssize_t read_kmem(struct file *file, char __user *buf,
   377				 size_t count, loff_t *ppos)
   378	{
   379		unsigned long p = *ppos;
   380		ssize_t low_count, read, sz;
   381		char *kbuf; /* k-addr because vread() takes vmlist_lock rwlock */
   382		int err = 0;
   383	
 > 384		if (!virt_addr_valid(p))
   385			return -EIO;
   386	
   387		read = 0;
   388		if (p < (unsigned long) high_memory) {
   389			low_count = count;
   390			if (count > (unsigned long)high_memory - p)
   391				low_count = (unsigned long)high_memory - p;
   392	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  parent reply	other threads:[~2017-01-04 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 11:37 Robin Murphy
2017-01-04 11:45 ` Greg KH
2017-01-04 17:19   ` Greg KH
2017-01-04 16:46 ` kbuild test robot [this message]
2017-01-05 17:15 ` [PATCH v2] drivers: char: mem: Fix thinkos " Robin Murphy
2017-01-10 17:49   ` Greg KH
2017-01-11 19:18     ` Jason A. Donenfeld

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=201701050049.kVCQIUfF%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=Jason@zx2c4.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=stable@vger.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

Powered by JetHome