All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Jeremy Linton <jeremy.linton@arm.com>
Cc: linux-efi <linux-efi@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] efi: permit calling efi_mem_reserve_persistent from atomic context
Date: Tue, 27 Nov 2018 20:16:47 +0100	[thread overview]
Message-ID: <CAKv+Gu8HFq0EnQv6PBVXqO5=WCBqA=ztwb+-otrpBz+J9SnHfA@mail.gmail.com> (raw)
In-Reply-To: <a8346212-70cb-0bbb-9e29-e21fa2ee5040@arm.com>

On Tue, 27 Nov 2018 at 19:59, Jeremy Linton <jeremy.linton@arm.com> wrote:
>
> Hi Ard,
>
>
> On 11/14/2018 11:55 AM, Ard Biesheuvel wrote:
> > Currently, efi_mem_reserve_persistent() may not be called from atomic
> > context, since both the kmalloc() call and the memremap() call may
> > sleep.
> >
> > The kmalloc() call is easy enough to fix, but the memremap() call
> > needs to be moved into an init hook since we cannot control the
> > memory allocation behavior of memremap() at the call site.
>
> So, at first glance this looks correct until I noticed that
> its_cpu_init_lpis() is being called before the early_initcalls are run.
>
> This results in the WARN_ON triggering with the following backtrace:
>
> [    0.000000]  its_cpu_init_lpis+0x1d4/0x2e0
> [    0.000000]  its_cpu_init+0x78/0x1b4
> [    0.000000]  gic_init_bases+0x2c4/0x2e0
> [    0.000000]  gic_acpi_init+0x158/0x270
> [    0.000000]  acpi_match_madt+0x4c/0x84
> [    0.000000]  acpi_table_parse_entries_array+0x140/0x218
> [    0.000000]  acpi_table_parse_entries+0x70/0x98
> [    0.000000]  acpi_table_parse_madt+0x40/0x50
> [    0.000000]  __acpi_probe_device_table+0x88/0xe0
> [    0.000000]  irqchip_init+0x38/0x40
> [    0.000000]  init_IRQ+0xfc/0x130
> [    0.000000]  start_kernel+0x344/0x4cc
>
> due to the efi_memreserve_root not yet being set.
>

Yup

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=efi/urgent&id=976b489120cdab2b1b3a41ffa14661db43d58190

That should fix it. Please let me know if it doesn't work for you

      reply	other threads:[~2018-11-27 19:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 17:55 [GIT PULL 0/5] EFI fixes for v4.20 Ard Biesheuvel
2018-11-14 17:55 ` [PATCH 1/5] efi: Fix debugobjects warning on efi_rts_work Ard Biesheuvel
2018-11-15  9:09   ` [tip:efi/urgent] efi: Fix debugobjects warning on 'efi_rts_work' tip-bot for Waiman Long
2018-11-14 17:55 ` [PATCH 2/5] efi: arm: revert deferred unmap of early memmap mapping Ard Biesheuvel
2018-11-15  9:10   ` [tip:efi/urgent] efi/arm: Revert " tip-bot for Ard Biesheuvel
2018-11-14 17:55 ` [PATCH 3/5] efi/arm: libstub: pack FDT after populating it Ard Biesheuvel
2018-11-15  9:11   ` [tip:efi/urgent] efi/arm/libstub: Pack " tip-bot for Ard Biesheuvel
2018-11-14 17:55 ` [PATCH 4/5] efi/arm: defer persistent reservations until after paging_init() Ard Biesheuvel
2018-11-15  9:11   ` [tip:efi/urgent] efi/arm: Defer " tip-bot for Ard Biesheuvel
2018-11-14 17:55 ` [PATCH 5/5] efi: permit calling efi_mem_reserve_persistent from atomic context Ard Biesheuvel
2018-11-15  9:12   ` [tip:efi/urgent] efi: Permit calling efi_mem_reserve_persistent() " tip-bot for Ard Biesheuvel
2018-11-27 18:59   ` [PATCH 5/5] efi: permit calling efi_mem_reserve_persistent " Jeremy Linton
2018-11-27 19:16     ` Ard Biesheuvel [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='CAKv+Gu8HFq0EnQv6PBVXqO5=WCBqA=ztwb+-otrpBz+J9SnHfA@mail.gmail.com' \
    --to=ard.biesheuvel@linaro.org \
    --cc=jeremy.linton@arm.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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.