lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 9 Apr 2022 02:44:37 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Baoquan He <bhe@...hat.com>
Cc:     kernel test robot <lkp@...el.com>, akpm@...ux-foundation.org,
        kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        kexec@...ts.infradead.org, hch@....de, yangtiezhu@...ngson.cn,
        amit.kachhap@....com, linux-fsdevel@...r.kernel.org,
        viro@...iv.linux.org.uk
Subject: Re: [PATCH v5 RESEND 1/3] vmcore: Convert copy_oldmem_page() to take
 an iov_iter

On Sat, Apr 09, 2022 at 09:02:29AM +0800, Baoquan He wrote:
> I tried on x86_64 system, for the 1st step, I got this:
> 
> [ ~]# wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> /root/bin/make.cross: No such file or directory

... I don't think we need to reproduce it to see the problem.

> > sparse warnings: (new ones prefixed by >>)
> > >> arch/sh/kernel/crash_dump.c:23:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *addr @@     got void [noderef] __iomem * @@
> >    arch/sh/kernel/crash_dump.c:23:36: sparse:     expected void const *addr
> >    arch/sh/kernel/crash_dump.c:23:36: sparse:     got void [noderef] __iomem *
> > 
> > vim +23 arch/sh/kernel/crash_dump.c
> > 
> >     13	
> >     14	ssize_t copy_oldmem_page(struct iov_iter *iter, unsigned long pfn,
> >     15				 size_t csize, unsigned long offset)
> >     16	{
> >     17		void  __iomem *vaddr;
> >     18	
> >     19		if (!csize)
> >     20			return 0;
> >     21	
> >     22		vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
> >   > 23		csize = copy_to_iter(vaddr + offset, csize, iter);

Unlike other architectures, sh4 does this by calling ioremap().
That gives us an __iomem qualified pointer, which it then warns about
passing to copy_to_iter().

There are a bunch of hacky things we could do to fix it, but for such an
unmaintained arch as sh, I'm inclined to do nothing.  We're more likely
to break something while fixing the warning.  Someone who knows the arch
can figure out what to do properly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ