linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/4] arm/efi: fix memblock reallocation crash due to persistent reservations
Date: Tue, 6 Nov 2018 21:46:03 +0000	[thread overview]
Message-ID: <20181106214602.GA31487@brain-police> (raw)
In-Reply-To: <CAKv+Gu81L5Xxvz72r8C8cXE9hweA-90w47HG3tBHUUoPV-gZPQ@mail.gmail.com>

On Tue, Nov 06, 2018 at 10:39:47PM +0100, Ard Biesheuvel wrote:
> On 6 November 2018 at 22:34, Will Deacon <will.deacon@arm.com> wrote:
> > On Tue, Nov 06, 2018 at 12:37:28PM +0100, Ard Biesheuvel wrote:
> >> This series addresses the kexec/kdump crash on arm64 system with many CPUs
> >> that was reported by Bhupesh.
> >>
> >> Patches #1 and #2 fix the actual crash. Patches #3 and #4 optimize the
> >> EFI persistent memreserve infrastructure so that fewer memblock reservations
> >> are required.
> >
> > I acked the arm64 part and patches 3 and 4 look good afaict, so:
> >
> > Acked-by: Will Deacon <will.deacon@arm.com>
> >
> > for those as well.
> >
> > The only thing I was wondering is whether or not exhausting the page-sized
> > array in the first list entry is rare enough that we could just realloc the
> > thing and copy instead of chaining together new pages. That said, without
> > seeing the code it's hard to tell whether you save much complexity with such
> > a scheme so I'll leave it up to you.
> >
> 
> Well, the problem is that the page-sized array may have been allocated
> by a previous kernel, and so it may be memblock_reserve()d already, in
> which case reallocating does not actually free up the memory in a
> useful way.
> 
> Also, in the unlikely event that we race and allocate two new pages at
> the same time, the current scheme will not break (and we will
> ultimately fill up all the slots in both pages before allocating even
> more pages). This will become a lot trickier if we do reallocation.

Ah crap, yeah, the concurrency angle makes that really awful. Thanks.

> So if the current approach looks correct to you, then I'd prefer to
> stick with it.
> 
> Do you agree with applying #3 and #4 as fixes?

If Patch 1 alone is sufficient to solve the issue for Bhupesh, then I don't
think we have a need to treat 3 and 4 as fixes (and therefore we can avoid
having to backport them to stable kernels).

Will

      reply	other threads:[~2018-11-06 21:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 11:37 [PATCH 0/4] arm/efi: fix memblock reallocation crash due to persistent reservations Ard Biesheuvel
2018-11-06 11:37 ` [PATCH 1/4] arm64: memblock: don't permit memblock resizing until linear mapping is up Ard Biesheuvel
2018-11-06 21:22   ` Will Deacon
2018-11-06 11:37 ` [PATCH 2/4] efi/arm: defer persistent reservations until after paging_init() Ard Biesheuvel
2018-11-06 19:02   ` Ard Biesheuvel
2018-11-06 19:08     ` Russell King - ARM Linux
2018-11-06 20:06       ` Ard Biesheuvel
2018-11-06 23:49         ` Russell King - ARM Linux
2018-11-07  9:51           ` Marc Zyngier
2018-11-07  9:58             ` Russell King - ARM Linux
2018-11-07 10:04               ` Ard Biesheuvel
2018-11-07 10:24                 ` Russell King - ARM Linux
2018-11-06 11:37 ` [PATCH 3/4] efi: permit multiple entries in persistent memreserve data structure Ard Biesheuvel
2018-11-06 11:37 ` [PATCH 4/4] efi: reduce the amount of memblock reservations for persistent allocations Ard Biesheuvel
2018-11-06 18:27 ` [PATCH 0/4] arm/efi: fix memblock reallocation crash due to persistent reservations Marc Zyngier
2018-11-06 19:01   ` Ard Biesheuvel
2018-11-06 19:40     ` Marc Zyngier
2018-11-06 21:34 ` Will Deacon
2018-11-06 21:39   ` Ard Biesheuvel
2018-11-06 21:46     ` Will Deacon [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=20181106214602.GA31487@brain-police \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).