linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-efi <linux-efi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lee Chun-Yi <jlee@suse.com>, Borislav Petkov <bp@alien8.de>,
	Dave Young <dyoung@redhat.com>, Laszlo Ersek <lersek@redhat.com>,
	Bhupesh Sharma <bhsharma@redhat.com>,
	"Neri, Ricardo" <ricardo.neri@intel.com>,
	"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
	Matt Fleming <matt@codeblueprint.co.uk>
Subject: RE: [PATCH] efi: Free existing memory map before installing new memory map
Date: Wed, 27 Jun 2018 07:28:01 +0000	[thread overview]
Message-ID: <FFF73D592F13FD46B8700F0A279B802F4605BAD9@ORSMSX111.amr.corp.intel.com> (raw)
In-Reply-To: <CAKv+Gu982OPp73Tg5Rru3+1ymq6_P8XpFPROQPdZMSUDdwEOmw@mail.gmail.com>

> > Also, could you please clarify if there is any specific reason why
> > memory allocated using memblock_reserve() shouldn't be freed. I mean,
> > not with memblock_free() but I think we could make it _available_
> > using free_bootmem() (or something similar, please correct me if this is not
> the right API).
> 
> On arm64, the memory map is provided to the core kernel by the stub, and after
> kexec, a pointer to the same memory map will be passed to the next kernel. So
> the kernel does not 'own' that allocation, and it should not free it or overwrite
> it.

Thanks for the reply. It confirms that the issue is only on x86 systems.
I see that arm64 doesn't call efi_memmap_alloc() and hence there is no concept 
of allocating memory for new memory map and installing it (so no memory leak).

Regards,
Sai

      reply	other threads:[~2018-06-27  7:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26  2:41 [PATCH] efi: Free existing memory map before installing new memory map Sai Praneeth Prakhya
2018-06-26  3:15 ` kbuild test robot
2018-06-26  3:15 ` kbuild test robot
2018-06-26  7:18   ` Prakhya, Sai Praneeth
2018-06-27  6:02     ` [kbuild-all] " Ye Xiaolong
2018-06-27  6:09       ` Ard Biesheuvel
2018-06-27  6:29         ` Ye Xiaolong
2018-06-27  6:32       ` Prakhya, Sai Praneeth
2018-06-26  9:38 ` Ard Biesheuvel
2018-06-27  4:51   ` Prakhya, Sai Praneeth
2018-06-27  7:01     ` Ard Biesheuvel
2018-06-27  7:28       ` Prakhya, Sai Praneeth [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=FFF73D592F13FD46B8700F0A279B802F4605BAD9@ORSMSX111.amr.corp.intel.com \
    --to=sai.praneeth.prakhya@intel.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhsharma@redhat.com \
    --cc=bp@alien8.de \
    --cc=dyoung@redhat.com \
    --cc=jlee@suse.com \
    --cc=lersek@redhat.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=ravi.v.shankar@intel.com \
    --cc=ricardo.neri@intel.com \
    /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).