1. 18 Mar, 2022 1 commit
  2. 17 Mar, 2022 16 commits
  3. 16 Mar, 2022 9 commits
  4. 15 Mar, 2022 8 commits
  5. 14 Mar, 2022 6 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 15d70392
      Jakub Kicinski authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net coming late
      in the 5.17-rc process:
      
      1) Revert port remap to mitigate shadowing service ports, this is causing
         problems in existing setups and this mitigation can be achieved with
         explicit ruleset, eg.
      
      	... tcp sport < 16386 tcp dport >= 32768 masquerade random
      
        This patches provided a built-in policy similar to the one described above.
      
      2) Disable register tracking infrastructure in nf_tables. Florian reported
         two issues:
      
         - Existing expressions with no implemented .reduce interface
           that causes data-store on register should cancel the tracking.
         - Register clobbering might be possible storing data on registers that
           are larger than 32-bits.
      
         This might lead to generating incorrect ruleset bytecode. These two
         issues are scheduled to be addressed in the next release cycle.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nf_tables: disable register tracking
        Revert "netfilter: conntrack: tag conntracks picked up in local out hook"
        Revert "netfilter: nat: force port remap to prevent shadowing well-known ports"
      ====================
      
      Link: https://lore.kernel.org/r/20220312220315.64531-1-pablo@netfilter.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      15d70392
    • Kurt Cancemi's avatar
      net: phy: marvell: Fix invalid comparison in the resume and suspend functions · 837d9e49
      Kurt Cancemi authored
      This bug resulted in only the current mode being resumed and suspended when
      the PHY supported both fiber and copper modes and when the PHY only supported
      copper mode the fiber mode would incorrectly be attempted to be resumed and
      suspended.
      
      Fixes: 3758be3d ("Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.")
      Signed-off-by: default avatarKurt Cancemi <kurt@x64architecture.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20220312201512.326047-1-kurt@x64architecture.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      837d9e49
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 6665ca15
      Linus Torvalds authored
      Pull virtio fix from Michael Tsirkin:
       "A last minute regression fix.
      
        I thought we did a lot of testing, but a regression still managed to
        sneak in. The fix seems trivial"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vhost: allow batching hint without size
      6665ca15
    • Sabrina Dubroca's avatar
      esp6: fix check on ipv6_skip_exthdr's return value · 4db4075f
      Sabrina Dubroca authored
      Commit 5f9c55c8 ("ipv6: check return value of ipv6_skip_exthdr")
      introduced an incorrect check, which leads to all ESP packets over
      either TCPv6 or UDPv6 encapsulation being dropped. In this particular
      case, offset is negative, since skb->data points to the ESP header in
      the following chain of headers, while skb->network_header points to
      the IPv6 header:
      
          IPv6 | ext | ... | ext | UDP | ESP | ...
      
      That doesn't seem to be a problem, especially considering that if we
      reach esp6_input_done2, we're guaranteed to have a full set of headers
      available (otherwise the packet would have been dropped earlier in the
      stack). However, it means that the return value will (intentionally)
      be negative. We can make the test more specific, as the expected
      return value of ipv6_skip_exthdr will be the (negated) size of either
      a UDP header, or a TCP header with possible options.
      
      In the future, we should probably either make ipv6_skip_exthdr
      explicitly accept negative offsets (and adjust its return value for
      error cases), or make ipv6_skip_exthdr only take non-negative
      offsets (and audit all callers).
      
      Fixes: 5f9c55c8 ("ipv6: check return value of ipv6_skip_exthdr")
      Reported-by: default avatarXiumei Mu <xmu@redhat.com>
      Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      4db4075f
    • Claudiu Beznea's avatar
      net: dsa: microchip: add spi_device_id tables · e981bc74
      Claudiu Beznea authored
      Add spi_device_id tables to avoid logs like "SPI driver ksz9477-switch
      has no spi_device_id".
      Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e981bc74
    • Brian Masney's avatar
      crypto: qcom-rng - ensure buffer for generate is completely filled · a680b183
      Brian Masney authored
      The generate function in struct rng_alg expects that the destination
      buffer is completely filled if the function returns 0. qcom_rng_read()
      can run into a situation where the buffer is partially filled with
      randomness and the remaining part of the buffer is zeroed since
      qcom_rng_generate() doesn't check the return value. This issue can
      be reproduced by running the following from libkcapi:
      
          kcapi-rng -b 9000000 > OUTFILE
      
      The generated OUTFILE will have three huge sections that contain all
      zeros, and this is caused by the code where the test
      'val & PRNG_STATUS_DATA_AVAIL' fails.
      
      Let's fix this issue by ensuring that qcom_rng_read() always returns
      with a full buffer if the function returns success. Let's also have
      qcom_rng_generate() return the correct value.
      
      Here's some statistics from the ent project
      (https://www.fourmilab.ch/random/) that shows information about the
      quality of the generated numbers:
      
          $ ent -c qcom-random-before
          Value Char Occurrences Fraction
            0           606748   0.067416
            1            33104   0.003678
            2            33001   0.003667
          ...
          253   �        32883   0.003654
          254   �        33035   0.003671
          255   �        33239   0.003693
      
          Total:       9000000   1.000000
      
          Entropy = 7.811590 bits per byte.
      
          Optimum compression would reduce the size
          of this 9000000 byte file by 2 percent.
      
          Chi square distribution for 9000000 samples is 9329962.81, and
          randomly would exceed this value less than 0.01 percent of the
          times.
      
          Arithmetic mean value of data bytes is 119.3731 (127.5 = random).
          Monte Carlo value for Pi is 3.197293333 (error 1.77 percent).
          Serial correlation coefficient is 0.159130 (totally uncorrelated =
          0.0).
      
      Without this patch, the results of the chi-square test is 0.01%, and
      the numbers are certainly not random according to ent's project page.
      The results improve with this patch:
      
          $ ent -c qcom-random-after
          Value Char Occurrences Fraction
            0            35432   0.003937
            1            35127   0.003903
            2            35424   0.003936
          ...
          253   �        35201   0.003911
          254   �        34835   0.003871
          255   �        35368   0.003930
      
          Total:       9000000   1.000000
      
          Entropy = 7.999979 bits per byte.
      
          Optimum compression would reduce the size
          of this 9000000 byte file by 0 percent.
      
          Chi square distribution for 9000000 samples is 258.77, and randomly
          would exceed this value 42.24 percent of the times.
      
          Arithmetic mean value of data bytes is 127.5006 (127.5 = random).
          Monte Carlo value for Pi is 3.141277333 (error 0.01 percent).
          Serial correlation coefficient is 0.000468 (totally uncorrelated =
          0.0).
      
      This change was tested on a Nexus 5 phone (msm8974 SoC).
      Signed-off-by: default avatarBrian Masney <bmasney@redhat.com>
      Fixes: ceec5f5b ("crypto: qcom-rng - Add Qcom prng driver")
      Cc: stable@vger.kernel.org # 4.19+
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      a680b183