1. 16 5月, 2018 2 次提交
  2. 12 4月, 2018 1 次提交
  3. 21 3月, 2018 1 次提交
  4. 19 3月, 2018 1 次提交
  5. 16 3月, 2018 3 次提交
    • T
      net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off · 4bbb3e0e
      Toshiaki Makita 提交于
      When we have a bridge with vlan_filtering on and a vlan device on top of
      it, packets would be corrupted in skb_vlan_untag() called from
      br_dev_xmit().
      
      The problem sits in skb_reorder_vlan_header() used in skb_vlan_untag(),
      which makes use of skb->mac_len. In this function mac_len is meant for
      handling rx path with vlan devices with reorder_header disabled, but in
      tx path mac_len is typically 0 and cannot be used, which is the problem
      in this case.
      
      The current code even does not properly handle rx path (skb_vlan_untag()
      called from __netif_receive_skb_core()) with reorder_header off actually.
      
      In rx path single tag case, it works as follows:
      
      - Before skb_reorder_vlan_header()
      
       mac_header                                data
         v                                        v
         +-------------------+-------------+------+----
         |        ETH        |    VLAN     | ETH  |
         |       ADDRS       | TPID | TCI  | TYPE |
         +-------------------+-------------+------+----
         <-------- mac_len --------->
                             <------------->
                              to be removed
      
      - After skb_reorder_vlan_header()
      
                  mac_header                     data
                       v                          v
                       +-------------------+------+----
                       |        ETH        | ETH  |
                       |       ADDRS       | TYPE |
                       +-------------------+------+----
                       <-------- mac_len --------->
      
      This is ok, but in rx double tag case, it corrupts packets:
      
      - Before skb_reorder_vlan_header()
      
       mac_header                                              data
         v                                                      v
         +-------------------+-------------+-------------+------+----
         |        ETH        |    VLAN     |    VLAN     | ETH  |
         |       ADDRS       | TPID | TCI  | TPID | TCI  | TYPE |
         +-------------------+-------------+-------------+------+----
         <--------------- mac_len ---------------->
                                           <------------->
                                          should be removed
                             <--------------------------->
                               actually will be removed
      
      - After skb_reorder_vlan_header()
      
                  mac_header                                   data
                       v                                        v
                                     +-------------------+------+----
                                     |        ETH        | ETH  |
                                     |       ADDRS       | TYPE |
                                     +-------------------+------+----
                       <--------------- mac_len ---------------->
      
      So, two of vlan tags are both removed while only inner one should be
      removed and mac_header (and mac_len) is broken.
      
      skb_vlan_untag() is meant for removing the vlan header at (skb->data - 2),
      so use skb->data and skb->mac_header to calculate the right offset.
      Reported-by: NBrandon Carpenter <brandon.carpenter@cypherpath.com>
      Fixes: a6e18ff1 ("vlan: Fix untag operations of stacked vlans with REORDER_HEADER off")
      Signed-off-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bbb3e0e
    • F
      drm/amdkfd: Add ioctls for GPUVM memory management · 5ec7e028
      Felix Kuehling 提交于
      v2:
      * Fix error handling after kfd_bind_process_to_device in
        kfd_ioctl_map_memory_to_gpu
      v3:
      * Add ioctl to acquire VM from a DRM FD
      v4:
      * Return number of successful map/unmap operations in failure cases
      * Facilitate partial retry after failed map/unmap
      * Added comments with parameter descriptions to new APIs
      * Defined AMDKFD_IOC_FREE_MEMORY_OF_GPU write-only
      Signed-off-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      5ec7e028
    • F
      drm/amdkfd: Remove limit on number of GPUs · c7bcbfa4
      Felix Kuehling 提交于
      Currently the number of GPUs is limited by aperture placement options
      available on GFX7 and GFX8 hardware. This limitation is not necessary.
      Scratch and LDS represent per-work-item and per-work-group storage
      respectively. Different work-items and work-groups use the same virtual
      address to access their own data. Work running on different GPUs is by
      definition in different work-groups (different dispatches, in fact).
      That means the same virtual addresses can be used for these apertures
      on different GPUs.
      
      Add a new AMDKFD_IOC_GET_PROCESS_APERTURES_NEW ioctl that removes the
      artificial limitation on the number of GPUs that can be supported. The
      new ioctl allows user mode to query the number of GPUs to allocate
      enough memory for all GPUs to be reported.
      
      This deprecates AMDKFD_IOC_GET_PROCESS_APERTURES.
      Signed-off-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      c7bcbfa4
  6. 15 3月, 2018 1 次提交
  7. 09 3月, 2018 1 次提交
  8. 08 3月, 2018 3 次提交
    • L
      drm/i915: expose rcs topology through query uAPI · c822e059
      Lionel Landwerlin 提交于
      With the introduction of asymmetric slices in CNL, we cannot rely on
      the previous SUBSLICE_MASK getparam to tell userspace what subslices
      are available. Here we introduce a more detailed way of querying the
      Gen's GPU topology that doesn't aggregate numbers.
      
      This is essential for monitoring parts of the GPU with the OA unit,
      because counters need to be normalized to the number of
      EUs/subslices/slices. The current aggregated numbers like EU_TOTAL do
      not gives us sufficient information.
      
      The Mesa series making use of this API is :
      
          https://patchwork.freedesktop.org/series/38795/
      
      As a bonus we can draw representations of the GPU :
      
          https://imgur.com/a/vuqpa
      
      v2: Rename uapi struct s/_mask/_info/ (Tvrtko)
          Report max_slice/subslice/eus_per_subslice rather than strides (Tvrtko)
          Add uapi macros to read data from *_info structs (Tvrtko)
      
      v3: Use !!(v & DRM_I915_BIT()) for uapi macros instead of custom shifts (Tvrtko)
      
      v4: factorize query item writting (Tvrtko)
          tweak uapi struct/define names (Tvrtko)
      
      v5: Replace ALIGN() macro (Chris)
      
      v6: Updated uapi comments (Tvrtko)
          Moved flags != 0 checks into vfuncs (Tvrtko)
      
      v7: Use access_ok() before copying anything, to avoid overflows (Chris)
          Switch BUG_ON() to GEM_WARN_ON() (Tvrtko)
      
      v8: Tweak uapi comments style to match the coding style (Lionel)
      
      v9: Fix error in comment about computation of enabled subslice (Tvrtko)
      
      v10: Fix/update comments in uAPI (Sagar)
      
      v11: Drop drm_i915_query_(slice|subslice|eu)_info in favor of a single
           drm_i915_query_topology_info (Joonas)
      
      v12: Add subslice_stride/eu_stride in drm_i915_query_topology_info (Joonas)
      
      v13: Fix comment in uAPI (Joonas)
      Signed-off-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-7-lionel.g.landwerlin@intel.com
      c822e059
    • L
      drm/i915: add query uAPI · a446ae2c
      Lionel Landwerlin 提交于
      There are a number of information that are readable from hardware
      registers and that we would like to make accessible to userspace. One
      particular example is the topology of the execution units (how are
      execution units grouped in subslices and slices and also which ones
      have been fused off for die recovery).
      
      At the moment the GET_PARAM ioctl covers some basic needs, but
      generally is only able to return a single value for each defined
      parameter. This is a bit problematic with topology descriptions which
      are array/maps of available units.
      
      This change introduces a new ioctl that can deal with requests to fill
      structures of potentially variable lengths. The user is expected fill
      a query with length fields set at 0 on the first call, the kernel then
      sets the length fields to the their expected values. A second call to
      the kernel with length fields at their expected values will trigger a
      copy of the data to the pointed memory locations.
      
      The scope of this uAPI is only to provide information to userspace,
      not to allow configuration of the device.
      
      v2: Simplify dispatcher code iteration (Tvrtko)
          Tweak uapi drm_i915_query_item structure (Tvrtko)
      
      v3: Rename pad fields into flags (Chris)
          Return error on flags field != 0 (Chris)
          Only copy length back to userspace in drm_i915_query_item (Chris)
      
      v4: Use array of functions instead of switch (Chris)
      
      v5: More comments in uapi (Tvrtko)
          Return query item errors in length field (All)
      
      v6: Tweak uapi comments style to match the coding style (Lionel)
      
      v7: Add i915_query.h (Joonas)
      
      v8: (Lionel) Change the behavior of the item iterator to report
          invalid queries into the query item rather than stopping the
          iteration. This enables userspace applications to query newer
          items on older kernels and only have failure on the items that are
          not supported.
      
      v9: Edit copyright headers (Joonas)
      
      v10: Typos & comments in uapi (Joonas)
      Signed-off-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180306122857.27317-6-lionel.g.landwerlin@intel.com
      a446ae2c
    • V
      drm/uapi: Deprecate DRM_MODE_PROP_PENDING · 147ccf93
      Ville Syrjälä 提交于
      DRM_MODE_PROP_PENDING is not used anywhere (except printed out
      by libdrm proptest/modetest).
      
      This seems to be yet another thing blindly copied from xrandr.
      Quoting from the protocol spec:
      "If 'pending' is TRUE, changes made to property values with
       RRChangeOutputProperty will be saved in the pending property value
       and be automatically copied to the current value on the next
       RRSetCrtcConfig request involving the named output. If 'pending' is
       FALSE, changes are copied immediately."
      
      So it was some kind of early idea for atomic property updates.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180306164849.2862-4-ville.syrjala@linux.intel.comReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      147ccf93
  9. 06 3月, 2018 1 次提交
  10. 05 3月, 2018 1 次提交
    • S
      media: rc: lirc does not use LIRC_CAN_SEND_SCANCODE feature · 2fe4c22c
      Sean Young 提交于
      Since commit 02d742f4 ("media: lirc: lirc daemon fails to detect raw
      IR device"), the feature LIRC_CAN_SEND_SCANCODE is no longer used as it
      tripped up lircd. The ability to send scancodes for IR Tx is implied by
      LIRC_CAN_SEND_PULSE (i.e. any device that can send can use IR Tx encoders).
      
      So, remove LIRC_CAN_SEND_SCANCODE since it never used. This fixes:
      
      Documentation/output/lirc.h.rst:6: WARNING: undefined label:
      lirc-can-send-scancode (if the link has no caption the label must precede
      a section header
      
      As this flag was added for kernel 4.16, let's remove it, while not too
      late.
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      2fe4c22c
  11. 02 3月, 2018 2 次提交
  12. 28 2月, 2018 1 次提交
  13. 27 2月, 2018 2 次提交
  14. 24 2月, 2018 1 次提交
  15. 23 2月, 2018 1 次提交
  16. 22 2月, 2018 1 次提交
  17. 20 2月, 2018 2 次提交
  18. 16 2月, 2018 1 次提交
  19. 14 2月, 2018 1 次提交
    • H
      uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define · da360299
      Hauke Mehrtens 提交于
      This fixes a compile problem of some user space applications by not
      including linux/libc-compat.h in uapi/if_ether.h.
      
      linux/libc-compat.h checks which "features" the header files, included
      from the libc, provide to make the Linux kernel uapi header files only
      provide no conflicting structures and enums. If a user application mixes
      kernel headers and libc headers it could happen that linux/libc-compat.h
      gets included too early where not all other libc headers are included
      yet. Then the linux/libc-compat.h would not prevent all the
      redefinitions and we run into compile problems.
      This patch removes the include of linux/libc-compat.h from
      uapi/if_ether.h to fix the recently introduced case, but not all as this
      is more or less impossible.
      
      It is no problem to do the check directly in the if_ether.h file and not
      in libc-compat.h as this does not need any fancy glibc header detection
      as glibc never provided struct ethhdr and should define
      __UAPI_DEF_ETHHDR by them self when they will provide this.
      
      The following test program did not compile correctly any more:
      
      #include <linux/if_ether.h>
      #include <netinet/in.h>
      #include <linux/in.h>
      
      int main(void)
      {
      	return 0;
      }
      
      Fixes: 6926e041 ("uapi/if_ether.h: prevent redefinition of struct ethhdr")
      Reported-by: NGuillaume Nault <g.nault@alphalink.fr>
      Cc: <stable@vger.kernel.org> # 4.15
      Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da360299
  20. 12 2月, 2018 1 次提交
    • A
      unify {de,}mangle_poll(), get rid of kernel-side POLL... · 7a163b21
      Al Viro 提交于
      except, again, POLLFREE and POLL_BUSY_LOOP.
      
      With this, we finally get to the promised end result:
      
       - POLL{IN,OUT,...} are plain integers and *not* in __poll_t, so any
         stray instances of ->poll() still using those will be caught by
         sparse.
      
       - eventpoll.c and select.c warning-free wrt __poll_t
      
       - no more kernel-side definitions of POLL... - userland ones are
         visible through the entire kernel (and used pretty much only for
         mangle/demangle)
      
       - same behavior as after the first series (i.e. sparc et.al. epoll(2)
         working correctly).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7a163b21
  21. 11 2月, 2018 1 次提交
  22. 07 2月, 2018 4 次提交
  23. 06 2月, 2018 3 次提交
    • M
      membarrier: Provide core serializing command, *_SYNC_CORE · 70216e18
      Mathieu Desnoyers 提交于
      Provide core serializing membarrier command to support memory reclaim
      by JIT.
      
      Each architecture needs to explicitly opt into that support by
      documenting in their architecture code how they provide the core
      serializing instructions required when returning from the membarrier
      IPI, and after the scheduler has updated the curr->mm pointer (before
      going back to user-space). They should then select
      ARCH_HAS_MEMBARRIER_SYNC_CORE to enable support for that command on
      their architecture.
      
      Architectures selecting this feature need to either document that
      they issue core serializing instructions when returning to user-space,
      or implement their architecture-specific sync_core_before_usermode().
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrea Parri <parri.andrea@gmail.com>
      Cc: Andrew Hunter <ahh@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Avi Kivity <avi@scylladb.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Dave Watson <davejwatson@fb.com>
      Cc: David Sehr <sehr@google.com>
      Cc: Greg Hackmann <ghackmann@google.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Maged Michael <maged.michael@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-api@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180129202020.8515-9-mathieu.desnoyers@efficios.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      70216e18
    • M
      membarrier: Provide GLOBAL_EXPEDITED command · c5f58bd5
      Mathieu Desnoyers 提交于
      Allow expedited membarrier to be used for data shared between processes
      through shared memory.
      
      Processes wishing to receive the membarriers register with
      MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED. Those which want to issue
      membarrier invoke MEMBARRIER_CMD_GLOBAL_EXPEDITED.
      
      This allows extremely simple kernel-level implementation: we have almost
      everything we need with the PRIVATE_EXPEDITED barrier code. All we need
      to do is to add a flag in the mm_struct that will be used to check
      whether we need to send the IPI to the current thread of each CPU.
      
      There is a slight downside to this approach compared to targeting
      specific shared memory users: when performing a membarrier operation,
      all registered "global" receivers will get the barrier, even if they
      don't share a memory mapping with the sender issuing
      MEMBARRIER_CMD_GLOBAL_EXPEDITED.
      
      This registration approach seems to fit the requirement of not
      disturbing processes that really deeply care about real-time: they
      simply should not register with MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED.
      
      In order to align the membarrier command names, the "MEMBARRIER_CMD_SHARED"
      command is renamed to "MEMBARRIER_CMD_GLOBAL", keeping an alias of
      MEMBARRIER_CMD_SHARED to MEMBARRIER_CMD_GLOBAL for UAPI header backward
      compatibility.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrea Parri <parri.andrea@gmail.com>
      Cc: Andrew Hunter <ahh@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Avi Kivity <avi@scylladb.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Dave Watson <davejwatson@fb.com>
      Cc: David Sehr <sehr@google.com>
      Cc: Greg Hackmann <ghackmann@google.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Maged Michael <maged.michael@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-api@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180129202020.8515-5-mathieu.desnoyers@efficios.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c5f58bd5
    • V
      drm/i915: Deprecate I915_SET_COLORKEY_NONE · 6ec5bd34
      Ville Syrjälä 提交于
      Deprecate the silly I915_SET_COLORKEY_NONE flag. The obvious
      way to disable colorkey is to just set flags to 0, which is
      exactly what the intel ddx has been doing all along.
      
      Currently when userspace sets the flags to 0, we end up in a
      funny state where colorkey is disabled, but various colorkey
      vs. scaling checks still consider colorkey to be enabled, and
      thus we don't allow plane scaling to kick in.
      
      In case there is some other userspace out there that actually
      uses this flag (unlikely as this is an i915 specific uapi)
      we'll keep on accepting it.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180202204231.27905-1-ville.syrjala@linux.intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      6ec5bd34
  24. 02 2月, 2018 2 次提交
  25. 01 2月, 2018 1 次提交
  26. 31 1月, 2018 1 次提交