1. 14 Jun, 2017 5 commits
    • Yonghong Song's avatar
      bpf: permits narrower load from bpf program context fields · 31fd8581
      Yonghong Song authored
      Currently, verifier will reject a program if it contains an
      narrower load from the bpf context structure. For example,
              __u8 h = __sk_buff->hash, or
              __u16 p = __sk_buff->protocol
              __u32 sample_period = bpf_perf_event_data->sample_period
      which are narrower loads of 4-byte or 8-byte field.
      
      This patch solves the issue by:
        . Introduce a new parameter ctx_field_size to carry the
          field size of narrower load from prog type
          specific *__is_valid_access validator back to verifier.
        . The non-zero ctx_field_size for a memory access indicates
          (1). underlying prog type specific convert_ctx_accesses
               supporting non-whole-field access
          (2). the current insn is a narrower or whole field access.
        . In verifier, for such loads where load memory size is
          less than ctx_field_size, verifier transforms it
          to a full field load followed by proper masking.
        . Currently, __sk_buff and bpf_perf_event_data->sample_period
          are supporting narrowing loads.
        . Narrower stores are still not allowed as typical ctx stores
          are just normal stores.
      
      Because of this change, some tests in verifier will fail and
      these tests are removed. As a bonus, rename some out of bound
      __sk_buff->cb access to proper field name and remove two
      redundant "skb cb oob" tests.
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31fd8581
    • Zhang Shengju's avatar
      macvlan: propagate the mac address change status for lowerdev · a88e2676
      Zhang Shengju authored
      The macvlan dev should propagate the return value of mac address change for
      lower device in the passthru mode, instead of always return 0.
      Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a88e2676
    • David S. Miller's avatar
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 55ce889f
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      10GbE Intel Wired LAN Driver Updates 2017-06-13
      
      This series contains updates to ixgbe and ixgbevf only.
      
      Jake completes his fix ups for our drivers with the ixgbe changes to
      resolve a race condition in processing timestamp requests.  These fixes
      are the same fixes Jake applied earlier to the other drivers, including
      the added statistic to help administrators know when an application
      timestamp request is ignored.
      
      With all the recent ixgbe/ixgbevf changes and fixes, Tony bumps the
      the driver versions.  Then Tony provides a fix to resolve a static
      analysis warning by changing a variable to unsigned integer since the
      value can never be negative.
      
      Emil fixes an issue for X550 devices where the qde parameter was being
      ignored, so PFQDE.HIDE_VLAN was not being set.
      
      Jeff Mahoney from SuSE fixes a possible kernel crash, where there was
      a small window where tasks writing to the sriov_numvfs sysfs attribute
      can sneak in after we call register_netdev().  So we need to call
      pci_set_drvdata() before and not after register_netdev() to preserve the
      intent of commit 0fb6a55c ("ixgbe: fix crash on rmmod after probe
      fail").
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55ce889f
    • Jeff Mahoney's avatar
      ixgbe: pci_set_drvdata must be called before register_netdev · a09c0fc3
      Jeff Mahoney authored
      We call pci_set_drvdata immediately after calling register_netdev,
      which leaves a window where tasks writing to the sriov_numvfs sysfs
      attribute can sneak in and crash the kernel.  register_netdev cleans
      up after itself so placing pci_set_drvdata immediately before it
      should preserve the intent of commit 0fb6a55c ("ixgbe: fix crash
      on rmmod after probe fail").
      
      Fixes: 0fb6a55c ("ixgbe: fix crash on rmmod after probe fail")
      Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a09c0fc3
    • Tony Nguyen's avatar
      ixgbe: Resolve cppcheck format string warning · 4ebdf8af
      Tony Nguyen authored
      cppcheck warns that the format string is incorrect in the function
      ixgbe_get_strings().  Since the value cannot be negative, change the
      variable to unsigned which matches the format specifier.
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4ebdf8af
  2. 13 Jun, 2017 35 commits