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: <CAE9FiQUCokG_B2ymmVxD0icGcZ5AEY+pS3LipL1vQcP1ZV6D2g@mail.gmail.com>
Date:	Thu, 29 Jan 2015 23:35:49 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	"Lee, Chun-Yi" <joeyli.kernel@...il.com>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Ingo Molnar <mingo@...nel.org>, Pavel Machek <pavel@....cz>,
	Thomas Gleixner <tglx@...utronix.de>,
	"the arch/x86 maintainers" <x86@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Lee, Chun-Yi" <jlee@...e.com>, Len Brown <len.brown@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>, Takashi Iwai <tiwai@...e.de>
Subject: Re: [PATCH] x86/mm, hibernate: Fix misjudgment of register setup_data
 page to nosave region

On Thu, Jan 29, 2015 at 7:58 PM, Lee, Chun-Yi <joeyli.kernel@...il.com> wrote:
>
> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> index 49f8864..6eae021 100644
> --- a/arch/x86/kernel/e820.c
> +++ b/arch/x86/kernel/e820.c
> @@ -687,15 +687,16 @@ void __init parse_e820_ext(u64 phys_addr, u32 data_len)
>  void __init e820_mark_nosave_regions(unsigned long limit_pfn)
>  {
>         int i;
> -       unsigned long pfn = 0;
> +       unsigned long pfn = 0, pfnaddr = 0;
>
>         for (i = 0; i < e820.nr_map; i++) {
>                 struct e820entry *ei = &e820.map[i];
>
> -               if (pfn < PFN_UP(ei->addr))
> +               if (pfnaddr < ei->addr)
>                         register_nosave_region(pfn, PFN_UP(ei->addr));
>
> -               pfn = PFN_DOWN(ei->addr + ei->size);
> +               pfnaddr = ei->addr + ei->size;
> +               pfn = PFN_DOWN(pfnaddr);
>                 if (ei->type != E820_RAM && ei->type != E820_RESERVED_KERN)
>                         register_nosave_region(PFN_UP(ei->addr), pfn);
>
Those changes may not fix the problem.

those E820_RESERVED_KERN and E820_RAM should be continuous.

So you need to find the real end for those continuous ranges.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ