1. 21 Aug, 2020 2 commits
  2. 20 Aug, 2020 13 commits
  3. 19 Aug, 2020 19 commits
  4. 18 Aug, 2020 6 commits
    • Miaohe Lin's avatar
      net: eliminate meaningless memcpy to data in pskb_carve_inside_nonlinear() · e3ec1e8c
      Miaohe Lin authored
      The frags of skb_shared_info of the data is assigned in following loop. It
      is meaningless to do a memcpy of frags here.
      Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3ec1e8c
    • Alex Dewar's avatar
      ethernet: cirrus: Remove unused macros · 46191546
      Alex Dewar authored
      Remove a couple of unused #defines in cs89x0.h.
      Signed-off-by: default avatarAlex Dewar <alex.dewar90@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46191546
    • Miaohe Lin's avatar
      net: tipc: Convert to use the preferred fallthrough macro · 7f8901b7
      Miaohe Lin authored
      Convert the uses of fallthrough comments to fallthrough macro.
      Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f8901b7
    • David S. Miller's avatar
      Merge branch 'netlink-allow-NLA_BINARY-length-range-validation' · 396fc59e
      David S. Miller authored
      Johannes Berg says:
      
      ====================
      netlink: allow NLA_BINARY length range validation
      
      In quite a few places (perhaps particularly in wireless) we need to
      validation an NLA_BINARY attribute with both a minimum and a maximum
      length. Currently, we can do either of the two, but not both, given
      that we have NLA_MIN_LEN (minimum length) and NLA_BINARY (maximum).
      
      Extend the range mechanisms that we use for integer validation to
      apply to NLA_BINARY as well.
      
      After converting everything to use NLA_POLICY_MIN_LEN() we can thus
      get rid of the NLA_MIN_LEN type since that's now a special case of
      NLA_BINARY with a minimum length validation. Similarly, NLA_EXACT_LEN
      can be specified using NLA_POLICY_EXACT_LEN() and also maps to the
      new NLA_BINARY validation (min == max == desired length).
      
      Finally, NLA_POLICY_EXACT_LEN_WARN() also gets to be a somewhat
      special case of this.
      
      I haven't included the patch here now that converts nl82011 to use
      this because it doesn't apply without another cleanup patch, but
      we can remove a number of hand-coded min/max length checks and get
      better error messages from the general validation code while doing
      that.
      
      As I had originally built the netlink policy export to userspace in
      a way that has min/max length for NLA_BINARY (for the types that we
      used to call NLA_MIN_LEN, NLA_BINARY and NLA_EXACT_LEN) anyway, it
      doesn't really change anything there except that now there's a chance
      that userspace sees min length < max length, which previously wasn't
      possible.
      
      v2:
       * fix the min<max comment to correctly say min<=max
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      396fc59e
    • Johannes Berg's avatar
      netlink: make NLA_BINARY validation more flexible · 8aa26c57
      Johannes Berg authored
      Add range validation for NLA_BINARY, allowing validation of any
      combination of combination minimum or maximum lengths, using the
      existing NLA_POLICY_RANGE()/NLA_POLICY_FULL_RANGE() macros, just
      like for integers where the value is checked.
      
      Also make NLA_POLICY_EXACT_LEN(), NLA_POLICY_EXACT_LEN_WARN()
      and NLA_POLICY_MIN_LEN() special cases of this, removing the old
      types NLA_EXACT_LEN and NLA_MIN_LEN.
      
      This allows us to save some code where both minimum and maximum
      lengths are requires, currently the policy only allows maximum
      (NLA_BINARY), minimum (NLA_MIN_LEN) or exact (NLA_EXACT_LEN), so
      a range of lengths cannot be accepted and must be checked by the
      code that consumes the attributes later.
      
      Also, this allows advertising the correct ranges in the policy
      export to userspace. Here, NLA_MIN_LEN and NLA_EXACT_LEN already
      were special cases of NLA_BINARY with min and min/max length
      respectively.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8aa26c57
    • Johannes Berg's avatar
      netlink: consistently use NLA_POLICY_MIN_LEN() · bc043585
      Johannes Berg authored
      Change places that open-code NLA_POLICY_MIN_LEN() to
      use the macro instead, giving us flexibility in how we
      handle the details of the macro.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc043585