mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: akpm@linux-foundation.org, ardb@kernel.org, bp@alien8.de,
	dave.hansen@linux.intel.com, graf@amazon.com,
	guoweikang.kernel@gmail.com, henry.willard@oracle.com,
	hpa@zytor.com, jbohac@suse.cz, joel.granados@kernel.org,
	linux-kernel@vger.kernel.org, mingo@redhat.com, noodles@fb.com,
	paul.x.webb@oracle.com, rppt@kernel.org, sohil.mehta@intel.com,
	sourabhjain@linux.ibm.com, stable@vger.kernel.org,
	tglx@linutronix.de, x86@kernel.org, yifei.l.liu@oracle.com
Subject: Re: [PATCH v2 1/3] ima: Add ima_validate_range() for previous kernel IMA buffer
Date: Wed, 31 Dec 2025 11:29:32 +0530	[thread overview]
Message-ID: <f103170b-a9d6-4c78-9159-8f87a535b0a6@oracle.com> (raw)
In-Reply-To: <29879a797996a14547c1274c45a4e7b824ab95d3.camel@linux.ibm.com>

Hi Mimi,

On 31/12/25 02:05, Mimi Zohar wrote:
> Hi Harshit,
> 

Thanks for reviewing.

> The subject line could be written at a higher level.  Perhaps base it on the
> ima_validate_range() function comment "verify a physical buffer lies in
> addressable RAM" (e.g. ima: verify the previous kernel's IMA buffer lies in
> addressable RAM).
>

Sure, will do. Thanks for the suggestion.

Regards,
Harshit

> On Mon, 2025-12-29 at 00:15 -0800, Harshit Mogalapalli wrote:
>> When the second-stage kernel is booted with a limiting command line
>> (e.g. "mem=<size>"), the IMA measurement buffer handed over from the
>> previous kernel may fall outside the addressable RAM of the new kernel.
>> Accessing such a buffer can fault during early restore.
>>
>> Introduce a small generic helper, ima_validate_range(), which verifies
>> that a physical [start, end] range for the previous-kernel IMA buffer
>> lies within addressable memory:
>> 	- On x86, use pfn_range_is_mapped().
>> 	- On OF based architectures, use page_is_ram().
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> 


  reply	other threads:[~2025-12-31  6:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29  8:15 [PATCH v2 0/3] Address page fault in ima_restore_measurement_list() Harshit Mogalapalli
2025-12-29  8:15 ` [PATCH v2 1/3] ima: Add ima_validate_range() for previous kernel IMA buffer Harshit Mogalapalli
2025-12-30 20:35   ` Mimi Zohar
2025-12-31  5:59     ` Harshit Mogalapalli [this message]
2025-12-29  8:15 ` [PATCH v2 2/3] of/kexec: refactor ima_get_kexec_buffer() to use ima_validate_range() Harshit Mogalapalli
2025-12-30 23:45   ` Mimi Zohar
2025-12-29  8:15 ` [PATCH v2 3/3] x86/kexec: Add a sanity check on previous kernel's ima kexec buffer Harshit Mogalapalli
2025-12-30 23:45   ` Mimi Zohar

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=f103170b-a9d6-4c78-9159-8f87a535b0a6@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=graf@amazon.com \
    --cc=guoweikang.kernel@gmail.com \
    --cc=henry.willard@oracle.com \
    --cc=hpa@zytor.com \
    --cc=jbohac@suse.cz \
    --cc=joel.granados@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=noodles@fb.com \
    --cc=paul.x.webb@oracle.com \
    --cc=rppt@kernel.org \
    --cc=sohil.mehta@intel.com \
    --cc=sourabhjain@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yifei.l.liu@oracle.com \
    --cc=zohar@linux.ibm.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

all inboxes | Powered by JetHome®