1. 17 9月, 2020 1 次提交
  2. 12 9月, 2020 1 次提交
    • H
      KVM: MIPS: Change the definition of kvm type · 15e9e35c
      Huacai Chen 提交于
      MIPS defines two kvm types:
      
       #define KVM_VM_MIPS_TE          0
       #define KVM_VM_MIPS_VZ          1
      
      In Documentation/virt/kvm/api.rst it is said that "You probably want to
      use 0 as machine type", which implies that type 0 be the "automatic" or
      "default" type. And, in user-space libvirt use the null-machine (with
      type 0) to detect the kvm capability, which returns "KVM not supported"
      on a VZ platform.
      
      I try to fix it in QEMU but it is ugly:
      https://lists.nongnu.org/archive/html/qemu-devel/2020-08/msg05629.html
      
      And Thomas Huth suggests me to change the definition of kvm type:
      https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03281.html
      
      So I define like this:
      
       #define KVM_VM_MIPS_AUTO        0
       #define KVM_VM_MIPS_VZ          1
       #define KVM_VM_MIPS_TE          2
      
      Since VZ and TE cannot co-exists, using type 0 on a TE platform will
      still return success (so old user-space tools have no problems on new
      kernels); the advantage is that using type 0 on a VZ platform will not
      return failure. So, the only problem is "new user-space tools use type
      2 on old kernels", but if we treat this as a kernel bug, we can backport
      this patch to old stable kernels.
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Message-Id: <1599734031-28746-1-git-send-email-chenhc@lemote.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      15e9e35c
  3. 11 9月, 2020 3 次提交
  4. 09 9月, 2020 1 次提交
  5. 07 9月, 2020 1 次提交
  6. 06 9月, 2020 1 次提交
  7. 05 9月, 2020 2 次提交
  8. 04 9月, 2020 5 次提交
  9. 03 9月, 2020 2 次提交
  10. 02 9月, 2020 1 次提交
    • S
      drm/i915: Fix sha_text population code · 9ab57658
      Sean Paul 提交于
      This patch fixes a few bugs:
      
      1- We weren't taking into account sha_leftovers when adding multiple
         ksvs to sha_text. As such, we were or'ing the end of ksv[j - 1] with
         the beginning of ksv[j]
      
      2- In the sha_leftovers == 2 and sha_leftovers == 3 case, bstatus was
         being placed on the wrong half of sha_text, overlapping the leftover
         ksv value
      
      3- In the sha_leftovers == 2 case, we need to manually terminate the
         byte stream with 0x80 since the hardware doesn't have enough room to
         add it after writing M0
      
      The upside is that all of the HDCP supported HDMI repeaters I could
      find on Amazon just strip HDCP anyways, so it turns out to be _really_
      hard to hit any of these cases without an MST hub, which is not (yet)
      supported. Oh, and the sha_leftovers == 1 case works perfectly!
      
      Fixes: ee5e5e7a ("drm/i915: Add HDCP framework + base implementation")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ramalingam C <ramalingam.c@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v4.17+
      Reviewed-by: NRamalingam C <ramalingam.c@intel.com>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NRamalingam C <ramalingam.c@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-2-sean@poorly.run
      (cherry picked from commit 1f088221)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      9ab57658
  11. 01 9月, 2020 1 次提交
    • M
      HID: core: Sanitize event code and type when mapping input · 35556bed
      Marc Zyngier 提交于
      When calling into hid_map_usage(), the passed event code is
      blindly stored as is, even if it doesn't fit in the associated bitmap.
      
      This event code can come from a variety of sources, including devices
      masquerading as input devices, only a bit more "programmable".
      
      Instead of taking the event code at face value, check that it actually
      fits the corresponding bitmap, and if it doesn't:
      - spit out a warning so that we know which device is acting up
      - NULLify the bitmap pointer so that we catch unexpected uses
      
      Code paths that can make use of untrusted inputs can now check
      that the mapping was indeed correct and bail out if not.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
      35556bed
  12. 29 8月, 2020 3 次提交
  13. 28 8月, 2020 1 次提交
  14. 27 8月, 2020 5 次提交
  15. 26 8月, 2020 5 次提交
  16. 25 8月, 2020 1 次提交
  17. 24 8月, 2020 4 次提交
  18. 22 8月, 2020 2 次提交
    • T
      bpf: Fix two typos in uapi/linux/bpf.h · b16fc097
      Tobias Klauser 提交于
      Also remove trailing whitespaces in bpf_skb_get_tunnel_key example code.
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Link: https://lore.kernel.org/bpf/20200821133642.18870-1-tklauser@distanz.ch
      b16fc097
    • F
      netfilter: nf_tables: fix destination register zeroing · 1e105e6a
      Florian Westphal 提交于
      Following bug was reported via irc:
      nft list ruleset
         set knock_candidates_ipv4 {
            type ipv4_addr . inet_service
            size 65535
            elements = { 127.0.0.1 . 123,
                         127.0.0.1 . 123 }
            }
       ..
         udp dport 123 add @knock_candidates_ipv4 { ip saddr . 123 }
         udp dport 123 add @knock_candidates_ipv4 { ip saddr . udp dport }
      
      It should not have been possible to add a duplicate set entry.
      
      After some debugging it turned out that the problem is the immediate
      value (123) in the second-to-last rule.
      
      Concatenations use 32bit registers, i.e. the elements are 8 bytes each,
      not 6 and it turns out the kernel inserted
      
      inet firewall @knock_candidates_ipv4
              element 0100007f ffff7b00  : 0 [end]
              element 0100007f 00007b00  : 0 [end]
      
      Note the non-zero upper bits of the first element.  It turns out that
      nft_immediate doesn't zero the destination register, but this is needed
      when the length isn't a multiple of 4.
      
      Furthermore, the zeroing in nft_payload is broken.  We can't use
      [len / 4] = 0 -- if len is a multiple of 4, index is off by one.
      
      Skip zeroing in this case and use a conditional instead of (len -1) / 4.
      
      Fixes: 49499c3e ("netfilter: nf_tables: switch registers to 32 bit addressing")
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      1e105e6a