1. 10 Sep, 2017 26 commits
  2. 01 Sep, 2017 8 commits
  3. 05 Aug, 2017 2 commits
  4. 31 Jul, 2017 4 commits
    • Sasha Levin's avatar
      ipvs: SNAT packet replies only for NATed connections · 28d8e1bc
      Sasha Levin authored
      [ Upstream commit 3c5ab3f3 ]
      
      We do not check if packet from real server is for NAT
      connection before performing SNAT. This causes problems
      for setups that use DR/TUN and allow local clients to
      access the real server directly, for example:
      
      - local client in director creates IPVS-DR/TUN connection
      CIP->VIP and the request packets are routed to RIP.
      Talks are finished but IPVS connection is not expired yet.
      
      - second local client creates non-IPVS connection CIP->RIP
      with same reply tuple RIP->CIP and when replies are received
      on LOCAL_IN we wrongly assign them for the first client
      connection because RIP->CIP matches the reply direction.
      As result, IPVS SNATs replies for non-IPVS connections.
      
      The problem is more visible to local UDP clients but in rare
      cases it can happen also for TCP or remote clients when the
      real server sends the reply traffic via the director.
      
      So, better to be more precise for the reply traffic.
      As replies are not expected for DR/TUN connections, better
      to not touch them.
      Reported-by: default avatarNick Moriarty <nick.moriarty@york.ac.uk>
      Tested-by: default avatarNick Moriarty <nick.moriarty@york.ac.uk>
      Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      28d8e1bc
    • Sasha Levin's avatar
      4e8a4d30
    • Ian Abbott's avatar
      staging: comedi: ni_mio_common: fix E series ni_ai_insn_read() data · 947a97e2
      Ian Abbott authored
      [ Upstream commit 857a6610 ]
      
      Commit 0557344e ("staging: comedi: ni_mio_common: fix local var for
      32-bit read") changed the type of local variable `d` from `unsigned
      short` to `unsigned int` to fix a bug introduced in
      commit 9c340ac9 ("staging: comedi: ni_stc.h: add read/write
      callbacks to struct ni_private") when reading AI data for NI PCI-6110
      and PCI-6111 cards.  Unfortunately, other parts of the function rely on
      the variable being `unsigned short` when an offset value in local
      variable `signbits` is added to `d` before writing the value to the
      `data` array:
      
      			d += signbits;
      		  	data[n] = d;
      
      The `signbits` variable will be non-zero in bipolar mode, and is used to
      convert the hardware's 2's complement, 16-bit numbers to Comedi's
      straight binary sample format (with 0 representing the most negative
      voltage).  This breaks because `d` is now 32 bits wide instead of 16
      bits wide, so after the addition of `signbits`, `data[n]` ends up being
      set to values above 65536 for negative voltages.  This affects all
      supported "E series" cards except PCI-6143 (and PXI-6143). Fix it by
      ANDing the value written to the `data[n]` with the mask 0xffff.
      
      Fixes: 0557344e ("staging: comedi: ni_mio_common: fix local var for 32-bit read")
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      947a97e2
    • Jim Mattson's avatar
      kvm: vmx: Do not disable intercepts for BNDCFGS · 2717d19c
      Jim Mattson authored
      [ Upstream commit a8b6fda3 ]
      
      The MSR permission bitmaps are shared by all VMs. However, some VMs
      may not be configured to support MPX, even when the host does. If the
      host supports VMX and the guest does not, we should intercept accesses
      to the BNDCFGS MSR, so that we can synthesize a #GP
      fault. Furthermore, if the host does not support MPX and the
      "ignore_msrs" kvm kernel parameter is set, then we should intercept
      accesses to the BNDCFGS MSR, so that we can skip over the rdmsr/wrmsr
      without raising a #GP fault.
      
      Fixes: da8999d3 ("KVM: x86: Intel MPX vmx and msr handle")
      Signed-off-by: default avatarJim Mattson <jmattson@google.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      2717d19c