public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Yan Zhao <yan.y.zhao@intel.com>, ebiederm@xmission.com
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-coco@lists.linux.dev, x86@kernel.org,
	rick.p.edgecombe@intel.com, kirill.shutemov@linux.intel.com,
	bhe@redhat.com
Subject: Re: [PATCH v2 1/1] kexec_core: Accept unaccepted kexec segments' destination addresses
Date: Thu, 13 Feb 2025 07:50:42 -0800	[thread overview]
Message-ID: <69dc7277-7aa8-4091-8993-ff1195ef4c3a@intel.com> (raw)
In-Reply-To: <20241213095449.881-1-yan.y.zhao@intel.com>

On 12/13/24 01:54, Yan Zhao wrote:
> +	/*
> +	 * The destination addresses are searched from system RAM rather than
> +	 * being allocated from the buddy allocator, so they are not guaranteed
> +	 * to be accepted by the current kernel.  Accept the destination
> +	 * addresses before kexec swaps their content with the segments' source
> +	 * pages to avoid accessing memory before it is accepted.
> +	 */
> +	for (i = 0; i < nr_segments; i++)
> +		accept_memory(image->segment[i].mem, image->segment[i].memsz);

The "searched from system RAM" phrase both here and in the changelog
doesn't quite parse for me.

Also "System RAM" is the normal phrase that I use to describe the memory
that mostly ends up _going_ into the buddy allocator. It's not just me:

	cat /proc/iomem  | grep 'System RAM'

I think a more useful comment (and changelog) might be something like this:

	The core kernel focuses on accepting memory which is known to be
	System RAM. However, there might be areas that are reserved in
	the memory map, not exposed to the kernel as "System RAM" and
	not accepted by firmware. Accept the memory before kexec touches
	it.



  reply	other threads:[~2025-02-13 15:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13  9:49 [PATCH v2 0/1] Accept unaccepted kexec segments' destination addresses Yan Zhao
2024-12-13  9:54 ` [PATCH v2 1/1] kexec_core: " Yan Zhao
2025-02-13 15:50   ` Dave Hansen [this message]
2025-02-14 13:37     ` Kirill A. Shutemov
2025-02-19 23:16   ` Dave Hansen
2025-01-13 10:01 ` [PATCH v2 0/1] " Kirill A. Shutemov
2025-01-13 11:12   ` Baoquan He
2025-01-13 14:59     ` Eric W. Biederman
2025-01-14  3:26       ` Baoquan He
2025-01-14  7:04       ` Yan Zhao
2025-01-14 10:08       ` Kirill A. Shutemov
2025-02-13 15:55       ` Dave Hansen
2025-02-14 13:46         ` Kirill A. Shutemov
2025-02-14 16:20           ` Dave Hansen
2025-03-04  8:41             ` Kirill A. Shutemov
2025-03-04 18:49               ` Eric W. Biederman
2025-03-04 19:16                 ` Dave Hansen
2025-03-12 20:33                   ` Dave Hansen
2025-02-19 23:03           ` Jianxiong Gao
2025-02-20  2:27           ` Ashish Kalra
2025-03-04 23:43     ` Andrew Morton
2025-03-04 23:53       ` Andrew Morton
2025-03-04 23:54         ` Andrew Morton
2025-03-13 12:06         ` Kirill A. Shutemov

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=69dc7277-7aa8-4091-8993-ff1195ef4c3a@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bhe@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=x86@kernel.org \
    --cc=yan.y.zhao@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