1. 22 3月, 2016 12 次提交
  2. 21 3月, 2016 4 次提交
    • C
      kvm: arm64: Disable compiler instrumentation for hypervisor code · a6cdf1c0
      Catalin Marinas 提交于
      With the recent rewrite of the arm64 KVM hypervisor code in C, enabling
      certain options like KASAN would allow the compiler to generate memory
      accesses or function calls to addresses not mapped at EL2. This patch
      disables the compiler instrumentation on the arm64 hypervisor code for
      gcov-based profiling (GCOV_KERNEL), undefined behaviour sanity checker
      (UBSAN) and kernel address sanitizer (KASAN).
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Christoffer Dall <christoffer.dall@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: <stable@vger.kernel.org> # 4.5+
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      a6cdf1c0
    • M
      arm64: KVM: Turn kvm_ksym_ref into a NOP on VHE · 2510ffe1
      Marc Zyngier 提交于
      When running with VHE, there is no need to translate kernel pointers
      to the EL2 memory space, since we're already there (and we have a much
      saner memory map to start with).
      
      Unfortunately, kvm_ksym_ref is getting in the way, and the first
      call into the "hypervisor" section is going to end up in fireworks,
      since we're now branching into nowhereland. Meh.
      
      A potential solution is to test if VHE is engaged or not, and only
      perform the translation in the negative case. With this in place,
      VHE is able to run again.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      2510ffe1
    • E
      KVM: arm/arm64: disable preemption when calling smp_call_function_many · 898f949f
      Eric Auger 提交于
      Preemption must be disabled when calling smp_call_function_many
      
      Reported-by: bartosz.wawrzyniak@tieto.com
      Signed-off-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      898f949f
    • A
      x86/kallsyms: fix GOLD link failure with new relative kallsyms table format · 142b9e6c
      Ard Biesheuvel 提交于
      Commit 2213e9a6 ("kallsyms: add support for relative offsets in
      kallsyms address table") changed the default kallsyms symbol table
      format to use relative references rather than absolute addresses.
      
      This reduces the size of the kallsyms symbol table by 50% on 64-bit
      architectures, and further reduces the size of the relocation tables
      used by relocatable kernels.  Since the memory footprint of the static
      kernel image is always much smaller than 4 GB, these relative references
      are assumed to be representable in 32 bits, even when the native word
      size is 64 bits.
      
      On 64-bit architectures, this obviously only works if the distance
      between each relative reference and the chosen anchor point is
      representable in 32 bits, and so the table generation code in
      scripts/kallsyms.c scans the table for the lowest value that is covered
      by the kernel text, and selects it as the anchor point.
      
      However, when using the GOLD linker rather than the default BFD linker
      to build the x86_64 kernel, the symbol phys_offset_64, which is the
      result of arithmetic defined in the linker script, is emitted as a 'T'
      rather than an 'A' type symbol, resulting in scripts/kallsyms.c to
      mistake it for a suitable anchor point, even though it is far away from
      the actual kernel image in the virtual address space.  This results in
      out-of-range warnings from scripts/kallsyms.c and a broken build.
      
      So let's align with the BFD linker, and emit the phys_offset_[32|64]
      symbols as absolute symbols explicitly.  Note that the out of range
      issue does not exist on 32-bit x86, but this patch changes both symbols
      for symmetry.
      Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      142b9e6c
  3. 19 3月, 2016 3 次提交
    • A
      ldmvsw: Add ldmvsw.c driver code · 5d01fa0c
      Aaron Young 提交于
        Add ldmvsw.c driver
      
        Details:
      
        The ldmvsw driver very closely follows the sunvnet.c code and makes
        use of the sunvnet_common.c code for core functionality.
      
        A significant difference between sunvnet and ldmvsw driver is
        sunvnet creates a network interface for each vnet-port *parent*
        node in the MD while the ldmvsw driver creates a network interface
        for every vsw-port node in the Machine Description (MD).
        Therefore the netdev_priv() for sunvnet is a vnet structure while
        the netdev_priv() for ldmvsw is a vnet_port structure.
      
        Vnet_port structures allocated by ldmvsw have the vsw bit set.
        When finding the net_device associated with a port, the common code keys
        off this bit to use either the net_device found in the vnet_port or the
        net_device in the vnet structure (see the VNET_PORT_TO_NET_DEVICE() macro in
        sunvnet_common.h). This scheme allows the common code to work with
        both drivers with minimal changes.
      
        Similar to Xen, network interfaces created by the ldmvsw driver will always
        have a HW Addr (i.e. mac address) of FE:FF:FF:FF:FF:FF and each will be
        assigned the devname "vif<cfg_handle>.<port_id>" - where <cfg_handle> and
        <port_id> are a unique handle/port pair assigned to the associated
        vsw-port node in the MD.
      Signed-off-by: NAaron Young <aaron.young@oracle.com>
      Signed-off-by: NRashmi Narasimhan <rashmi.narasimhan@oracle.com>
      Reviewed-by: NSowmini Varadhan <sowmini.varadhan@oracle.com>
      Reviewed-by: NAlexandre Chartre <Alexandre.Chartre@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d01fa0c
    • M
      ARM: uniphier: rework SMP code to support new System Bus binding · 307d40c5
      Masahiro Yamada 提交于
      During the review process of the UniPhier System Bus driver
      (drivers/bus/uniphier.c), the current binding of the System Bus
      Controller turned out to be no good.  In order to use the driver,
      some nodes in the device trees must be tweaked.  It would also have
      impacts on the SMP code because the SMP related registers are
      located in the System Bus Controller block.  This commit reworks
      the smp_operations to support the new binding, but still supports
      the old binding, too.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      307d40c5
    • M
      ARM: uniphier: add missing of_node_put() · 9eca796e
      Masahiro Yamada 提交于
      This node pointer is allocated by of_find_compatible_node() in this
      function.  It should be put before exitting this function.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      9eca796e
  4. 18 3月, 2016 21 次提交