Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1615623
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Omar Sandoval <osandov@osandov.com> |
| Newsgroups | linux.kernel |
| Subject | Re: kexec regression since 4.9 caused by efi |
| Date | Tue, 04 Apr 2017 02:00:01 +0200 |
| Message-ID | <tsk37-5hW-1@gated-at.bofh.it> (permalink) |
| References | <tiQH0-3gA-1@gated-at.bofh.it> <tiZTY-1bv-17@gated-at.bofh.it> <tj31v-3pp-11@gated-at.bofh.it> <tksKe-5zs-15@gated-at.bofh.it> <tlD0S-6Rt-17@gated-at.bofh.it> <tlHQR-1Mk-21@gated-at.bofh.it> |
| X-Original-To | Matt Fleming <matt@codeblueprint.co.uk> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=03FPrCZceYoK27bRs5t+kM+ycet7lRZHDn1VOXm50io=; b=g0DDAm7gmgutitCi/zCDQt82xjyVxnpdxXFlwwcNkrOYUtwFHW/5ObR6sx6xOZM79L wvnFxiCdU4BTB2ujSANnxVNBiex0Y+EROu02C0+OqvUal9Li0C0mpN+QEswIg1m09Ftc CxbW0jRF0XIDePhD3NP7tEcsv9xI2j2vUlg8EY7AeXqXgLkuZsah6kqemvmSi9BO5yfk WpsLWIx7tPFAvp3bptR+wbGJ0XbTeVpuOjVnIwL6An7sw97yMjYr5Op/WKe1S/SuVlb9 fVLj9YIxOkhP1PkavyOB/cIsEsWiU8E1MAOo6bFinpLNyw9EpH6jkWdX99G80Z62v0yL BxxQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=03FPrCZceYoK27bRs5t+kM+ycet7lRZHDn1VOXm50io=; b=pLaZIaAMnEqVhKUx2nyUMwL9wBy9z/E45Z8gCVEHM5DbF/VKpw9Z2IjjvqDecUgPMG 7LGhgu9Co1w4BFHsRZG08B8rZlKiEAJLEDY1Us51o4Fb9+foyqbXuf5yAHW4MGd3AwP9 nVI6gCpPqmgE9s/UBqi3IqpPqtpQi8fef/e5OeeORU+Q4gF5aanvC0L8n50bX6WIdLTG /MTbP1xOP4bRBBMFKURVhRcvZv79pNkc+JskBEgDySnFIWMbPI1TbnxAJ0CCJWYacFN0 V6xTJQTCgPnoxbhHuDaSdql5ppn+5fGq8Exf37UYt0KMcmT8TW2PmQBbP+2RpJTE8e/2 JIGg== |
| X-Gm-Message-State | AFeK/H0IDy44ynY+eCsfg+ORu+xEX6m3AokwOqe7bHNm/KkOQS0g4sMDzF7UCwu4yhvGD7XG |
| X-Received | by 10.84.211.130 with SMTP id c2mr25208562pli.82.1491263729413; Mon, 03 Apr 2017 16:55:29 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.8.0 (2017-02-23) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Dave Young <dyoung@redhat.com>, Ingo Molnar <mingo@kernel.org>, linux-kernel@vger.kernel.org, kernel-team@fb.com, kexec@lists.infradead.org, linux-efi@vger.kernel.org |
| X-Original-Date | Mon, 3 Apr 2017 16:54:34 -0700 |
| X-Original-Message-ID | <20170403235434.GA22520@vader.DHCP.thefacebook.com> |
| X-Original-References | <20170308201616.GC8598@vader> <20170309063806.GB17257@dhcp-128-65.nay.redhat.com> <20170309095408.GA17883@vader> <20170313073748.GA6332@dhcp-128-65.nay.redhat.com> <20170316124132.GF6261@codeblueprint.co.uk> <20170316175048.GA25230@vader.DHCP.thefacebook.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1615623 |
Show key headers only | View raw
On Thu, Mar 16, 2017 at 10:50:48AM -0700, Omar Sandoval wrote:
> On Thu, Mar 16, 2017 at 12:41:32PM +0000, Matt Fleming wrote:
> > On Mon, 13 Mar, at 03:37:48PM, Dave Young wrote:
> > >
> > > Omar, could you try below patch? Looking at the efi_mem_desc_lookup, it is not
> > > correct to be used in efi_arch_mem_reserve, if it passed your test, I
> > > can rewrite patch log with more background and send it out:
> > >
> > > for_each_efi_memory_desc(md) {
> > > [snip]
> > > if (!(md->attribute & EFI_MEMORY_RUNTIME) &&
> > > md->type != EFI_BOOT_SERVICES_DATA &&
> > > md->type != EFI_RUNTIME_SERVICES_DATA) {
> > > continue;
> > > }
> > >
> > > In above code, it meant to get a md of EFI_MEMORY_RUNTIME of either boot
> > > data or runtime data, this is wrong for efi_mem_reserve, because we are
> > > reserving boot data which has no EFI_MEMORY_RUNTIME attribute at the
> > > running time. Just is happened to work and we did not capture the error.
> >
> > Wouldn't something like this be simpler?
> >
> > ---
> >
> > diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
> > index 30031d5293c4..cdfe8c628959 100644
> > --- a/arch/x86/platform/efi/quirks.c
> > +++ b/arch/x86/platform/efi/quirks.c
> > @@ -201,6 +201,10 @@ void __init efi_arch_mem_reserve(phys_addr_t addr, u64 size)
> > return;
> > }
> >
> > + /* No need to reserve regions that will never be freed. */
> > + if (md.attribute & EFI_MEMORY_RUNTIME)
> > + return;
> > +
> > size += addr % EFI_PAGE_SIZE;
> > size = round_up(size, EFI_PAGE_SIZE);
> > addr = round_down(addr, EFI_PAGE_SIZE);
>
> This works for me.
>
> Reported-and-tested-by: Omar Sandoval <osandov@fb.com>
Is this going to go in for 4.11?
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: kexec regression since 4.9 caused by efi Omar Sandoval <osandov@osandov.com> - 2017-04-04 02:00 +0200
csiph-web