From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@lists.01.org
Subject: Re: [PATCH] ArmPkg/ArmMmuLib ARM: disregard high memory when setting permissions
Date: Mon, 14 Jan 2019 11:43:10 +0000 [thread overview]
Message-ID: <20190114114310.wsp74zeomthf6ora@bivouac.eciton.net> (raw)
In-Reply-To: <20190107065649.2003-1-ard.biesheuvel@linaro.org>
On Mon, Jan 07, 2019 at 07:56:49AM +0100, Ard Biesheuvel wrote:
> Ignore calls to ArmSetMemoryAttributes () when the region described
> is outside of the 32-bit addressable range. This memory is not
> mapped in the first place, and the current code does not deal with
> the high bits correctly, resulting in hangs.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
> index 3b3b20aa9b78..bffab83d4fd0 100644
> --- a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
> +++ b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c
> @@ -744,6 +744,10 @@ ArmSetMemoryAttributes (
> UINT64 ChunkLength;
> BOOLEAN FlushTlbs;
>
> + if (BaseAddress > (UINT64)MAX_ADDRESS - Length + 1) {
> + return EFI_UNSUPPORTED;
> + }
> +
> if (Length == 0) {
> return EFI_SUCCESS;
> }
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-01-14 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 6:56 [PATCH] ArmPkg/ArmMmuLib ARM: disregard high memory when setting permissions Ard Biesheuvel
2019-01-14 11:43 ` Leif Lindholm [this message]
2019-01-14 18:46 ` Ard Biesheuvel
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-list 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=20190114114310.wsp74zeomthf6ora@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/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