1. 10 May, 2016 8 commits
  2. 04 May, 2016 1 commit
    • Emmanuel Grumbach's avatar
      iwlwifi: mvm: don't override the rate with the AMSDU len · 5c08b0f5
      Emmanuel Grumbach authored
      The TSO code creates A-MSDUs from a single large send. Each
      A-MSDU is an skb and skb->len doesn't include the number of
      bytes which need to be added for the headers being added
      (subframe header, TCP header, IP header, SNAP, padding).
      
      To be able to set the right value in the Tx command, we
      put the number of bytes added by those headers in
      driver_data in iwl_mvm_tx_tso and use this value in
      iwl_mvm_set_tx_cmd.
      
      The problem by setting this value in driver_data is that
      it overrides the ieee80211_tx_info. The bug manifested
      itself when we send P2P related frames in CCK since the
      rate in ieee80211_tx_info is zero-ed. This of course is
      a violation of the P2P specification.
      
      To fix this, copy the original ieee80211_tx_info to the
      stack and pass it to the functions which need it.
      Assign the number of bytes added by the headers to the
      driver_data inside the skb itself.
      
      Fixes: a6d5e32f ("iwlwifi: mvm: send large SKBs to the transport")
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      5c08b0f5
  3. 12 Apr, 2016 6 commits
  4. 11 Apr, 2016 2 commits
  5. 09 Apr, 2016 13 commits
    • David S. Miller's avatar
    • Eric Dumazet's avatar
      ipv6: fix inet6_lookup_listener() · 03c5b534
      Eric Dumazet authored
      A stupid refactoring bug in inet6_lookup_listener() needs to be fixed
      in order to get proper SO_REUSEPORT behavior.
      
      Fixes: 3b24d854 ("tcp/dccp: do not touch listener sk_refcnt under synflood")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarMaciej Żenczykowski <maze@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03c5b534
    • Linus Torvalds's avatar
      Merge tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 183c948a
      Linus Torvalds authored
      Pull tty fixes from Greg KH:
       "Here are two tty fixes for issues found.
      
        One was due to a merge error in 4.6-rc1, and the other a regression
        fix for UML consoles that broke in 4.6-rc1.
      
        Both have been in linux-next for a while"
      
      * tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: Fix merge of "tty: Refactor tty_open()"
        tty: Fix UML console breakage
      183c948a
    • Linus Torvalds's avatar
      Merge tag 'usb-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · ffb927d1
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB fixes and new device ids for 4.6-rc3.
      
        Nothing major, the normal USB gadget fixes and usb-serial driver ids,
        along with some other fixes mixed in.  All except the USB serial ids
        have been tested in linux-next, the id additions should be fine as
        they are 'trivial'"
      
      * tag 'usb-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits)
        USB: option: add "D-Link DWM-221 B1" device id
        USB: serial: cp210x: Adding GE Healthcare Device ID
        USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devices
        usb: dwc3: keystone: drop dma_mask configuration
        usb: gadget: udc-core: remove manual dma configuration
        usb: dwc3: pci: add ID for one more Intel Broxton platform
        usb: renesas_usbhs: fix to avoid using a disabled ep in usbhsg_queue_done()
        usb: dwc2: do not override forced dr_mode in gadget setup
        usb: gadget: f_midi: unlock on error
        USB: digi_acceleport: do sanity checking for the number of ports
        USB: cypress_m8: add endpoint sanity check
        USB: mct_u232: add sanity checking in probe
        usb: fix regression in SuperSpeed endpoint descriptor parsing
        USB: usbip: fix potential out-of-bounds write
        usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer
        usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler()
        usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize
        usb: phy: qcom-8x16: fix regulator API abuse
        usb: ch9: Fix SSP Device Cap wFunctionalitySupport type
        usb: gadget: composite: Access SSP Dev Cap fields properly
        ...
      ffb927d1
    • Linus Torvalds's avatar
      Merge tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · c6e6e58c
      Linus Torvalds authored
      Pull staging and IIO driver fixes from Greg KH:
       "Here are some IIO driver fixes, along with two staging driver fixes
        for 4.6-rc3.
      
        One staging driver patch reverts the deletion of a driver that
        happened in 4.6-rc1.  We thought that laptop.org was dead, but it's
        still alive and kicking, and has users that were mad we broke their
        hardware by deleting a driver for their machines.  So that driver is
        added back and everyone is happy again.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Revert "Staging: olpc_dcon: Remove obsolete driver"
        staging/rdma/hfi1: select CRC32
        iio: gyro: bmg160: fix buffer read values
        iio: gyro: bmg160: fix endianness when reading axes
        iio: accel: bmc150: fix endianness when reading axes
        iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE
        iio: fix config watermark initial value
        iio: health: max30100: correct FIFO check condition
        iio: imu: Fix inv_mpu6050 dependencies
        iio: adc: Fix build error of missing devm_ioremap_resource on UM
        iio: light: apds9960: correct FIFO check condition
        iio: adc: max1363: correct reference voltage
        iio: adc: max1363: add missing adc to max1363_id
      c6e6e58c
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · fb41b4be
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of eight fixes.
      
        Two are trivial gcc-6 updates (brace additions and unused variable
        removal).  There's a couple of cxlflash regressions, a correction for
        sd being overly chatty on revalidation (causing excess log increases).
        A VPD issue which could crash USB devices because they seem very
        intolerant to VPD inquiries, an ALUA deadlock fix and a mpt3sas buffer
        overrun fix"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: Do not attach VPD to devices that don't support it
        sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes
        scsi_dh_alua: Fix a recently introduced deadlock
        scsi: Declare local symbols static
        cxlflash: Move to exponential back-off when cmd_room is not available
        cxlflash: Fix regression issue with re-ordering patch
        mpt3sas: Don't overreach ioc->reply_post[] during initialization
        aacraid: add missing curly braces
      fb41b4be
    • Linus Torvalds's avatar
      Merge tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 63b106a8
      Linus Torvalds authored
      Pull MD fixes from Shaohua Li:
       "This update mainly fixes bugs:
      
         - fix error handling (Guoqing)
         - fix a crash when a disk is hotremoved (me)
         - fix a dead loop (Wei Fang)"
      
      * tag 'md/4.6-rc2-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
        md/bitmap: clear bitmap if bitmap_create failed
        MD: add rdev reference for super write
        md: fix a trivial typo in comments
        md:raid1: fix a dead loop when read from a WriteMostly disk
      63b106a8
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 40bca9db
      Linus Torvalds authored
      Pull power management and ACPI fixes from Rafael Wysocki:
       "Fixes for some issues discovered after recent changes and for some
        that have just been found lately regardless of those changes
        (intel_pstate, intel_idle, PM core, mailbox/pcc, turbostat) plus
        support for some new CPU models (intel_idle, Intel RAPL driver,
        turbostat) and documentation updates (intel_pstate, PM core).
      
        Specifics:
      
         - intel_pstate fixes for two issues exposed by the recent switch over
           from using timers and for one issue introduced during the 4.4 cycle
           plus new comments describing data structures used by the driver
           (Rafael Wysocki, Srinivas Pandruvada).
      
         - intel_idle fixes related to CPU offline/online (Richard Cochran).
      
         - intel_idle support (new CPU IDs and state definitions mostly) for
           Skylake-X and Kabylake processors (Len Brown).
      
         - PCC mailbox driver fix for an out-of-bounds memory access that may
           cause the kernel to panic() (Shanker Donthineni).
      
         - New (missing) CPU ID for one apparently overlooked Haswell model in
           the Intel RAPL power capping driver (Srinivas Pandruvada).
      
         - Fix for the PM core's wakeup IRQs framework to make it work after
           wakeup settings reconfiguration from sysfs (Grygorii Strashko).
      
         - Runtime PM documentation update to make it describe what needs to
           be done during device removal more precisely (Krzysztof Kozlowski).
      
         - Stale comment removal cleanup in the cpufreq-dt driver (Viresh
           Kumar).
      
         - turbostat utility fixes and support for Broxton, Skylake-X and
           Kabylake processors (Len Brown)"
      
      * tag 'pm+acpi-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (28 commits)
        PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs
        tools/power turbostat: work around RC6 counter wrap
        tools/power turbostat: initial KBL support
        tools/power turbostat: initial SKX support
        tools/power turbostat: decode BXT TSC frequency via CPUID
        tools/power turbostat: initial BXT support
        tools/power turbostat: print IRTL MSRs
        tools/power turbostat: SGX state should print only if --debug
        intel_idle: Add KBL support
        intel_idle: Add SKX support
        intel_idle: Clean up all registered devices on exit.
        intel_idle: Propagate hot plug errors.
        intel_idle: Don't overreact to a cpuidle registration failure.
        intel_idle: Setup the timer broadcast only on successful driver load.
        intel_idle: Avoid a double free of the per-CPU data.
        intel_idle: Fix dangling registration on error path.
        intel_idle: Fix deallocation order on the driver exit path.
        intel_idle: Remove redundant initialization calls.
        intel_idle: Fix a helper function's return value.
        intel_idle: remove useless return from void function.
        ...
      40bca9db
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 9ef11ceb
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Stale SKB data pointer access across pskb_may_pull() calls in L2TP,
          from Haishuang Yan.
      
       2) Fix multicast frame handling in mac80211 AP code, from Felix
          Fietkau.
      
       3) mac80211 station hashtable insert errors not handled properly, fix
          from Johannes Berg.
      
       4) Fix TX descriptor count limit handling in e1000, from Alexander
          Duyck.
      
       5) Revert a buggy netdev refcount fix in netpoll, from Bjorn Helgaas.
      
       6) Must assign rtnl_link_ops of the device before registering it, fix
          in ip6_tunnel from Thadeu Lima de Souza Cascardo.
      
       7) Memory leak fix in tc action net exit, from WANG Cong.
      
       8) Add missing AF_KCM entries to name tables, from Dexuan Cui.
      
       9) Fix regression in GRE handling of csums wrt.  FOU, from Alexander
          Duyck.
      
      10) Fix memory allocation alignment and congestion map corruption in
          RDS, from Shamir Rabinovitch.
      
      11) Fix default qdisc regression in tuntap driver, from Jason Wang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
        bridge, netem: mark mailing lists as moderated
        tuntap: restore default qdisc
        mpls: find_outdev: check for err ptr in addition to NULL check
        ipv6: Count in extension headers in skb->network_header
        RDS: fix congestion map corruption for PAGE_SIZE > 4k
        RDS: memory allocated must be align to 8
        GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU
        net: add the AF_KCM entries to family name tables
        MAINTAINERS: intel-wired-lan list is moderated
        lib/test_bpf: Add additional BPF_ADD tests
        lib/test_bpf: Add test to check for result of 32-bit add that overflows
        lib/test_bpf: Add tests for unsigned BPF_JGT
        lib/test_bpf: Fix JMP_JSET tests
        VSOCK: Detach QP check should filter out non matching QPs.
        stmmac: fix adjust link call in case of a switch is attached
        af_packet: tone down the Tx-ring unsupported spew.
        net_sched: fix a memory leak in tc action
        samples/bpf: Enable powerpc support
        samples/bpf: Use llc in PATH, rather than a hardcoded value
        samples/bpf: Fix build breakage with map_perf_test_user.c
        ...
      9ef11ceb
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 839a3f76
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "These are bug fixes, including a really old fsync bug, and a few trace
        points to help us track down problems in the quota code"
      
      * 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix file/data loss caused by fsync after rename and new inode
        btrfs: Reset IO error counters before start of device replacing
        btrfs: Add qgroup tracing
        Btrfs: don't use src fd for printk
        btrfs: fallback to vmalloc in btrfs_compare_tree
        btrfs: handle non-fatal errors in btrfs_qgroup_inherit()
        btrfs: Output more info for enospc_debug mount option
        Btrfs: fix invalid reference in replace_path
        Btrfs: Improve FL_KEEP_SIZE handling in fallocate
      839a3f76
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 67592126
      Linus Torvalds authored
      Pull orangefs fixes from Mike Marshall:
       "Orangefs cleanups and a strncpy vulnerability fix.
      
        Cleanups:
         - remove an unused variable from orangefs_readdir.
         - clean up printk wrapper used for ofs "gossip" debugging.
         - clean up truncate ctime and mtime setting in inode.c
         - remove a useless null check found by coccinelle.
         - optimize some memcpy/memset boilerplate code.
         - remove some useless sanity checks from xattr.c
      
        Fix:
         - fix a potential strncpy vulnerability"
      
      * tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: remove unused variable
        orangefs: Add KERN_<LEVEL> to gossip_<level> macros
        orangefs: strncpy -> strscpy
        orangefs: clean up truncate ctime and mtime setting
        Orangefs: fix ifnullfree.cocci warnings
        Orangefs: optimize boilerplate code.
        Orangefs: xattr.c cleanup
      67592126
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 1a59c539
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
      
       - compile-time fixes (warnings and failures)
      
       - a bug in iommu core code which could cause the group->domain pointer
         to be falsly cleared
      
       - fix in scatterlist handling of the ARM common DMA-API code
      
       - stall detection fix for the Rockchip IOMMU driver
      
      * tag 'iommu-fixes-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Silence an uninitialized variable warning
        iommu/rockchip: Fix "is stall active" check
        iommu: Don't overwrite domain pointer when there is no default_domain
        iommu/dma: Restore scatterlist offsets correctly
        iommu: provide of_xlate pointer unconditionally
      1a59c539
    • John Allen's avatar
      ibmvnic: Enable use of multiple tx/rx scrqs · 498cd8e4
      John Allen authored
      Enables the use of multiple transmit and receive scrqs allowing the ibmvnic
      driver to take advantage of multiqueue functionality. To achieve this, the
      driver must implement the process of negotiating the maximum number of
      queues allowed by the server. Initially, the driver will attempt to login
      with the maximum number of tx and rx queues supported by the server. If
      the server fails to allocate the requested number of scrqs, it will return
      partial success in the login response. In this case, we must reinitiate
      the login process from the request capabilities stage and attempt to login
      requesting fewer scrqs.
      Signed-off-by: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      498cd8e4
  6. 08 Apr, 2016 10 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-serial-4.6-rc3' of... · 636c8a8d
      Greg Kroah-Hartman authored
      Merge tag 'usb-serial-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
      
      Johan writes:
      
      USB-serial fixes for v4.6-rc3
      
      Here are some new device ids.
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      636c8a8d
    • David S. Miller's avatar
      Merge branch 'dsa-voidify-ops' · e013b778
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: dsa: voidify STP setter and FDB/VLAN add ops
      
      Neither the DSA layer nor the bridge code (see br_set_state) really care
      about eventual errors from STP state setters, so make it void.
      
      The DSA layer separates the prepare and commit phases of switchdev in
      two different functions. Logical errors must not happen in commit
      routines, so make them void.
      
      Changes v1 -> v2:
        - rename port_stp_update to port_stp_state_set
        - don't change code flow of bcm_sf2_sw_br_set_stp_state
        - prefer netdev_err over netdev_warn
      ====================
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e013b778
    • Vivien Didelot's avatar
      net: dsa: make the VLAN add function return void · 4d5770b3
      Vivien Didelot authored
      The switchdev design implies that a software error should not happen in
      the commit phase since it must have been previously reported in the
      prepare phase. If an hardware error occurs during the commit phase,
      there is nothing switchdev can do about it.
      
      The DSA layer separates port_vlan_prepare and port_vlan_add for
      simplicity and convenience. If an hardware error occurs during the
      commit phase, there is no need to report it outside the driver itself.
      
      Make the DSA port_vlan_add routine return void for explicitness.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d5770b3
    • Vivien Didelot's avatar
      net: dsa: make the FDB add function return void · 8497aa61
      Vivien Didelot authored
      The switchdev design implies that a software error should not happen in
      the commit phase since it must have been previously reported in the
      prepare phase. If an hardware error occurs during the commit phase,
      there is nothing switchdev can do about it.
      
      The DSA layer separates port_fdb_prepare and port_fdb_add for simplicity
      and convenience. If an hardware error occurs during the commit phase,
      there is no need to report it outside the DSA driver itself.
      
      Make the DSA port_fdb_add routine return void for explicitness.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8497aa61
    • Vivien Didelot's avatar
      net: dsa: make the STP state function return void · 43c44a9f
      Vivien Didelot authored
      The DSA layer doesn't care about the return code of the port_stp_update
      routine, so make it void in the layer and the DSA drivers.
      
      Replace the useless dsa_slave_stp_update function with a
      dsa_slave_stp_state function used to reply to the switchdev
      SWITCHDEV_ATTR_ID_PORT_STP_STATE attribute.
      
      In the meantime, rename port_stp_update to port_stp_state_set to
      explicit the state change.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43c44a9f
    • Vivien Didelot's avatar
      net: dsa: document missing functions · f453939c
      Vivien Didelot authored
      Add description for the missing port_vlan_prepare, port_fdb_prepare,
      port_fdb_dump functions in the DSA documentation.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f453939c
    • David S. Miller's avatar
      Merge tag 'mac80211-next-for-davem-2016-04-06' of... · 1089ac69
      David S. Miller authored
      Merge tag 'mac80211-next-for-davem-2016-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      For the 4.7 cycle, we have a number of changes:
       * Bob's mesh mode rhashtable conversion, this includes
         the rhashtable API change for allocation flags
       * BSSID scan, connect() command reassoc support (Jouni)
       * fast (optimised data only) and support for RSS in mac80211 (myself)
       * various smaller changes
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1089ac69
    • David S. Miller's avatar
      Merge tag 'mac80211-for-davem-2016-04-06' of... · 30d237a6
      David S. Miller authored
      Merge tag 'mac80211-for-davem-2016-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      For the current RC series, we have the following fixes:
       * TDLS fixes from Arik and Ilan
       * rhashtable fixes from Ben and myself
       * documentation fixes from Luis
       * U-APSD fixes from Emmanuel
       * a TXQ fix from Felix
       * and a compiler warning suppression from Jeff
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30d237a6
    • stephen hemminger's avatar
      bridge, netem: mark mailing lists as moderated · 3430284f
      stephen hemminger authored
      I moderate these (lightly loaded) lists to block spam.
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3430284f
    • Daniel Borkmann's avatar
      bpf, verifier: further improve search pruning · 07016151
      Daniel Borkmann authored
      The verifier needs to go through every path of the program in
      order to check that it terminates safely, which can be quite a
      lot of instructions that need to be processed f.e. in cases with
      more branchy programs. With search pruning from f1bca824 ("bpf:
      add search pruning optimization to verifier") the search space can
      already be reduced significantly when the verifier detects that
      a previously walked path with same register and stack contents
      terminated already (see verifier's states_equal()), so the search
      can skip walking those states.
      
      When working with larger programs of > ~2000 (out of max 4096)
      insns, we found that the current limit of 32k instructions is easily
      hit. For example, a case we ran into is that the search space cannot
      be pruned due to branches at the beginning of the program that make
      use of certain stack space slots (STACK_MISC), which are never used
      in the remaining program (STACK_INVALID). Therefore, the verifier
      needs to walk paths for the slots in STACK_INVALID state, but also
      all remaining paths with a stack structure, where the slots are in
      STACK_MISC, which can nearly double the search space needed. After
      various experiments, we find that a limit of 64k processed insns is
      a more reasonable choice when dealing with larger programs in practice.
      This still allows to reject extreme crafted cases that can have a
      much higher complexity (f.e. > ~300k) within the 4096 insns limit
      due to search pruning not being able to take effect.
      
      Furthermore, we found that a lot of states can be pruned after a
      call instruction, f.e. we were able to reduce the search state by
      ~35% in some cases with this heuristic, trade-off is to keep a bit
      more states in env->explored_states. Usually, call instructions
      have a number of preceding register assignments and/or stack stores,
      where search pruning has a better chance to suceed in states_equal()
      test. The current code marks the branch targets with STATE_LIST_MARK
      in case of conditional jumps, and the next (t + 1) instruction in
      case of unconditional jump so that f.e. a backjump will walk it. We
      also did experiments with using t + insns[t].off + 1 as a marker in
      the unconditionally jump case instead of t + 1 with the rationale
      that these two branches of execution that converge after the label
      might have more potential of pruning. We found that it was a bit
      better, but not necessarily significantly better than the current
      state, perhaps also due to clang not generating back jumps often.
      Hence, we left that as is for now.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07016151