1. Apr 16, 2019
  2. Apr 13, 2019
  3. Apr 12, 2019
    • Masahiro Yamada's avatar
      arm64: vdso: use $(LD) instead of $(CC) to link VDSO · 691efbed
      Masahiro Yamada authored
      
      
      We use $(LD) to link vmlinux, modules, decompressors, etc.
      
      VDSO is the only exceptional case where $(CC) is used as the linker
      driver, but I do not know why we need to do so. VDSO uses a special
      linker script, and does not link standard libraries at all.
      
      I changed the Makefile to use $(LD) rather than $(CC). I tested this,
      and VDSO worked for me.
      
      Users will be able to use their favorite linker (e.g. lld instead of
      of bfd) by passing LD= from the command line.
      
      My plan is to rewrite all VDSO Makefiles to use $(LD), then delete
      cc-ldoption.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      691efbed
  4. Apr 11, 2019
    • Vincenzo Frascino's avatar
      arm64: compat: Reduce address limit · d2631193
      Vincenzo Frascino authored
      
      
      Currently, compat tasks running on arm64 can allocate memory up to
      TASK_SIZE_32 (UL(0x100000000)).
      
      This means that mmap() allocations, if we treat them as returning an
      array, are not compliant with the sections 6.5.8 of the C standard
      (C99) which states that: "If the expression P points to an element of
      an array object and the expression Q points to the last element of the
      same array object, the pointer expression Q+1 compares greater than P".
      
      Redefine TASK_SIZE_32 to address the issue.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
      [will: fixed typo in comment]
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      d2631193
  5. Apr 09, 2019
  6. Apr 05, 2019
  7. Apr 04, 2019
  8. Apr 03, 2019
    • Wen Yang's avatar
      arm64: cpu_ops: fix a leaked reference by adding missing of_node_put · 92606ec9
      Wen Yang authored
      
      
      The call to of_get_next_child returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
        ./arch/arm64/kernel/cpu_ops.c:102:1-7: ERROR: missing of_node_put;
        acquired a node pointer with refcount incremented on line 69, but
        without a corresponding object release within this function.
      
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      92606ec9
    • Will Deacon's avatar
      arm64: mm: Make show_pte() a static function · 7048a597
      Will Deacon authored
      
      
      show_pte() doesn't have any external callers, so make it static.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      7048a597
    • Matteo Croce's avatar
      arm64/vdso: don't leak kernel addresses · 0f1bf7e3
      Matteo Croce authored
      Since commit ad67b74d ("printk: hash addresses printed with %p"),
      two obfuscated kernel pointer are printed at every boot:
      
          vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
      
      Remove the the print completely, as it's useless without the addresses.
      
      Fixes: ad67b74d
      
       ("printk: hash addresses printed with %p")
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarMatteo Croce <mcroce@redhat.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      0f1bf7e3
    • Miles Chen's avatar
      arm64: setup min_low_pfn · 19d6242e
      Miles Chen authored
      
      
      When debugging with CONFIG_PAGE_OWNER, I noticed that the min_low_pfn
      on arm64 is always zero and the page owner scanning has to start from zero.
      We have to loop a while before we see the first valid pfn.
      (see: read_page_owner())
      
      Setup min_low_pfn to save some loops.
      
      Before setting min_low_pfn:
      
      [   21.265602] min_low_pfn=0, *ppos=0
      Page allocated via order 0, mask 0x100cca(GFP_HIGHUSER_MOVABLE)
      PFN 262144 type Movable Block 512 type Movable Flags 0x8001e
      referenced|uptodate|dirty|lru|swapbacked)
      prep_new_page+0x13c/0x140
      get_page_from_freelist+0x254/0x1068
      __alloc_pages_nodemask+0xd4/0xcb8
      
      After setting min_low_pfn:
      
      [   11.025787] min_low_pfn=262144, *ppos=0
      Page allocated via order 0, mask 0x100cca(GFP_HIGHUSER_MOVABLE)
      PFN 262144 type Movable Block 512 type Movable Flags 0x8001e
      referenced|uptodate|dirty|lru|swapbacked)
      prep_new_page+0x13c/0x140
      get_page_from_freelist+0x254/0x1068
      __alloc_pages_nodemask+0xd4/0xcb8
      shmem_alloc_page+0x7c/0xa0
      shmem_alloc_and_acct_page+0x124/0x1e8
      shmem_getpage_gfp.isra.7+0x118/0x878
      shmem_write_begin+0x38/0x68
      
      Signed-off-by: default avatarMiles Chen <miles.chen@mediatek.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      19d6242e
    • Qian Cai's avatar
      arm64/mm: fix kernel-doc comments · b1ce45e8
      Qian Cai authored
      Building a kernel with W=1 generates several warnings due to abuse of
      kernel-doc comments:
      
        | arch/arm64/mm/numa.c:281: warning: Cannot understand  *
        |   on line 281 - I thought it was a doc line
      
      Tidy up the comments to remove the warnings.
      
      Fixes: 1a2db300
      
       ("arm64, numa: Add NUMA support for arm64 platforms.")
      Signed-off-by: default avatarQian Cai <cai@lca.pw>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      b1ce45e8
  9. Apr 01, 2019