All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Donald Buczek <buczek@molgen.mpg.de>
Cc: Bhupesh Sharma <bhsharma@redhat.com>,
	horms@verge.net.au, kexec@lists.infradead.org,
	k-hagio@ab.jp.nec.com
Subject: Re: [PATCH] x86: Fix PAGE_OFFSET for kernels since 4.20
Date: Fri, 30 Aug 2019 17:23:51 +0800	[thread overview]
Message-ID: <20190830092351.GE12242@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20190830091258.51133-1-buczek@molgen.mpg.de>

On 08/30/19 at 11:12am, Donald Buczek wrote:
> Linux kernel commit d52888aa2753 ("x86/mm: Move LDT remap out of KASLR
> region on 5-level paging") changed the base of the direct mapping
> from 0xffff880000000000 to 0xffff888000000000. This was merged
> into v4.20-rc2.

A good catch and necessary fix, thanks.

Does it have issue in makedumpfile?

#ifdef __x86_64__
#define __PAGE_OFFSET_ORIG      (0xffff810000000000) /* 2.6.26, or former */
#define __PAGE_OFFSET_2_6_27    (0xffff880000000000) /* 2.6.27, or later  */
#define __PAGE_OFFSET_5LEVEL    (0xff10000000000000) /* 5-level page table */ 
...
#endif

Thanks
Baoquan

> 
> Update to new address accordingly.
> ---
>  kexec/arch/i386/crashdump-x86.c | 2 ++
>  kexec/arch/i386/crashdump-x86.h | 3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
> index a2aea31..c79791f 100644
> --- a/kexec/arch/i386/crashdump-x86.c
> +++ b/kexec/arch/i386/crashdump-x86.c
> @@ -61,6 +61,8 @@ static int get_kernel_page_offset(struct kexec_info *UNUSED(info),
>  
>  		if (kv < KERNEL_VERSION(2, 6, 27))
>  			elf_info->page_offset = X86_64_PAGE_OFFSET_PRE_2_6_27;
> +		else if (kv < KERNEL_VERSION(4, 20, 0))
> +			elf_info->page_offset = X86_64_PAGE_OFFSET_PRE_4_20_0;
>  		else
>  			elf_info->page_offset = X86_64_PAGE_OFFSET;
>  	}
> diff --git a/kexec/arch/i386/crashdump-x86.h b/kexec/arch/i386/crashdump-x86.h
> index ddee19f..e4fdc82 100644
> --- a/kexec/arch/i386/crashdump-x86.h
> +++ b/kexec/arch/i386/crashdump-x86.h
> @@ -13,7 +13,8 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
>  
>  #define X86_64__START_KERNEL_map	0xffffffff80000000ULL
>  #define X86_64_PAGE_OFFSET_PRE_2_6_27	0xffff810000000000ULL
> -#define X86_64_PAGE_OFFSET		0xffff880000000000ULL
> +#define X86_64_PAGE_OFFSET_PRE_4_20_0	0xffff880000000000ULL
> +#define X86_64_PAGE_OFFSET	0xffff888000000000ULL
>  
>  #define X86_64_MAXMEM        		0x3fffffffffffUL
>  
> -- 
> 2.22.0
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2019-08-30  9:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30  9:12 [PATCH] x86: Fix PAGE_OFFSET for kernels since 4.20 Donald Buczek
2019-08-30  9:23 ` Baoquan He [this message]
2019-08-30  9:34   ` Donald Buczek
2019-08-30 10:05     ` Bhupesh Sharma
2019-08-30 10:32       ` Donald Buczek
2019-09-02  6:02       ` Baoquan He
2019-09-03 14:41 ` Simon Horman
2019-09-03 18:06   ` Donald Buczek
2019-09-09  5:03     ` Bhupesh Sharma
2019-09-16  7:23       ` Simon Horman
2019-09-16 10:47         ` Donald Buczek
2019-09-16 14:13           ` Simon Horman
2019-09-16 10:51         ` Bhupesh Sharma

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=20190830092351.GE12242@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=bhsharma@redhat.com \
    --cc=buczek@molgen.mpg.de \
    --cc=horms@verge.net.au \
    --cc=k-hagio@ab.jp.nec.com \
    --cc=kexec@lists.infradead.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.