1. 16 4月, 2019 6 次提交
  2. 13 4月, 2019 1 次提交
  3. 12 4月, 2019 1 次提交
    • M
      arm64: vdso: use $(LD) instead of $(CC) to link VDSO · 691efbed
      Masahiro Yamada 提交于
      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: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      691efbed
  4. 11 4月, 2019 1 次提交
    • V
      arm64: compat: Reduce address limit · d2631193
      Vincenzo Frascino 提交于
      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: NJann Horn <jannh@google.com>
      Signed-off-by: NVincenzo Frascino <vincenzo.frascino@arm.com>
      [will: fixed typo in comment]
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      d2631193
  5. 09 4月, 2019 18 次提交
  6. 05 4月, 2019 1 次提交
  7. 04 4月, 2019 2 次提交
  8. 03 4月, 2019 5 次提交
    • W
      arm64: cpu_ops: fix a leaked reference by adding missing of_node_put · 92606ec9
      Wen Yang 提交于
      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: NWen Yang <wen.yang99@zte.com.cn>
      Reviewed-by: NFlorian 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: NWill Deacon <will.deacon@arm.com>
      92606ec9
    • W
      arm64: mm: Make show_pte() a static function · 7048a597
      Will Deacon 提交于
      show_pte() doesn't have any external callers, so make it static.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      7048a597
    • M
      arm64/vdso: don't leak kernel addresses · 0f1bf7e3
      Matteo Croce 提交于
      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: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NMatteo Croce <mcroce@redhat.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      0f1bf7e3
    • M
      arm64: setup min_low_pfn · 19d6242e
      Miles Chen 提交于
      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: NMiles Chen <miles.chen@mediatek.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      19d6242e
    • Q
      arm64/mm: fix kernel-doc comments · b1ce45e8
      Qian Cai 提交于
      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: NQian Cai <cai@lca.pw>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      b1ce45e8
  9. 01 4月, 2019 2 次提交
  10. 31 3月, 2019 3 次提交
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 63fc9c23
      Linus Torvalds 提交于
      Pull KVM fixes from Paolo Bonzini:
       "A collection of x86 and ARM bugfixes, and some improvements to
        documentation.
      
        On top of this, a cleanup of kvm_para.h headers, which were exported
        by some architectures even though they not support KVM at all. This is
        responsible for all the Kbuild changes in the diffstat"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits)
        Documentation: kvm: clarify KVM_SET_USER_MEMORY_REGION
        KVM: doc: Document the life cycle of a VM and its resources
        KVM: selftests: complete IO before migrating guest state
        KVM: selftests: disable stack protector for all KVM tests
        KVM: selftests: explicitly disable PIE for tests
        KVM: selftests: assert on exit reason in CR4/cpuid sync test
        KVM: x86: update %rip after emulating IO
        x86/kvm/hyper-v: avoid spurious pending stimer on vCPU init
        kvm/x86: Move MSR_IA32_ARCH_CAPABILITIES to array emulated_msrs
        KVM: x86: Emulate MSR_IA32_ARCH_CAPABILITIES on AMD hosts
        kvm: don't redefine flags as something else
        kvm: mmu: Used range based flushing in slot_handle_level_range
        KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported
        KVM: x86: remove check on nr_mmu_pages in kvm_arch_commit_memory_region()
        kvm: nVMX: Add a vmentry check for HOST_SYSENTER_ESP and HOST_SYSENTER_EIP fields
        KVM: SVM: Workaround errata#1096 (insn_len maybe zero on SMAP violation)
        KVM: Reject device ioctls from processes other than the VM's creator
        KVM: doc: Fix incorrect word ordering regarding supported use of APIs
        KVM: x86: fix handling of role.cr4_pae and rename it to 'gpte_size'
        KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT
        ...
      63fc9c23
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 915ee0da
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "A pile of x86 updates:
      
         - Prevent exceeding he valid physical address space in the /dev/mem
           limit checks.
      
         - Move all header content inside the header guard to prevent compile
           failures.
      
         - Fix the bogus __percpu annotation in this_cpu_has() which makes
           sparse very noisy.
      
         - Disable switch jump tables completely when retpolines are enabled.
      
         - Prevent leaking the trampoline address"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/realmode: Make set_real_mode_mem() static inline
        x86/cpufeature: Fix __percpu annotation in this_cpu_has()
        x86/mm: Don't exceed the valid physical address space
        x86/retpolines: Disable switch jump tables when retpolines are enabled
        x86/realmode: Don't leak the trampoline kernel address
        x86/boot: Fix incorrect ifdeffery scope
        x86/resctrl: Remove unused variable
      915ee0da
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 590627f7
      Linus Torvalds 提交于
      Pull perf tooling fixes from Thomas Gleixner:
       "Core libraries:
         - Fix max perf_event_attr.precise_ip detection.
         - Fix parser error for uncore event alias
         - Fixup ordering of kernel maps after obtaining the main kernel map
           address.
      
        Intel PT:
         - Fix TSC slip where A TSC packet can slip past MTC packets so that
           the timestamp appears to go backwards.
         - Fixes for exported-sql-viewer GUI conversion to python3.
      
        ARM coresight:
         - Fix the build by adding a missing case value for enumeration value
           introduced in newer library, that now is the required one.
      
        tool headers:
         - Syncronize kernel headers with the kernel, getting new io_uring and
           pidfd_send_signal syscalls so that 'perf trace' can handle them"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf pmu: Fix parser error for uncore event alias
        perf scripts python: exported-sql-viewer.py: Fix python3 support
        perf scripts python: exported-sql-viewer.py: Fix never-ending loop
        perf machine: Update kernel map address and re-order properly
        tools headers uapi: Sync powerpc's asm/kvm.h copy with the kernel sources
        tools headers: Update x86's syscall_64.tbl and uapi/asm-generic/unistd
        tools headers uapi: Update drm/i915_drm.h
        tools arch x86: Sync asm/cpufeatures.h with the kernel sources
        tools headers uapi: Sync linux/fcntl.h to get the F_SEAL_FUTURE_WRITE addition
        tools headers uapi: Sync asm-generic/mman-common.h and linux/mman.h
        perf evsel: Fix max perf_event_attr.precise_ip detection
        perf intel-pt: Fix TSC slip
        perf cs-etm: Add missing case value
      590627f7