Re: kallsyms failure: relative symbol value 0xffffffff810002a0 out of range in relative mode

2016-03-19 Thread Ard Biesheuvel
On 17 March 2016 at 12:01, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 17 March 2016 at 08:14, Markus Trippelsdorf <mar...@trippelsdorf.de> wrote: >> On 2016.03.17 at 08:03 +0100, Ard Biesheuvel wrote: >>> On 16 March 2016 at 22:25, Markus Trippe

Re: [PATCH] x86/kallsyms: fix GOLD link failure with new relative kallsyms table format

2016-03-19 Thread Ard Biesheuvel
(+ Markus) On 18 March 2016 at 10:04, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > Commit 2213e9a66bb8 ("kallsyms: add support for relative offsets in > kallsyms address table") changed the default kallsyms symbol table format > to use relative references rathe

Re: kallsyms failure: relative symbol value 0xffffffff810002a0 out of range in relative mode

2016-03-19 Thread Ard Biesheuvel
On 17 March 2016 at 12:17, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 17 March 2016 at 12:01, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: >> On 17 March 2016 at 08:14, Markus Trippelsdorf <mar...@trippelsdorf.de> >> wrote: >>> On 2016.

[PATCH v2 0/9] EFI framebuffer support for ARM and arm64

2016-03-19 Thread Ard Biesheuvel
) - use true/false rather than 1/0 - split stub changes into 32-bit arm/64-bit arm/common arm - split platform device changes from platform driver changes (latter is basically only a Kconfig change) Ard Biesheuvel (9): efi/x86: prepare GOP handling code for reuse as generic code efi: libstub

[PATCH v2 8/9] efi/arm*: wire up struct screen_info to efi-framebuffer platform device

2016-03-19 Thread Ard Biesheuvel
is reserved and marked MEMBLOCK_NOMAP. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/arm-init.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index acd44de30504..f5f13b

[PATCH v2 4/9] efi: efifb: use builtin_platform_driver and drop unused includes

2016-03-19 Thread Ard Biesheuvel
Since efifb can only be built directly into the kernel, drop the module specific includes and definitions. Drop some other includes we don't need as well. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/video/fbdev/efifb.c | 6 +- 1 file changed, 1 insertion

[PATCH v2 6/9] efi/arm: libstub: make screen_info accessible to the UEFI stub

2016-03-19 Thread Ard Biesheuvel
in the context of the decompressor, and cannot access the kernel's copy of struct screen_info directly. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm/include/asm/efi.h| 3 ++ arch/arm/kernel/setup.c | 3 +- drivers/firmware/efi/arm-

Re: [PATCH] arm64: handle unmapped pages in initrd relocation

2016-03-23 Thread Ard Biesheuvel
at beginning and end >> of the initrd image and if seen, relocated the initrd to a new area >> completely covered by the kernel linear map. >> >> Signed-off-by: Mark Salter <msal...@redhat.com> >> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> >> --- > &

Re: [PATCH 2/4] efi: Capsule update support

2016-03-21 Thread Ard Biesheuvel
ob to be sent to the > firmware despite the fact that UpdateCapsule() takes a 'CapsuleCount' > parameter. This simplifies the API and shouldn't result in any > downside since it is still possible to send multiple capsules by > repeatedly calling UpdateCapsule(). > > Cc: Kweh Hock Leong <hock.l

Re: [PATCH 1/4] efi: Move efi_status_to_err() to drivers/firmware/efi/

2016-03-21 Thread Ard Biesheuvel
; Cc: Kweh Hock Leong <hock.leong.k...@intel.com> > Cc: Borislav Petkov <b...@alien8.de> > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> > Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> Acked-by: Ard Biesheuvel <ard.biesheu.

[PATCH v2 1/9] efi/x86: prepare GOP handling code for reuse as generic code

2016-03-19 Thread Ard Biesheuvel
that the generic version uses slightly different ways of casting the protocol methods and some other variables to the correct types, since such method calls are not loosely typed on ARM and arm64 as they are on x86. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/comp

Re: [PATCH v15 1/6] efi: ARM/arm64: ignore DT memory nodes instead of removing them

2016-03-19 Thread Ard Biesheuvel
On 18 March 2016 at 13:26, Matt Fleming <m...@codeblueprint.co.uk> wrote: > On Tue, 08 Mar, at 03:59:42PM, David Daney wrote: >> From: Ard Biesheuvel <ard.biesheu...@linaro.org> >> >> There are two problems with the UEFI stub DT memory node removal >> routine

Re: [PATCH 09/13] efi/arm64: Check for h/w support before booting a >4 KB granule kernel

2016-03-07 Thread Ard Biesheuvel
On 7 March 2016 at 18:02, Matt Fleming <m...@codeblueprint.co.uk> wrote: > On Sun, 06 Mar, at 04:35:32AM, Ard Biesheuvel wrote: >> >> Hi Matt, >> >> This patch turned up in -next with 'granule' replaced with 'granular', >> both in the commit log and

Re: [PATCH 4.4 34/74] arm64: vmemmap: use virtual projection of linear region

2016-03-08 Thread Ard Biesheuvel
On 8 March 2016 at 07:02, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > Please hold off on this one. We are seeing some breakage on 64k pages systems > ------ > >

Re: [PATCH 4.4 34/74] arm64: vmemmap: use virtual projection of linear region

2016-03-08 Thread Ard Biesheuvel
On 8 March 2016 at 20:44, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Tue, Mar 08, 2016 at 05:40:14PM +0700, Ard Biesheuvel wrote: >> On 8 March 2016 at 07:02, Greg Kroah-Hartman <gre...@linuxfoundation.org> >> wrote: >> > 4.4-stable review

Re: [PATCH v3 1/2] arm64/efi: report unexpected errors when determining Secure Boot status

2016-03-03 Thread Ard Biesheuvel
priate action if > an expected error is returned. > > Signed-off-by: Linn Crosetto <l...@hpe.com> Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org> > --- > v2: > - Maintain existing behavior to allow 'dtb=' parameter only when UEFI >Secure Boot is disabl

Re: [PATCH v3 2/2] arm64/efi: check SetupMode when determining Secure Boot status

2016-03-04 Thread Ard Biesheuvel
Linn Crosetto <l...@hpe.com> Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org> > --- > v2: > - Reformat quote from UEFI specification and note cleanup (Mark Rutland) > - Restructure code on top of changes in patch 1/2 > > drivers/firmware/efi/libstub/a

Re: [PATCH 09/13] efi/arm64: Check for h/w support before booting a >4 KB granule kernel

2016-03-05 Thread Ard Biesheuvel
On 17 February 2016 at 13:36, Matt Fleming <m...@codeblueprint.co.uk> wrote: > From: Ard Biesheuvel <ard.biesheu...@linaro.org> > > A kernel built with support for a page size that is not supported by the > hardware it runs on cannot boot to a state where it can

Re: [PATCH v2 1/2] arm64/efi: report unexpected errors when determining Secure Boot status

2016-03-03 Thread Ard Biesheuvel
Hi Linn, Apologies for the delay in reviewing this. On 26 February 2016 at 01:18, Linn Crosetto wrote: > Certain code in the boot path may require the ability to determine whether > UEFI Secure Boot is definitely enabled, for example printing status to the > console. Other code

Re: [PATCH v13 4/6] arm64: Move unflatten_device_tree() call earlier.

2016-03-03 Thread Ard Biesheuvel
On 3 March 2016 at 17:33, David Daney wrote: > On 03/03/2016 05:47 AM, Rob Herring wrote: >> >> On Wed, Mar 2, 2016 at 4:56 PM, David Daney wrote: >>> >>> From: David Daney >>> >>> In order to extract NUMA information

[PATCH] memremap: check pfn validity before passing to pfn_to_page()

2016-03-05 Thread Ard Biesheuvel
__va() and pfn_to_page() should only ever be called on PFNs/physical addresses for which pfn_valid() returns true, so add that check to try_ram_remap(). Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- kernel/memremap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH 2/4] efi: Capsule update support

2016-03-29 Thread Ard Biesheuvel
On 29 March 2016 at 14:26, Matt Fleming wrote: > On Mon, 21 Mar, at 08:31:59PM, Matt Fleming wrote: >> >> Good question. They're not handled in any special way with this patch >> series, so the firmware will just initiate its own reset inside of >> UpdateCapsule(). >> >>

Re: [PATCH] kallsyms: ignore ARM mode switching veneers

2016-04-01 Thread Ard Biesheuvel
On 26 February 2016 at 21:21, Arnd Bergmann <a...@arndb.de> wrote: > On Friday 26 February 2016 20:50:54 Ard Biesheuvel wrote: >> On ARM, the linker may emit veneers to deal with relative branch >> instructions that appear too far away from their targets. Since the second >

Re: [PATCH v8] acpi, apei, arm64: APEI initial support for aarch64.

2016-03-30 Thread Ard Biesheuvel
On 29 March 2016 at 09:44, wrote: > From: Tomasz Nowicki > > This commit provides APEI arch-specific bits for aarch64 > > Meanwhile, > (1)add a new subfunction "hest_ia32_init" for > "acpi_disable_cmcff" which is used by IA-32 Architecture >

Re: [PATCH v16 1/6] efi: ARM/arm64: ignore DT memory nodes instead of removing them

2016-04-14 Thread Ard Biesheuvel
On 14 April 2016 at 13:02, Steve Capper <steve.cap...@arm.com> wrote: > On Fri, Apr 08, 2016 at 03:50:23PM -0700, David Daney wrote: >> From: Ard Biesheuvel <ard.biesheu...@linaro.org> >> >> There are two problems with the UEFI stub DT memory node removal

Re: [PATCHv3 1/5] efi/runtime-wrappers: detect FW irq flag corruption

2016-04-25 Thread Ard Biesheuvel
On 25 April 2016 at 16:15, Matt Fleming wrote: > On Mon, 25 Apr, at 03:12:01PM, Robin Murphy wrote: >> >+static void efi_call_virt_check_flags(unsigned long flags, const char >> >*call) >> >+{ >> >+unsigned long cur_flags; >> >+bool mismatch; >> >+ >> >+

Re: [PATCHv2 5/5] efi/runtime-wrappers: detect FW irq flag corruption

2016-04-21 Thread Ard Biesheuvel
r_err_ratelimited(FW_BUG "IRQ flags corrupted (0x%08lx=>0x%08lx) by > EFI %s\n", > + flags, cur_flags, call); > + local_irq_restore(flags); > +} > + > /* > * According to section 7.1 of the UEFI spec, Runtime Services are not fully > * reentrant, and there are particular combinations of calls that need to be Other than that, this series looks fine to me. With the above fixed: For the series (except the x86 patch) Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>

Re: [PATCHv2 0/6] efi: detect erroneous firmware IRQ manipulation

2016-04-22 Thread Ard Biesheuvel
On 22 April 2016 at 15:51, Mark Rutland wrote: > Some firmware erroneously unmask IRQs (and potentially other architecture > specific exceptions) during runtime services functions, in violation of both > common sense and the UEFI specification. This can result in a number of

Re: [PATCH] arm64: Relocate screen_info.lfb_base on PCI BAR allocation

2016-04-29 Thread Ard Biesheuvel
On 29 April 2016 at 15:41, Bjorn Helgaas wrote: > On Thu, Apr 28, 2016 at 11:39:35PM +0200, Alexander Graf wrote: >> On 28.04.16 20:06, Bjorn Helgaas wrote: >> > On Thu, Apr 28, 2016 at 06:41:42PM +0200, Alexander Graf wrote: >> >> On 04/28/2016 06:20 PM, Bjorn Helgaas wrote:

Re: efi_enabled(EFI_PARAVIRT) use

2016-04-29 Thread Ard Biesheuvel
On 29 April 2016 at 16:39, Matt Fleming wrote: > On Fri, 29 Apr, at 11:34:45AM, Stefano Stabellini wrote: >> On Fri, 29 Apr 2016, Ingo Molnar wrote: >> > Also, it would be nice to have all things EFI in a single tree, the >> > conflicts are >> > going to be painful!

Re: [PATCH] block: partitions: efi: Always check for alternative GPT at end of drive

2016-04-27 Thread Ard Biesheuvel
On 26 April 2016 at 22:34, Elliott, Robert (Persistent Memory) wrote: > > >> -Original Message- >> From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- >> ow...@vger.kernel.org] On Behalf Of Davidlohr Bueso >> Sent: Tuesday, April 26, 2016 1:34 PM >> To: Karel

Re: [PATCHv2 0/6] efi: detect erroneous firmware IRQ manipulation

2016-04-25 Thread Ard Biesheuvel
(+ Laszlo) On 25 April 2016 at 12:15, Matt Fleming wrote: > On Sun, 24 Apr, at 10:22:41PM, Matt Fleming wrote: >> >> I like this series a lot (well, ignoring the fact that the firmware is >> trying to eat itself). The runtime call code is much cleaner now, and >> this

Re: [PATCH] arm64: Relocate screen_info.lfb_base on PCI BAR allocation

2016-04-29 Thread Ard Biesheuvel
> On 29 apr. 2016, at 22:06, Bjorn Helgaas <helg...@kernel.org> wrote: > >> On Fri, Apr 29, 2016 at 03:51:49PM +0200, Ard Biesheuvel wrote: >>> On 29 April 2016 at 15:41, Bjorn Helgaas <helg...@kernel.org> wrote: >>>> On Thu, Apr 28, 2

Re: [PATCH V7 00/11] Support for generic ACPI based PCI host controller

2016-05-20 Thread Ard Biesheuvel
On 20 May 2016 at 06:41, Jon Masters wrote: > Hi Tomasz, all, > > On 05/11/2016 07:08 AM, Tomasz Nowicki wrote: > >> On 11.05.2016 12:41, Gabriele Paoloni wrote: > v6 -> v7 - drop quirks handling >>> >>> Maybe I missed something in the v6 discussion thread; when was it

Re: [PATCH V7 00/11] Support for generic ACPI based PCI host controller

2016-05-20 Thread Ard Biesheuvel
On 20 May 2016 at 10:01, Jon Masters <j...@redhat.com> wrote: > Hi Ard, > > On 05/20/2016 03:37 AM, Ard Biesheuvel wrote: >> On 20 May 2016 at 06:41, Jon Masters <j...@redhat.com> wrote: >>> Hi Tomasz, all, >>> >>> On 05/11/2016 07:08

Re: [PATCH V7 00/11] Support for generic ACPI based PCI host controller

2016-05-20 Thread Ard Biesheuvel
On 20 May 2016 at 10:40, Gabriele Paoloni <gabriele.paol...@huawei.com> wrote: > Hi Ard > >> -Original Message- >> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] [...] >> >> Is the PCIe root complex so special that you cannot

Re: [PATCH 1/2] Create UV efi_call macros

2016-05-12 Thread Ard Biesheuvel
On 12 May 2016 at 08:46, Ingo Molnar wrote: > > * Alex Thorlton wrote: > >> +#define efi_call_virt(f, args...)\ >> +({ \ >> + efi_status_t __s;

Re: [PATCH] x86/extable: ensure entries are swapped completely when sorting

2016-05-10 Thread Ard Biesheuvel
t; Signed-off-by: Mathias Krause <mini...@googlemail.com> > Cc: Andrew Morton <a...@linux-foundation.org> > Cc: Andy Lutomirski <l...@kernel.org> > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> > Cc: Borislav Petkov <b...@suse.de> > Cc: H. Peter Anvin <

Re: [tip:efi/core] efibc: Add EFI Bootloader Control module

2016-05-01 Thread Ard Biesheuvel
On 29 April 2016 at 11:53, Ingo Molnar wrote: > > * tip-bot for Compostella, Jeremy wrote: > >> Commit-ID: 06f7d4a1618dbb086e738c93cd1ef416ab01027d >> Gitweb: >> http://git.kernel.org/tip/06f7d4a1618dbb086e738c93cd1ef416ab01027d >> Author:

Re: [PATCH v16 1/6] efi: ARM/arm64: ignore DT memory nodes instead of removing them

2016-04-15 Thread Ard Biesheuvel
On 15 April 2016 at 16:03, Will Deacon <will.dea...@arm.com> wrote: > On Fri, Apr 08, 2016 at 03:50:23PM -0700, David Daney wrote: >> From: Ard Biesheuvel <ard.biesheu...@linaro.org> >> >> There are two problems with the UEFI stub DT memory node removal

Re: [PATCH resend 0/3] mm: allow arch to override lowmem_page_address

2016-04-18 Thread Ard Biesheuvel
On 18 April 2016 at 18:04, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > These patches allow the arch to define the page_to_virt() conversion that > is used in lowmem_page_address(). This is desirable for arm64, where this > conversion is trivial when CONFIG_SPARSEMEM_VME

[PATCH resend 3/3] mm: replace open coded page to virt conversion with page_to_virt()

2016-04-18 Thread Ard Biesheuvel
equivalent to this default definition, so by itself this patch is a no-op. Acked-by: Will Deacon <will.dea...@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- include/linux/mm.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/linux/mm

[PATCH resend 2/3] openrisc: drop wrongly typed definition of page_to_virt()

2016-04-18 Thread Ard Biesheuvel
To align with generic code and other architectures that expect the macro page_to_virt to produce an expression whose type is 'void*', drop the arch specific definition, which is never referenced anyway. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/openrisc/inclu

[PATCH resend 0/3] mm: allow arch to override lowmem_page_address

2016-04-18 Thread Ard Biesheuvel
one is defunct and the other is subscriber only. Andrew, is this something you would be pulling to pick up (assuming that you agree with the contents)? Thanks. Ard Biesheuvel (3): nios2: use correct void* return type for page_to_virt() openrisc: drop wrongly typed definition of page_to_virt

[PATCH resend 1/3] nios2: use correct void* return type for page_to_virt()

2016-04-18 Thread Ard Biesheuvel
unused (page_to_bus) Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/nios2/include/asm/io.h | 1 - arch/nios2/include/asm/page.h| 2 +- arch/nios2/include/asm/pgtable.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/nios2/include/asm/

Re: [PATCH] arm64: mm: take CWG into account in __inval_cache_range()

2016-04-19 Thread Ard Biesheuvel
On 19 April 2016 at 14:56, Mark Rutland <mark.rutl...@arm.com> wrote: > Hi, > > On Tue, Apr 19, 2016 at 12:29:33PM +0200, Ard Biesheuvel wrote: >> Currently, the arm64 implementation of __inval_cache_range() [aka >> __dma_inv_range()] takes CTR_EL0.Dminline in

Re: [PATCH] arm64: mm: take CWG into account in __inval_cache_range()

2016-04-19 Thread Ard Biesheuvel
On 19 April 2016 at 16:13, Catalin Marinas <catalin.mari...@arm.com> wrote: > On Tue, Apr 19, 2016 at 03:08:27PM +0200, Ard Biesheuvel wrote: >> On 19 April 2016 at 14:56, Mark Rutland <mark.rutl...@arm.com> wrote: >> > Is sharing a CWG broken by design, or is

Re: [PATCH] arm64: mm: take CWG into account in __inval_cache_range()

2016-04-19 Thread Ard Biesheuvel
On 19 April 2016 at 17:32, Catalin Marinas <catalin.mari...@arm.com> wrote: > On Tue, Apr 19, 2016 at 04:48:32PM +0200, Ard Biesheuvel wrote: >> On 19 April 2016 at 16:13, Catalin Marinas <catalin.mari...@arm.com> wrote: >> > The best we could do is to warn if ARCH_DM

[PATCH 1/8] arm64: kernel: don't export local symbols from head.S

2016-04-18 Thread Ard Biesheuvel
This unexports some symbols from head.S that are only used locally. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/head.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S

[PATCH 3/8] arm64: kernel: perform relocation processing from ID map

2016-04-18 Thread Ard Biesheuvel
the awkward 'adr_l lr' and 'b cpu_setup' sequence with a simple branch and link. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/head.S| 96 +++- arch/arm64/kernel/vmlinux.lds.S | 7 +- 2 files changed, 55 insertions(+), 48 deletions(-)

[PATCH 0/8] arm64: kaslr cleanups and improvements

2016-04-18 Thread Ard Biesheuvel
/gmane.linux.ports.arm.kernel/490216 Ard Biesheuvel (8): arm64: kernel: don't export local symbols from head.S arm64: kernel: use literal for relocated address of __secondary_switched arm64: kernel: perform relocation processing from ID map arm64: introduce mov_q macro to move a constant into a 64-bit register

[PATCH 5/8] arm64: kernel: replace early 64-bit literal loads with move-immediates

2016-04-18 Thread Ard Biesheuvel
to make, it is better to switch to movk/movz sequences, since these are guaranteed to be resolved at link time, simply because there are no dynamic relocation types to describe them. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/head.S | 8 1 file chan

[PATCH 6/8] arm64: don't map TEXT_OFFSET bytes below the kernel if we can avoid it

2016-04-18 Thread Ard Biesheuvel
of the kernel Image, we can drop its definition from image.h and opencode its calculation. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/head.S | 9 + arch/arm64/kernel/image.h | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH 4/8] arm64: introduce mov_q macro to move a constant into a 64-bit register

2016-04-18 Thread Ard Biesheuvel
Implement a macro mov_q that can be used to move an immediate constant into a 64-bit register, using between 2 and 4 movz/movk instructions (depending on the operand) Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/include/asm/assembler.h | 20 +

[PATCH 2/8] arm64: kernel: use literal for relocated address of __secondary_switched

2016-04-18 Thread Ard Biesheuvel
a small __secondary_switch() function covered by the ID map that performs the literal load and branch-to-register. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/head.S | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch

Re: [PATCH v2 1/2] efi: Iterate over efi.memmap in for_each_efi_memory_desc

2016-04-14 Thread Ard Biesheuvel
eed. > > This change goes part of the way toward deleting the global 'memmap' > variable, which is not universally available on all architectures > (notably ia64) and is rather poorly named. > > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> > Cc: Mark Salter <msal.

Re: [PATCH v2 2/2] efi: Remove global 'memmap'

2016-04-14 Thread Ard Biesheuvel
her > confusing. > > Furthermore, ia64 doesn't even provide this global object, which has > caused issues when trying to write generic EFI memmap code. > > Replace all occurrences with efi.memmap, and convert the remaining > iterator code to use for_each_efi_mem_desc(). > > Cc:

[PATCH 7/8] arm64: relocatable: deal with physically misaligned kernel images

2016-04-18 Thread Ard Biesheuvel
to deal with that. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/arm64/kernel/head.S | 9 ++--- arch/arm64/kernel/kaslr.c | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index c5e5ed

[PATCH 8/8] arm64: kaslr: increase randomization granularity

2016-04-18 Thread Ard Biesheuvel
allows for 5 bits of additional entropy to be used. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/libstub/arm64-stub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/fi

[PATCH] arm64: mm: take CWG into account in __inval_cache_range()

2016-04-19 Thread Ard Biesheuvel
that are larger than Dminline to be evicted at any level of the cache hierarchy. So introduce a macro cache_cwg_size to retrieve the CWG value, and use it to clean as many cachelines as required on either end of the [start, end) interval. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> ---

Re: [PATCH] mm/memblock: move memblock_{add,reserve}_region into memblock_{add,reserve}

2016-04-18 Thread Ard Biesheuvel
region() and memblock_reserve_region() anyway will be > inlined, there will not be functional changes, but will improve code > readability > a little. > > Signed-off-by: Alexander Kuleshov <kuleshovm...@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> >

Re: [PATCH] efi: ARM: avoid warning about phys_addr_t cast

2016-04-18 Thread Ard Biesheuvel
typecast to avoid the warning > > Signed-off-by: Arnd Bergmann <a...@arndb.de> > Fixes: 500899c2cc3e ("efi: ARM/arm64: ignore DT memory nodes instead of > removing them") Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> > --- > drivers/firmware/

Re: [PATCH] arm64: Add config to limit user space to 47bits

2016-07-13 Thread Ard Biesheuvel
On 13 July 2016 at 17:42, Alexander Graf wrote: > Some user space applications are known to break with 48 bits virtual known by whom? At least I wasn't aware of it, so could you please share some examples? > address space. As interim step until the world is healed and everyone >

Re: [PATCH] arm64: Add config to limit user space to 47bits

2016-07-14 Thread Ard Biesheuvel
On 13 July 2016 at 18:14, Alexander Graf <ag...@suse.de> wrote: > On 07/13/2016 05:59 PM, Ard Biesheuvel wrote: >> >> On 13 July 2016 at 17:42, Alexander Graf <ag...@suse.de> wrote: >>> >>> Some user space applications are known to break with 48 bits v

Re: [PATCH v3] drm/nouveau/fb/nv50: set DMA mask before mapping scratch page

2016-07-14 Thread Ard Biesheuvel
On 7 July 2016 at 18:59, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > The 100c08 scratch page is mapped using dma_map_page() before the TTM > layer has had a chance to set the DMA mask. This means we are still > running with the default of 32 when this code executes,

Re: [PATCH] arm64: fix address fault during mapping fdt region

2016-08-01 Thread Ard Biesheuvel
On 1 August 2016 at 11:42, zijun_hu wrote: > From 07b9216ec3494515e7a6c41e0333eb8782427db3 Mon Sep 17 00:00:00 2001 > From: zijun_hu > Date: Mon, 1 Aug 2016 17:04:59 +0800 > Subject: [PATCH] arm64: fix address fault during mapping fdt region > >

Re: [PATCH v3 3/4] arm64: kaslr: Fix incorrect placement of __initdata and __read_mostly

2016-08-15 Thread Ard Biesheuvel
On 15 August 2016 at 07:57, Jisheng Zhang <jszh...@marvell.com> wrote: > Hi Ard, > > On Mon, 15 Aug 2016 12:52:14 +0800 Jisheng Zhang wrote: > >> Hi Ard, >> >> On Fri, 12 Aug 2016 14:02:40 +0200 Ard Biesheuvel wrote: >> >> > Hi Jisheng, >&g

Re: [PATCH v3 3/4] arm64: kaslr: Fix incorrect placement of __initdata and __read_mostly

2016-08-12 Thread Ard Biesheuvel
Hi Jisheng, On 12 August 2016 at 10:01, Jisheng Zhang wrote: > __initdata and __read_mostly should be placed after the variable name > for the variable to be placed in the intended section. > Why? > Signed-off-by: Jisheng Zhang > --- >

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-13 Thread Ard Biesheuvel
On 13 July 2016 at 09:36, Russell King - ARM Linux wrote: > On Wed, Jul 13, 2016 at 02:59:51PM +1000, Stewart Smith wrote: >> Russell King - ARM Linux writes: >> > On Tue, Jul 12, 2016 at 10:58:05PM +0200, Petr Tesarik wrote: >> >> I'm not an expert

Re: [Nouveau] [PATCH v3] drm/nouveau/fb/nv50: set DMA mask before mapping scratch page

2016-07-15 Thread Ard Biesheuvel
On 15 July 2016 at 07:52, Alexandre Courbot <gnu...@gmail.com> wrote: > On Fri, Jul 8, 2016 at 1:59 AM, Ard Biesheuvel > <ard.biesheu...@linaro.org> wrote: >> The 100c08 scratch page is mapped using dma_map_page() before the TTM >> layer has had a chance to s

Re: [RFC PATCH v2] drm/nouveau/fb/nv50: set DMA mask before mapping scratch page

2016-06-28 Thread Ard Biesheuvel
On 21 June 2016 at 14:50, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > The 100c08 scratch page is mapped using dma_map_page() before the TTM > layer has had a chance to set the DMA mask. This means we are still > running with the default of 32 when this code executes,

Re: [PATCH 03/11] efi: Refactor efi_memmap_init_early() into arch-neutral code

2016-07-04 Thread Ard Biesheuvel
> On 4 jul. 2016, at 20:19, Matt Fleming <m...@codeblueprint.co.uk> wrote: > >> On Fri, 24 Jun, at 01:44:48PM, Ard Biesheuvel wrote: >> >> This assignment breaks the calculation of mapsize in >> arm_enable_runtime_services(), so you should probably fold t

[PATCH v3] drm/nouveau/fb/nv50: set DMA mask before mapping scratch page

2016-07-07 Thread Ard Biesheuvel
the dma_map_page() to the .init hook, and set the streaming DMA mask based on the MMU subdev parameters before performing the call. Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- I am sure there is a much better way to address this, but this fixes the problem I get on AMD S

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-09 Thread Ard Biesheuvel
On 9 July 2016 at 04:22, Laura Abbott wrote: > On 07/06/2016 03:25 PM, Kees Cook wrote: >> >> Hi, >> >> This is a start of the mainline port of PAX_USERCOPY[1]. After I started >> writing tests (now in lkdtm in -next) for Casey's earlier port[2], I >> kept tweaking things

Re: [RFC PATCH v4 3/5] PCI: Check platform specific ECAM quirks

2016-07-22 Thread Ard Biesheuvel
On 22 July 2016 at 13:38, Robert Richter <r...@kernel.org> wrote: > On 29.06.16 15:56:50, Ard Biesheuvel wrote: >> On 29 June 2016 at 15:34, Christopher Covington <c...@codeaurora.org> wrote: >> > Hi Tomasz, >> > >> > On 06/29/2016 06:48 AM, Toma

Re: [RFC PATCH v4 3/5] PCI: Check platform specific ECAM quirks

2016-06-29 Thread Ard Biesheuvel
On 29 June 2016 at 15:34, Christopher Covington wrote: > Hi Tomasz, > > On 06/29/2016 06:48 AM, Tomasz Nowicki wrote: >> On 28.06.2016 18:12, Duc Dang wrote: >>> On Tue, Jun 28, 2016 at 6:04 AM, Christopher Covington >>> wrote: Hi Tomasz, >

Re: [RFC PATCH v4 3/5] PCI: Check platform specific ECAM quirks

2016-06-29 Thread Ard Biesheuvel
On 29 June 2016 at 15:52, Tomasz Nowicki wrote: > On 29.06.2016 15:34, Christopher Covington wrote: >> >> I'm confused by this statement. OEMID is defined as 6 bytes long and OEM >> Table ID as 8 bytes long in the ACPI specification. As far as I can >> tell, if your string

Re: [PATCH] arm: module-plts: improve algorithm for counting PLTs

2016-08-16 Thread Ard Biesheuvel
(+ Dave) Hello Jongsung, On 16 August 2016 at 14:55, Jongsung Kim wrote: > Current count_plts() uses O(n^2) algorithm for counting distinct > PLTs. It's good and fast enough when handling relatively small > number of relocs. But the time for counting grows so fast by its >

Re: Build failure with v4.9-rc1 and GCC trunk -- compiler weirdness

2017-02-01 Thread Ard Biesheuvel
On 1 February 2017 at 20:34, Joe Perches <j...@perches.com> wrote: > On Wed, 2017-02-01 at 19:53 +0000, Ard Biesheuvel wrote: >> On 1 February 2017 at 19:49, Joe Perches <j...@perches.com> wrote: > [] >> > Or maybe add a BUILD_BUG_ON something like:

Re: [PATCH] log2: make order_base_2() behave correctly on const input value zero

2017-02-02 Thread Ard Biesheuvel
> On 2 Feb 2017, at 20:49, Linus Torvalds <torva...@linux-foundation.org> wrote: > > On Thu, Feb 2, 2017 at 9:04 AM, Ard Biesheuvel > <ard.biesheu...@linaro.org> wrote: >> >> So update order_base_2() to adhere to its own documented interface. > &g

Re: [REGRESSION][v4.9.y][v4.10.y] x86/efi: Only map RAM into EFI page tables if in mixed-mode

2017-02-02 Thread Ard Biesheuvel
On 2 February 2017 at 20:17, Joseph Salisbury wrote: > Hi Matt, > > A kernel bug report was opened against Ubuntu [0]. After a kernel > bisect, it was found that reverting the following commit resolved this bug: > > commit 1297667083d5442aafe3e337b9413bf02b114edb

Re: [PATCH 6/7] efi: Handle secure boot from UEFI-2.6 [ver #7]

2017-02-02 Thread Ard Biesheuvel
> On 2 Feb 2017, at 21:36, Matt Fleming <m...@codeblueprint.co.uk> wrote: > >> On Wed, 01 Feb, at 03:02:14PM, Ard Biesheuvel wrote: >> >> Let's wait for Matt to comment on the x86 bits before reissuing >> anything, but if the subsequent patches s

Re: [PATCH 7/7] efi: Print the secure boot status in x86 setup_arch() [ver #7]

2017-02-03 Thread Ard Biesheuvel
On 3 February 2017 at 16:29, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 3 February 2017 at 16:29, David Howells <dhowe...@redhat.com> wrote: >> David Howells <dhowe...@redhat.com> wrote: >> >>> Ard Biesheuvel <ard.biesheu...@linaro.org> w

Re: Build failure with v4.9-rc1 and GCC trunk -- compiler weirdness

2017-02-02 Thread Ard Biesheuvel
On 1 February 2017 at 21:50, Laura Abbott <labb...@redhat.com> wrote: > On 02/01/2017 09:36 AM, Ard Biesheuvel wrote: >> On 1 February 2017 at 16:58, Laura Abbott <labb...@redhat.com> wrote: >>> On 10/19/2016 09:22 AM, Will Deacon wrote: >>>> On We

Re: modversions: redefine kcrctab entries as 32-bit values

2017-02-03 Thread Ard Biesheuvel
On 3 February 2017 at 05:09, Jessica Yu <j...@redhat.com> wrote: > +++ Jessica Yu [02/02/17 22:54 -0500]: >> >> +++ Ard Biesheuvel [24/01/17 16:16 +]: >>> >>> This v4 is a followup to [0] 'modversions: redefine kcrctab entries as >>> relative C

Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler

2017-02-01 Thread Ard Biesheuvel
On 1 February 2017 at 09:07, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 27 January 2017 at 10:52, Will Deacon <will.dea...@arm.com> wrote: >> On Fri, Jan 27, 2017 at 10:43:16AM +, Ard Biesheuvel wrote: >>> On 27 January 2017 at 10:40, Matthias Bru

Re: [PATCH 6/7] efi: Handle secure boot from UEFI-2.6 [ver #7]

2017-02-01 Thread Ard Biesheuvel
On 31 January 2017 at 18:59, David Howells <dhowe...@redhat.com> wrote: > Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > >> > UEFI-2.6 adds a new variable, DeployedMode. If it exists, this must be 1 >> > if we're to engage lockdown mode. >> > &g

Re: [PATCH] crypto: arm64/crc32 - detect crc32 support in assembler

2017-02-01 Thread Ard Biesheuvel
On 27 January 2017 at 10:52, Will Deacon <will.dea...@arm.com> wrote: > On Fri, Jan 27, 2017 at 10:43:16AM +0000, Ard Biesheuvel wrote: >> On 27 January 2017 at 10:40, Matthias Brugger <mbrug...@suse.com> wrote: >> > Older compilers may not be able to detect the crc32

[PATCH 05/10] x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE

2017-01-31 Thread Ard Biesheuvel
rakhya <sai.praneeth.prak...@intel.com> Cc: "Lee, Chun-Yi" <j...@suse.com> Cc: Borislav Petkov <b...@alien8.de> Cc: Ricardo Neri <ricardo.n...@intel.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: Ravi Shankar <ravi.v.shan...@intel.com> Cc: Fenghua Yu &

[PATCH 10/10] efi: libstub: Preserve .debug sections after absolute relocation check

2017-01-31 Thread Ard Biesheuvel
sections in place. Note that these sections may refer to ksymtab/kcrctab contents, so leave those in place as well. Cc: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/firmware/efi/libstub/Makefile | 24

[PATCH 09/10] efi/x86: Add debug code to print cooked memmap

2017-01-31 Thread Ard Biesheuvel
...@gmail.com> Tested-by: Nicolai Stange <nicsta...@gmail.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/platform/efi/efi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 0d4becfc

[PATCH 08/10] efi/x86: Move EFI BGRT init code to early init code

2017-01-31 Thread Ard Biesheuvel
> Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> Cc: Len Brown <l...@kernel.org> Cc: linux-a...@vger.kernel.org Tested-by: Bhupesh Sharma <bhsha...@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/kernel/acpi/boot.c

[PATCH 07/10] efi: Use typed function pointers for runtime services table

2017-01-31 Thread Ard Biesheuvel
ed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- include/linux/efi.h | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/include/linux/efi.h b/include/linux/efi.h index b17f73113bd2..8c6e007a5408 100644 --- a/include/linux/efi.h +

[PATCH 06/10] efi/esrt: Fix spelling mistake "doen't"

2017-01-31 Thread Ard Biesheuvel
From: Colin Ian King <colin.k...@canonical.com> Trivial fix to spelling mistake "doen't" to "doesn't" in pr_err message Cc: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Colin Ian King <colin.k...@canonical.com> Signed-off-by: Ard Biesheuvel &l

[PATCH 04/10] efi: Introduce EFI_MEM_ATTR bit and set it from memory attributes table

2017-01-31 Thread Ard Biesheuvel
de> Cc: Ricardo Neri <ricardo.n...@intel.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: Ravi Shankar <ravi.v.shan...@intel.com> Cc: Fenghua Yu <fenghua...@intel.com> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.bieshe

[PATCH 03/10] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures

2017-01-31 Thread Ard Biesheuvel
gt; Reviewed-by: "Lee, Chun-Yi" <j...@suse.com> Cc: Borislav Petkov <b...@alien8.de> Cc: Ricardo Neri <ricardo.n...@intel.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: Ravi Shankar <ravi.v.shan...@intel.com> Cc: Fenghua Yu <fenghua...@intel.com

[PATCH 01/10] efi: Deduplicate efi_file_size() / _read() / _close()

2017-01-31 Thread Ard Biesheuvel
> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- arch/x86/boot/compressed/eboot.c | 148 - drivers/firmware/efi/l

[PATCH 02/10] x86/efi: Deduplicate efi_char16_printk()

2017-01-31 Thread Ard Biesheuvel
From: Lukas Wunner <lu...@wunner.de> Eliminate the separate 32 bit and 64 bit code paths by way of the shiny new efi_call_proto() macro. No functional change intended. Signed-off-by: Lukas Wunner <lu...@wunner.de> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-b

[GIT PULL 00/10] EFI updates for v4.11

2017-01-31 Thread Ard Biesheuvel
efi_mem_reserve() (Dave Young) * Preserve debug symbols in the ARM/arm64 UEFI stub (Ard) * Some deduplication work and various other cleanups Ard Biesheuvel (2): efi: Use typed function pointers for runtime services table

Re: [PATCH 0/7] efi: Pass secure boot mode to kernel [ver #7]

2017-01-31 Thread Ard Biesheuvel
Hello David, On 31 January 2017 at 15:13, David Howells wrote: > > Here's a set of patches that can determine the secure boot state of the > UEFI BIOS and pass that along to the main kernel image. This involves > generalising ARM's efi_get_secureboot() function and making

<    1   2   3   4   5   6   7   8   9   10   >