All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@codeblueprint.co.uk>
To: tglx@linutronix.de, peterz@infradead.org, arnd@arndb.de,
	mingo@kernel.org, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, hpa@zytor.com,
	ard.biesheuvel@linaro.org
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:efi/core] efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit
Date: Sun, 4 Dec 2016 14:17:46 +0000	[thread overview]
Message-ID: <20161204141746.GL20785@codeblueprint.co.uk> (raw)
In-Reply-To: <tip-018edcfac4c3b140366ad51b0907f3becb5bb624@git.kernel.org>

On Thu, 24 Nov, at 10:47:15PM, tip-bot for Ard Biesheuvel wrote:
> Commit-ID:  018edcfac4c3b140366ad51b0907f3becb5bb624
> Gitweb:     http://git.kernel.org/tip/018edcfac4c3b140366ad51b0907f3becb5bb624
> Author:     Ard Biesheuvel <ard.biesheuvel@linaro.org>
> AuthorDate: Thu, 24 Nov 2016 18:02:23 +0000
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Fri, 25 Nov 2016 07:15:23 +0100
> 
> efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit
> 
> The UEFI stub executes in the context of the firmware, which identity
> maps the available system RAM, which implies that only memory below
> 4 GB can be used for allocations on 32-bit architectures, even on [L]PAE
> capable hardware.
> 
> So ignore any reported memory above 4 GB in efi_random_alloc(). This
> also fixes a reported build problem on ARM under -Os, where the 64-bit
> logical shift relies on a software routine that the ARM decompressor does
> not provide.
> 
> A second [minor] issue is also fixed, where the '+ 1' is moved out of
> the shift, where it belongs: the reason for its presence is that a
> memory region where start == end should count as a single slot, given
> that 'end' takes the desired size and alignment of the allocation into
> account.
> 
> To clarify the code in this regard, rename start/end to 'first_slot' and
> 'last_slot', respectively, and introduce 'region_end' to describe the
> last usable address of the current region.
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-efi@vger.kernel.org
> Link: http://lkml.kernel.org/r/1480010543-25709-2-git-send-email-ard.biesheuvel@linaro.org
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  drivers/firmware/efi/libstub/random.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)

Ard, was this picked up for the correct tip branch? If it fixes a
build failure it should have gone into tip/efi/urgent, right?

  reply	other threads:[~2016-12-04 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 18:02 [GIT PULL] one more EFI patch for v4.10 Ard Biesheuvel
2016-11-24 18:02 ` Ard Biesheuvel
2016-11-24 18:02 ` [PATCH] efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit Ard Biesheuvel
2016-11-25  6:47   ` [tip:efi/core] " tip-bot for Ard Biesheuvel
2016-12-04 14:17     ` Matt Fleming [this message]
2016-12-04 14:31       ` Ard Biesheuvel
2016-12-04 21:38         ` Matt Fleming
2016-12-05  9:01           ` 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-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=20161204141746.GL20785@codeblueprint.co.uk \
    --to=matt@codeblueprint.co.uk \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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.