1. 12 Apr, 2017 1 commit
    • Marc Zyngier's avatar
      arm64: Silence spurious kbuild warning on menuconfig · d91750f1
      Marc Zyngier authored
      Since bbb56c27 ("arm64: Add detection code for broken .inst support
      in binutils"), running any make target that doesn't involve the cross
      compiler results in a spurious warning:
      
      $ make ARCH=arm64 menuconfig
      arch/arm64/Makefile:43: Detected assembler with broken .inst; disassembly will be unreliable
      
      while
      
      $ make ARCH=arm64 CROSS_COMPILE=aarch64-arm-linux- menuconfig
      
      is silent (assuming your compiler is not affected). That's because
      the code that tests for the workaround is always run, irrespective
      of the current configuration being available or not.
      
      An easy fix is to make the detection conditional on CONFIG_ARM64
      being defined, which is only the case when actually building
      something.
      
      Fixes: bbb56c27 ("arm64: Add detection code for broken .inst support in binutils")
      Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      d91750f1
  2. 07 Apr, 2017 6 commits
  3. 06 Apr, 2017 1 commit
    • Stephen Boyd's avatar
      arm64: print a fault message when attempting to write RO memory · b824b930
      Stephen Boyd authored
      If a page is marked read only we should print out that fact,
      instead of printing out that there was a page fault. Right now we
      get a cryptic error message that something went wrong with an
      unhandled fault, but we don't evaluate the esr to figure out that
      it was a read/write permission fault.
      
      Instead of seeing:
      
        Unable to handle kernel paging request at virtual address ffff000008e460d8
        pgd = ffff800003504000
        [ffff000008e460d8] *pgd=0000000083473003, *pud=0000000083503003, *pmd=0000000000000000
        Internal error: Oops: 9600004f [#1] PREEMPT SMP
      
      we'll see:
      
        Unable to handle kernel write to read-only memory at virtual address ffff000008e760d8
        pgd = ffff80003d3de000
        [ffff000008e760d8] *pgd=0000000083472003, *pud=0000000083435003, *pmd=0000000000000000
        Internal error: Oops: 9600004f [#1] PREEMPT SMP
      
      We also add a userspace address check into is_permission_fault()
      so that the function doesn't return true for ttbr0 PAN faults
      when it shouldn't.
      Reviewed-by: default avatarJames Morse <james.morse@arm.com>
      Tested-by: default avatarJames Morse <james.morse@arm.com>
      Acked-by: default avatarLaura Abbott <labbott@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarStephen Boyd <stephen.boyd@linaro.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      b824b930
  4. 05 Apr, 2017 14 commits
  5. 04 Apr, 2017 12 commits
  6. 30 Mar, 2017 2 commits
  7. 29 Mar, 2017 2 commits
  8. 23 Mar, 2017 2 commits
    • Kefeng Wang's avatar
      arm64: drop unnecessary newlines in show_regs() · 29d98121
      Kefeng Wang authored
      There are two unnecessary newlines, one is in show_regs, another
      is in __show_regs(), drop them.
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      29d98121
    • Ard Biesheuvel's avatar
      arm64: mm: set the contiguous bit for kernel mappings where appropriate · d27cfa1f
      Ard Biesheuvel authored
      This is the third attempt at enabling the use of contiguous hints for
      kernel mappings. The most recent attempt 0bfc445d was reverted after
      it turned out that updating permission attributes on live contiguous ranges
      may result in TLB conflicts. So this time, the contiguous hint is not set
      for .rodata or for the linear alias of .text/.rodata, both of which are
      mapped read-write initially, and remapped read-only at a later stage.
      (Note that the latter region could also be unmapped and remapped again
      with updated permission attributes, given that the region, while live, is
      only mapped for the convenience of the hibernation code, but that also
      means the TLB footprint is negligible anyway, so why bother)
      
      This enables the following contiguous range sizes for the virtual mapping
      of the kernel image, and for the linear mapping:
      
                granule size |  cont PTE  |  cont PMD  |
                -------------+------------+------------+
                     4 KB    |    64 KB   |   32 MB    |
                    16 KB    |     2 MB   |    1 GB*   |
                    64 KB    |     2 MB   |   16 GB*   |
      
      * Only when built for 3 or more levels of translation. This is due to the
        fact that a 2 level configuration only consists of PGDs and PTEs, and the
        added complexity of dealing with folded PMDs is not justified considering
        that 16 GB contiguous ranges are likely to be ignored by the hardware (and
        16k/2 levels is a niche configuration)
      Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
      Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      d27cfa1f