Skip to content
  1. Dec 16, 2018
  2. Dec 15, 2018
  3. Dec 14, 2018
    • Sudarsana Reddy Kalluru's avatar
      qed: Fix command number mismatch between driver and the mfw · c3db8d53
      Sudarsana Reddy Kalluru authored
      
      
      The value for OEM_CFG_UPDATE command differs between driver and the
      Management firmware (mfw). Fix this gap with adding a reserved field.
      
      Fixes: cac6f691 ("qed: Add support for Unified Fabric Port.")
      Signed-off-by: default avatarSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: default avatarAriel Elior <ariel.elior@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3db8d53
    • David S. Miller's avatar
      Merge tag 'mlx5-fixes-2018-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 38ed2235
      David S. Miller authored
      mlx5-fixes-2018-12-13
      
      Subject: [pull request][net 0/9] Mellanox, mlx5 fixes 2018-12-13
      Saeed Mahameed says:
      
      ====================
      This series introduces some fixes to the mlx5 core and mlx5e netdevice
      driver.
      
      =======
      Conflict with net-next: When merged with net-next this series will
      cause a moderate conflict:
      
      1) in drivers/net/ethernet/mellanox/mlx5/core/en_tc.c (2 hunks)
      Take hunks from net only and just replace *attr->mirror_count to *attr->split_count
      1.1) there is one more instance of slow_attr->mirror_count to be replaced
      with slow_attr->split_count, it doesn't appear in the conflict, it will
      cause a compilation error if left out.
      2) in mlx5_ifc.h, take hunks only from net.
      
      Example for the merge resolution can be found at:
      https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=merge/mlx5-fixes&id=48830adf29804d85d77ed8a251d625db0eb5b8a8
      branch merge/mlx5-fixes of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
      (I simply merged this pull request tag into net-next and resolved the conflict)
      
      I don't know if it's ok with you, but to save your time, you can just:
      git pull git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
      
       merge/mlx5-fixes
      Into net-next, before your next net merge, and you will have a clean
      merge of net into net-next (at least for mlx5 files).
      ======
      
      Please pull and let me know if there's any problem.
      
      For -stable v4.18
      338d615be484 ('net/mlx5e: Cancel DIM work on close SQ')
      91f40f9904ad ('net/mlx5e: RX, Verify MPWQE stride size is in range')
      
      For -stable v4.19
      c5c7e1c41bbe ('net/mlx5e: Remove unused UDP GSO remaining counter')
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38ed2235
    • Jakub Kicinski's avatar
      bpf: verifier: make sure callees don't prune with caller differences · 7640ead9
      Jakub Kicinski authored
      
      
      Currently for liveness and state pruning the register parentage
      chains don't include states of the callee.  This makes some sense
      as the callee can't access those registers.  However, this means
      that READs done after the callee returns will not propagate into
      the states of the callee.  Callee will then perform pruning
      disregarding differences in caller state.
      
      Example:
      
         0: (85) call bpf_user_rnd_u32
         1: (b7) r8 = 0
         2: (55) if r0 != 0x0 goto pc+1
         3: (b7) r8 = 1
         4: (bf) r1 = r8
         5: (85) call pc+4
         6: (15) if r8 == 0x1 goto pc+1
         7: (05) *(u64 *)(r9 - 8) = r3
         8: (b7) r0 = 0
         9: (95) exit
      
         10: (15) if r1 == 0x0 goto pc+0
         11: (95) exit
      
      Here we acquire unknown state with call to get_random() [1].  Then
      we store this random state in r8 (either 0 or 1) [1 - 3], and make
      a call on line 5.  Callee does nothing but a trivial conditional
      jump (to create a pruning point).  Upon return caller checks the
      state of r8 and either performs an unsafe read or not.
      
      Verifier will first explore the path with r8 == 1, creating a pruning
      point at [11].  The parentage chain for r8 will include only callers
      states so once verifier reaches [6] it will mark liveness only on states
      in the caller, and not [11].  Now when verifier walks the paths with
      r8 == 0 it will reach [11] and since REG_LIVE_READ on r8 was not
      propagated there it will prune the walk entirely (stop walking
      the entire program, not just the callee).  Since [6] was never walked
      with r8 == 0, [7] will be considered dead and replaced with "goto -1"
      causing hang at runtime.
      
      This patch weaves the callee's explored states onto the callers
      parentage chain.  Rough parentage for r8 would have looked like this
      before:
      
      [0] [1] [2] [3] [4] [5]   [10]      [11]      [6]      [7]
           |           |      ,---|----.    |        |        |
        sl0:         sl0:    / sl0:     \ sl0:      sl0:     sl0:
        fr0: r8 <-- fr0: r8<+--fr0: r8   `fr0: r8  ,fr0: r8<-fr0: r8
                             \ fr1: r8 <- fr1: r8 /
                              \__________________/
      
      after:
      
      [0] [1] [2] [3] [4] [5]   [10]      [11]      [6]      [7]
           |           |          |         |        |        |
         sl0:         sl0:      sl0:       sl0:      sl0:     sl0:
         fr0: r8 <-- fr0: r8 <- fr0: r8 <- fr0: r8 <-fr0: r8<-fr0: r8
                                fr1: r8 <- fr1: r8
      
      Now the mark from instruction 6 will travel through callees states.
      
      Note that we don't have to connect r0 because its overwritten by
      callees state on return and r1 - r5 because those are not alive
      any more once a call is made.
      
      v2:
       - don't connect the callees registers twice (Alexei: suggestion & code)
       - add more details to the comment (Ed & Alexei)
      v1: don't unnecessarily link caller saved regs (Jiong)
      
      Fixes: f4d7e40a ("bpf: introduce function calls (verification)")
      Reported-by: default avatarDavid Beckett <david.beckett@netronome.com>
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarJiong Wang <jiong.wang@netronome.com>
      Reviewed-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      7640ead9
  4. Dec 13, 2018