linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Pratyush Yadav <pratyush@kernel.org>
Subject: Re: [akpm-mm:mm-everything 254/254] kernel/kexec_handover.c:970:50: error: passing argument 1 of 'kho_restore_page' makes integer from pointer without a cast
Date: Sun, 21 Sep 2025 08:50:21 +0300	[thread overview]
Message-ID: <aM-SHRBIwCI5LnXJ@kernel.org> (raw)
In-Reply-To: <20250919140419.211ec45cae8a479d1e347453@linux-foundation.org>

On Fri, Sep 19, 2025 at 02:04:19PM -0700, Andrew Morton wrote:
> On Fri, 19 Sep 2025 10:37:27 +0800 kernel test robot <lkp@intel.com> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> > head:   46735c0743fed990d0ed8722a131ef54006c45a3
> > commit: 5369505b204b3fc65f839f7558640b6ecd675461 [254/254] foo
> > config: x86_64-randconfig-071-20250919 (https://download.01.org/0day-ci/archive/20250919/202509191034.SM82Oaij-lkp@intel.com/config)
> > compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250919/202509191034.SM82Oaij-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202509191034.SM82Oaij-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    kernel/kexec_handover.c: In function 'kho_restore_vmalloc':
> > >> kernel/kexec_handover.c:970:50: error: passing argument 1 of 'kho_restore_page' makes integer from pointer without a cast [-Wint-conversion]
> >      970 |                                 kho_restore_page(page, 0);
> >          |                                                  ^~~~
> >          |                                                  |
> >          |                                                  struct page *
> >    kernel/kexec_handover.c:229:50: note: expected 'phys_addr_t' {aka 'long long unsigned int'} but argument is of type 'struct page *'
> 
> Added by "kho: add support for preserving vmalloc allocations".
> 
> I wonder how this happened - was the correct version sent out?

There is a conflict between "kho: make sure page being restored is actually
from KHO" and KHO vmalloc series. 

I've sent v5 of KHO vmalloc on top of last week's mm-new, it takes care of
the conflict:

https://lore.kernel.org/linux-mm/20250921054458.4043761-1-rppt@kernel.org
 
> How about this?

This fixes the build but won't work :)
 
> --- a/kernel/kexec_handover.c~kho-add-support-for-preserving-vmalloc-allocations-fix
> +++ a/kernel/kexec_handover.c
> @@ -967,7 +967,7 @@ void *kho_restore_vmalloc(const struct k
>  
>  			for (int j = 0; j < (1 << order); j++) {
>  				page = phys_to_page(phys);
> -				kho_restore_page(page, 0);
> +				kho_restore_page(phys);
>  				pages[idx++] = page;
>  				phys += PAGE_SIZE;
>  			}
> @@ -975,7 +975,7 @@ void *kho_restore_vmalloc(const struct k
>  
>  		page = virt_to_page(chunk);
>  		chunk = KHOSER_LOAD_PTR(chunk->hdr.next);
> -		kho_restore_page(page, 0);
> +		kho_restore_page(page_to_phys(page));
>  		__free_page(page);
>  	}
>  
> _
> 

-- 
Sincerely yours,
Mike.


      reply	other threads:[~2025-09-21  5:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-19  2:37 kernel test robot
2025-09-19 21:04 ` Andrew Morton
2025-09-21  5:50   ` Mike Rapoport [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=aM-SHRBIwCI5LnXJ@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pratyush@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