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]
Message-ID: <23624101c03e9f60e66bac5c9739769931968c32.camel@intel.com>
Date:   Thu, 24 Sep 2020 01:39:53 +0000
From:   "Williams, Dan J" <dan.j.williams@...el.com>
To:     "sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
        "miklos@...redi.hu" <miklos@...redi.hu>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "jgross@...e.com" <jgross@...e.com>,
        "bo.liu@...ux.alibaba.com" <bo.liu@...ux.alibaba.com>,
        "linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
        "stefanha@...hat.com" <stefanha@...hat.com>,
        "roger.pau@...rix.com" <roger.pau@...rix.com>,
        "vgoyal@...hat.com" <vgoyal@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "dgilbert@...hat.com" <dgilbert@...hat.com>,
        "Boeuf, Sebastien" <sebastien.boeuf@...el.com>
Subject: Re: linux-next: build failure after merge of the akpm-current tree

On Tue, 2020-09-08 at 20:09 +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/xen/unpopulated-alloc.c: In function 'fill_list':
> drivers/xen/unpopulated-alloc.c:30:9: error: 'struct dev_pagemap' has
> no member named 'res'; did you mean 'ref'?
>    30 |  pgmap->res.name = "Xen scratch";
>       |         ^~~
>       |         ref
> drivers/xen/unpopulated-alloc.c:31:9: error: 'struct dev_pagemap' has
> no member named 'res'; did you mean 'ref'?
>    31 |  pgmap->res.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
>       |         ^~~
>       |         ref
> drivers/xen/unpopulated-alloc.c:33:51: error: 'struct dev_pagemap'
> has no member named 'res'; did you mean 'ref'?
>    33 |  ret = allocate_resource(&iomem_resource, &pgmap->res,
>       |                                                   ^~~
>       |                                                   ref
> In file included from include/asm-generic/memory_model.h:5,
>                  from arch/x86/include/asm/page.h:76,
>                  from arch/x86/include/asm/thread_info.h:12,
>                  from include/linux/thread_info.h:38,
>                  from arch/x86/include/asm/preempt.h:7,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:51,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from drivers/xen/unpopulated-alloc.c:3:
> drivers/xen/unpopulated-alloc.c:53:35: error: 'struct dev_pagemap'
> has no member named 'res'; did you mean 'ref'?
>    53 |   xen_pfn_t pfn = PFN_DOWN(pgmap->res.start);
>       |                                   ^~~
> include/linux/pfn.h:20:23: note: in definition of macro 'PFN_DOWN'
>    20 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT)
>       |                       ^
> drivers/xen/unpopulated-alloc.c:58:30: error: 'struct dev_pagemap'
> has no member named 'res'; did you mean 'ref'?
>    58 |     release_resource(&pgmap->res);
>       |                              ^~~
>       |                              ref
> drivers/xen/unpopulated-alloc.c:69:28: error: 'struct dev_pagemap'
> has no member named 'res'; did you mean 'ref'?
>    69 |   release_resource(&pgmap->res);
>       |                            ^~~
>       |                            ref
> fs/fuse/virtio_fs.c: In function 'virtio_fs_setup_dax':
> fs/fuse/virtio_fs.c:838:9: error: 'struct dev_pagemap' has no member
> named 'res'; did you mean 'ref'?
>   838 |  pgmap->res = (struct resource){
>       |         ^~~
>       |         ref
> 
> Caused by commit
> 
>   b3e022c5a68c ("mm/memremap_pages: convert to 'struct range'")
> 
> interacting with commit
> 
>   9e2369c06c8a ("xen: add helpers to allocate unpopulated memory")
> 
> from Linus' tree (in v5.9-rc4) and commit
> 
>   7e833303db20 ("virtiofs: set up virtio_fs dax_device")
> 
> from the fuse tree.
> 
> I have added the following patch which may require more work but at
> least makes it all build.
> 
> From: Stephen Rothwell <sfr@...b.auug.org.au>
> Date: Tue, 8 Sep 2020 20:00:20 +1000
> Subject: [PATCH] merge fix up for "mm/memremap_pages: convert to
> 'struct
>  range'"
> 
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  drivers/xen/unpopulated-alloc.c | 15 +++++++++------
>  fs/fuse/virtio_fs.c             |  3 +--
>  2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/xen/unpopulated-alloc.c
> b/drivers/xen/unpopulated-alloc.c
> index 3b98dc921426..9fa7ce330628 100644
> --- a/drivers/xen/unpopulated-alloc.c
> +++ b/drivers/xen/unpopulated-alloc.c
> @@ -18,6 +18,7 @@ static unsigned int list_count;
>  static int fill_list(unsigned int nr_pages)
>  {
>  	struct dev_pagemap *pgmap;
> +	struct resource res;
>  	void *vaddr;
>  	unsigned int i, alloc_pages = round_up(nr_pages,
> PAGES_PER_SECTION);
>  	int ret;
> @@ -27,10 +28,10 @@ static int fill_list(unsigned int nr_pages)
>  		return -ENOMEM;
>  
>  	pgmap->type = MEMORY_DEVICE_GENERIC;
> -	pgmap->res.name = "Xen scratch";
> -	pgmap->res.flags = IORESOURCE_MEM | IORESOURCE_BUSY;

This is broken... it needs to be converted to 'struct range'. I'll take
care of that when I respin the series. Sorry for the thrash it seems
this is a new memremap_pages() user since the conversion patches
landed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ