On Mon, Dec 18, 2017 at 09:47:31PM +, Steve Capper wrote:
> Put the direct linear map in the lower addresses of the kernel VA range
> and everything else in the higher ranges.
>
> This allows us to make room for an inline KASAN shadow that operates
> under both 48 and 52 bit
Hi Marc,
On Mon, Dec 18, 2017 at 05:39:21PM +, Marc Zyngier wrote:
> We so far mapped our HYP IO (which is essencially the GICv2 control
> registers) using the same method as for memory. It recently appeared
> that is a bit unsafe:
>
> we compute the HYP VA using the kern_hyp_va helper, but t
Hi Marc,
On Mon, Dec 18, 2017 at 05:39:12PM +, Marc Zyngier wrote:
> We've so far relied on a patching infrastructure that only gave us
> a single alternative, without any way to finely control what gets
> patched. For a single feature, this is an all or nothing thing.
>
> It would be interes
can be computed at boot time.
Signed-off-by: Steve Capper
---
arch/arm64/mm/dump.c | 58 ++--
1 file changed, 47 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c
index d1814b247d4b..4a3e71046cb2 100644
--- a
ional page
table levels are required for the idmap. We used to check for
#ifdef CONFIG_ARM64_VA_BITS_48
which does not work when moving up to 52-bits.
Signed-off-by: Steve Capper
---
arch/arm64/Kconfig | 4
arch/arm64/include/asm/assembler.h | 2 +-
arch/arm64/include
In order to prepare for a variable VA_BITS we need to account for a
variable size VMEMMAP which in turn means the position of the fixed map
is variable at compile time.
Thus, we need to replace the BUILD_BUG_ON's that check the fixed map
position with BUG_ON's.
Signed-off-by: St
age table dumper.
These are all small changes, that need to take place atomically, so they
are bundled into this commit.
Signed-off-by: Steve Capper
---
arch/arm64/Makefile | 2 +-
arch/arm64/include/asm/memory.h | 10 +-
arch/arm64/include/asm/pgtable.h | 2 +-
arch/arm64
-by: Steve Capper
---
arch/arm64/Kconfig | 8
arch/arm64/include/asm/memory.h | 4
arch/arm64/mm/proc.S| 13 +
3 files changed, 25 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5a42edc18718..3fa5342849dc 100644
--- a/a
dules, kImage etc are now
retained,
* 4.15-rc4 is used as a base as it includes a fix from V1 that has been
merged already,
* HASLR patch series is used as a base meaning HYP VA fixes are no
longer required.
Steve Capper (7):
arm/arm64: KVM: Formalise end of direct linear map
arm64: mm:
igned-off-by: Steve Capper
---
Documentation/arm64/kasan-offsets.sh | 17 +
arch/arm64/Kconfig | 10 ++
arch/arm64/Makefile | 7 ---
arch/arm64/include/asm/kasan.h | 21 -
arch/arm64/include/asm/memory
be ~0UL
Signed-off-by: Steve Capper
---
arch/arm/include/asm/memory.h | 1 +
arch/arm64/include/asm/memory.h | 1 +
virt/kvm/arm/mmu.c | 4 ++--
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index
Hi Ard,
On Mon, Dec 04, 2017 at 04:01:09PM +, Ard Biesheuvel wrote:
> On 4 December 2017 at 14:13, Steve Capper wrote:
> > update_mapping_prot assumes that it will be used on the VA for the
> > kernel .text section. (Via the check virt >= VMALLOC_START)
> >
> &g
On Mon, Dec 04, 2017 at 02:30:28PM +, Suzuki K Poulose wrote:
> On 04/12/17 14:13, Steve Capper wrote:
> > In save_elrsr(.), we use the following technique to ascertain the
> > address of the vgic global state:
> > (kern_hyp_va(&kvm_vgic_global_state))->nr_lr
&
On Mon, Dec 04, 2017 at 06:12:13PM +, Steve Capper wrote:
> On Mon, Dec 04, 2017 at 05:27:10PM +, Ard Biesheuvel wrote:
> > On 4 December 2017 at 17:18, Steve Capper wrote:
> > > Hi Ard,
> > >
> > > On Mon, Dec 04, 2017 at 04:25:18PM +, Ard Biesheu
On Mon, Dec 11, 2017 at 12:00:22PM +, Catalin Marinas wrote:
> On Mon, Dec 04, 2017 at 02:13:05PM +0000, Steve Capper wrote:
> > The high_memory global variable is used by
> > cma_declare_contiguous(.) before it is defined.
> >
> > We don't notice this as we co
On Mon, Dec 04, 2017 at 05:27:10PM +, Ard Biesheuvel wrote:
> On 4 December 2017 at 17:18, Steve Capper wrote:
> > Hi Ard,
> >
> > On Mon, Dec 04, 2017 at 04:25:18PM +, Ard Biesheuvel wrote:
> >> On 4 December 2017 at 14:13, Steve Capper wrote:
> >>
On Mon, Dec 04, 2017 at 05:18:09PM +, Steve Capper wrote:
> Hi Ard,
>
[...]
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and
Hi Ard,
On Mon, Dec 04, 2017 at 04:25:18PM +, Ard Biesheuvel wrote:
> On 4 December 2017 at 14:13, Steve Capper wrote:
> > Re-arrange the kernel memory map s.t. the kernel image resides in the
> > bottom 514MB of memory.
>
> I guess this breaks KASLR entirely, no?
-by: Steve Capper
---
arch/arm64/Kconfig | 8
arch/arm64/include/asm/memory.h | 5 +
arch/arm64/mm/kasan_init.c | 3 +++
arch/arm64/mm/proc.S| 21 +
4 files changed, 37 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kcon
can be computed at boot time.
Signed-off-by: Steve Capper
---
arch/arm64/mm/dump.c | 51 +++
1 file changed, 43 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c
index e5d1b5f432fe..c50af666c407 100644
--- a
ional page
table levels are required for the idmap. We used to check for
#ifdef CONFIG_ARM64_VA_BITS_48
which does not work when moving up to 52-bits.
Signed-off-by: Steve Capper
---
arch/arm64/include/asm/assembler.h | 2 +-
arch/arm64/include/asm/efi.h | 4 ++--
arch/arm64/include/asm
!VHE and idmap is high and VA size is big.
Using the above predicates means we have to add two instructions to
kern_hyp_va.
Signed-off-by: Steve Capper
---
arch/arm64/Kconfig | 4
arch/arm64/include/asm/cpucaps.h | 4 +++-
arch/arm64/include/asm/kvm_mmu.h | 47
igned-off-by: Steve Capper
---
Documentation/arm64/kasan-offsets.sh | 17 +
arch/arm64/Kconfig | 10 ++
arch/arm64/Makefile | 7 ---
arch/arm64/include/asm/kasan.h | 24 +++-
arch/arm64/include/asm/pgtabl
flip logic
These are all small changes, that need to take place atomically, so they
are bundled into this commit.
Signed-off-by: Steve Capper
---
arch/arm64/Makefile | 2 +-
arch/arm64/include/asm/memory.h | 10 +-
arch/arm64/include/asm/pgtable.h | 2 +-
arch/arm64/kernel
gned-off-by: Steve Capper
---
arch/arm64/include/asm/cpucaps.h | 2 +-
arch/arm64/include/asm/kvm_mmu.h | 36 +---
arch/arm64/kernel/cpufeature.c | 8
3 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/arch/arm64/include/asm/cpucaps.h b/ar
via mark_linear_text_alias_ro(.).
We "get away" with this as the direct linear mapping currently follows
the VA for the kernel text, so the check passes.
This patch removes the check in update_mapping_prot allowing us to move
the kernel VA layout without spuriously firing the warning.
Signed-off-by:
such as KASAN shadow and sparsemem map
are placed above the fixed size objects.
This means that kernel addresses are now no longer directly dependent on
VA space size.
Signed-off-by: Steve Capper
---
arch/arm64/include/asm/memory.h | 17 +
arch/arm64/include/asm/pgtable.h | 4
iting the
support, I unearthed some subtle bugs in the KVM HYP mapping logic and these
are addressed in the first two patches of this series.
This patch series applies to 4.15-rc2, and the early pagetable patches I
posted earlier:
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November
space and the linear map is moved to the bottom of the kernel VA space.
This patch moves the initialisation of high_memory before it used.
Signed-off-by: Steve Capper
---
arch/arm64/mm/init.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/mm/init.c b/arch/arm64
or.
Cc: James Morse
Suggested-by: Marc Zyngier
Signed-off-by: Steve Capper
---
arch/arm/include/asm/kvm_hyp.h | 2 ++
arch/arm64/include/asm/kvm_hyp.h | 10 ++
virt/kvm/arm/hyp/vgic-v2-sr.c| 4 ++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/arm/incl
be ~0UL
Signed-off-by: Steve Capper
---
arch/arm/include/asm/memory.h | 1 +
arch/arm64/include/asm/memory.h | 1 +
virt/kvm/arm/mmu.c | 4 ++--
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index
On Mon, Nov 16, 2015 at 01:11:43PM +, Marc Zyngier wrote:
> Implement the timer save restore as a direct translation of
> the assembly code version.
Hi Marc, some comments below.
Cheers,
--
Steve
>
> Signed-off-by: Marc Zyngier
> ---
> arch/arm64/kvm/hyp/Makefile | 1 +
> arch/arm64/kv
On Mon, Nov 16, 2015 at 01:11:42PM +, Marc Zyngier wrote:
> Implement the vgic-v3 save restore as a direct translation of
> the assembly code version.
I think there's a couple of typos below Marc.
>
> Signed-off-by: Marc Zyngier
> ---
> arch/arm64/kvm/hyp/Makefile | 1 +
> arch/arm64
On Mon, Nov 16, 2015 at 01:11:41PM +, Marc Zyngier wrote:
> Implement the vgic-v2 save restore as a direct translation of
> the assembly code version.
Hi Marc,
I have one comment below:
Cheers,
--
Steve
>
> Signed-off-by: Marc Zyngier
> ---
> arch/arm64/kvm/Makefile | 1 +
> ar
On 17 November 2015 at 11:25, Marc Zyngier wrote:
> On 17/11/15 11:13, Steve Capper wrote:
>> On 16 November 2015 at 13:11, Marc Zyngier wrote:
>>> Implement the fpsimd save restore, keeping the lazy part in
>>> assembler (as returning to C would be overkill).
>>
On 16 November 2015 at 13:11, Marc Zyngier wrote:
> Implement the fpsimd save restore, keeping the lazy part in
> assembler (as returning to C would be overkill).
>
> Signed-off-by: Marc Zyngier
> ---
> arch/arm64/kvm/hyp/Makefile | 1 +
> arch/arm64/kvm/hyp/entry.S | 32 ++
On 13 August 2015 at 12:34, Suzuki K. Poulose wrote:
> From: "Suzuki K. Poulose"
>
> Ensure that the selected page size is supported by the
> CPU(s).
>
> Cc: Mark Rutland
> Cc: Catalin Marinas
> Cc: Will Deacon
> Signed-off-by: Suzuki K. Poulose
> ---
> arch/arm64/include/asm/sysreg.h |6
On 1 July 2015 at 14:28, Catalin Marinas wrote:
> On Wed, Jul 01, 2015 at 02:18:31PM +0100, Catalin Marinas wrote:
>> On Wed, Jul 01, 2015 at 02:08:31PM +0200, Christoffer Dall wrote:
>> > diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
>> > index 2de9d2e..0eeb4f09 100644
>>
, let's change the behavior.
>
> Cc: sta...@vger.kernel.org
Thanks Christoffer.
It may be worth adding:
Fixes: 084bd29810a5 ("ARM64: mm: HugeTLB support.")
And, please feel free to add:
Reviewed-by: Steve Capper
> Signed-off-by: Christoffer Dall
> ---
> arch/arm64/
39 matches
Mail list logo