1. 06 Oct, 2019 24 commits
  2. 05 Oct, 2019 16 commits
    • David S. Miller's avatar
      Merge branch 'create-netdevsim-instances-in-namespace' · fbe3d0c7
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      create netdevsim instances in namespace
      
      Allow user to create netdevsim devlink and netdevice instances in a
      network namespace according to the namespace where the user resides in.
      Add a selftest to test this.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbe3d0c7
    • Jiri Pirko's avatar
      selftests: test creating netdevsim inside network namespace · c04d71b5
      Jiri Pirko authored
      Add a test that creates netdevsim instance inside network namespace
      and verifies that the related devlink instance and port netdevices
      reside in the namespace.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c04d71b5
    • Jiri Pirko's avatar
      netdevsim: create devlink and netdev instances in namespace · 7b60027b
      Jiri Pirko authored
      When user does create new netdevsim instance using sysfs bus file,
      create the devlink instance and related netdev instance in the namespace
      of the caller.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b60027b
    • Jiri Pirko's avatar
      net: devlink: export devlink net setter · 8273fd84
      Jiri Pirko authored
      For newly allocated devlink instance allow drivers to set net struct
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8273fd84
    • David S. Miller's avatar
      Merge branch 'net-tls-add-ctrl-path-tracing-and-statistics' · 128d23c3
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      net/tls: add ctrl path tracing and statistics
      
      This set adds trace events related to TLS offload and basic MIB stats
      for TLS.
      
      First patch contains the TLS offload related trace points. Those are
      helpful in troubleshooting offload issues, especially around the
      resync paths.
      
      Second patch adds a tracepoint to the fastpath of device offload,
      it's separated out in case there will be objections to adding
      fast path tracepoints. Again, it's quite useful for debugging
      offload issues.
      
      Next four patches add MIB statistics. The statistics are implemented
      as per-cpu per-netns counters. Since there are currently no fast path
      statistics we could move to atomic variables. Per-CPU seem more common.
      
      Most basic statistics are number of created and live sessions, broken
      out to offloaded and non-offloaded. Users seem to like those a lot.
      
      Next there is a statistic for decryption errors. These are primarily
      useful for device offload debug, in normal deployments decryption
      errors should not be common.
      
      Last but not least a counter for device RX resync.
      ====================
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      128d23c3
    • Jakub Kicinski's avatar
      net/tls: add TlsDeviceRxResync statistic · a4d26fdb
      Jakub Kicinski authored
      Add a statistic for number of RX resyncs sent down to the NIC.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4d26fdb
    • Jakub Kicinski's avatar
      net/tls: add TlsDecryptError stat · 5c5ec668
      Jakub Kicinski authored
      Add a statistic for TLS record decryption errors.
      
      Since devices are supposed to pass records as-is when they
      encounter errors this statistic will count bad records in
      both pure software and inline crypto configurations.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c5ec668
    • Jakub Kicinski's avatar
      net/tls: add statistics for installed sessions · b32fd3cc
      Jakub Kicinski authored
      Add SNMP stats for number of sockets with successfully
      installed sessions.  Break them down to software and
      hardware ones.  Note that if hardware offload fails
      stack uses software implementation, and counts the
      session appropriately.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b32fd3cc
    • Jakub Kicinski's avatar
      net/tls: add skeleton of MIB statistics · d26b698d
      Jakub Kicinski authored
      Add a skeleton structure for adding TLS statistics.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d26b698d
    • Jakub Kicinski's avatar
      net/tls: add device decrypted trace point · 9ec1c6ac
      Jakub Kicinski authored
      Add a tracepoint to the TLS offload's fast path. This tracepoint
      can be used to track the decrypted and encrypted status of received
      records. Records decrypted by the device should have decrypted set
      to 1, records which have neither decrypted nor decrypted set are
      partially decrypted, require re-encryption and therefore are most
      expensive to deal with.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ec1c6ac
    • Jakub Kicinski's avatar
      net/tls: add tracing for device/offload events · 8538d29c
      Jakub Kicinski authored
      Add tracing of device-related interaction to aid performance
      analysis, especially around resync:
      
       tls:tls_device_offload_set
       tls:tls_device_rx_resync_send
       tls:tls_device_rx_resync_nh_schedule
       tls:tls_device_rx_resync_nh_delay
       tls:tls_device_tx_resync_req
       tls:tls_device_tx_resync_send
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8538d29c
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.4' of... · 2d00aee2
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - remove unneeded ar-option and KBUILD_ARFLAGS
      
       - remove long-deprecated SUBDIRS
      
       - fix modpost to suppress false-positive warnings for UML builds
      
       - fix namespace.pl to handle relative paths to ${objtree}, ${srctree}
      
       - make setlocalversion work for /bin/sh
      
       - make header archive reproducible
      
       - fix some Makefiles and documents
      
      * tag 'kbuild-fixes-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kheaders: make headers archive reproducible
        kbuild: update compile-test header list for v5.4-rc2
        kbuild: two minor updates for Documentation/kbuild/modules.rst
        scripts/setlocalversion: clear local variable to make it work for sh
        namespace: fix namespace.pl script to support relative paths
        video/logo: do not generate unneeded logo C files
        video/logo: remove unneeded *.o pattern from clean-files
        integrity: remove pointless subdir-$(CONFIG_...)
        integrity: remove unneeded, broken attempt to add -fshort-wchar
        modpost: fix static EXPORT_SYMBOL warnings for UML build
        kbuild: correct formatting of header in kbuild module docs
        kbuild: remove SUBDIRS support
        kbuild: remove ar-option and KBUILD_ARFLAGS
      2d00aee2
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 126195c9
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Twelve patches mostly small but obvious fixes or cosmetic but small
        updates"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qla2xxx: Fix Nport ID display value
        scsi: qla2xxx: Fix N2N link up fail
        scsi: qla2xxx: Fix N2N link reset
        scsi: qla2xxx: Optimize NPIV tear down process
        scsi: qla2xxx: Fix stale mem access on driver unload
        scsi: qla2xxx: Fix unbound sleep in fcport delete path.
        scsi: qla2xxx: Silence fwdump template message
        scsi: hisi_sas: Make three functions static
        scsi: megaraid: disable device when probe failed after enabled device
        scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue
        scsi: qedf: Remove always false 'tmp_prio < 0' statement
        scsi: ufs: skip shutdown if hba is not powered
        scsi: bnx2fc: Handle scope bits when array returns BUSY or TSF
      126195c9
    • Linus Torvalds's avatar
      Merge branch 'readdir' (readdir speedup and sanity checking) · 4f11918a
      Linus Torvalds authored
      This makes getdents() and getdents64() do sanity checking on the
      pathname that it gives to user space.  And to mitigate the performance
      impact of that, it first cleans up the way it does the user copying, so
      that the code avoids doing the SMAP/PAN updates between each part of the
      dirent structure write.
      
      I really wanted to do this during the merge window, but didn't have
      time.  The conversion of filldir to unsafe_put_user() is something I've
      had around for years now in a private branch, but the extra pathname
      checking finally made me clean it up to the point where it is mergable.
      
      It's worth noting that the filename validity checking really should be a
      bit smarter: it would be much better to delay the error reporting until
      the end of the readdir, so that non-corrupted filenames are still
      returned.  But that involves bigger changes, so let's see if anybody
      actually hits the corrupt directory entry case before worrying about it
      further.
      
      * branch 'readdir':
        Make filldir[64]() verify the directory entry filename is valid
        Convert filldir[64]() from __put_user() to unsafe_put_user()
      4f11918a
    • Linus Torvalds's avatar
      Make filldir[64]() verify the directory entry filename is valid · 8a23eb80
      Linus Torvalds authored
      This has been discussed several times, and now filesystem people are
      talking about doing it individually at the filesystem layer, so head
      that off at the pass and just do it in getdents{64}().
      
      This is partially based on a patch by Jann Horn, but checks for NUL
      bytes as well, and somewhat simplified.
      
      There's also commentary about how it might be better if invalid names
      due to filesystem corruption don't cause an immediate failure, but only
      an error at the end of the readdir(), so that people can still see the
      filenames that are ok.
      
      There's also been discussion about just how much POSIX strictly speaking
      requires this since it's about filesystem corruption.  It's really more
      "protect user space from bad behavior" as pointed out by Jann.  But
      since Eric Biederman looked up the POSIX wording, here it is for context:
      
       "From readdir:
      
         The readdir() function shall return a pointer to a structure
         representing the directory entry at the current position in the
         directory stream specified by the argument dirp, and position the
         directory stream at the next entry. It shall return a null pointer
         upon reaching the end of the directory stream. The structure dirent
         defined in the <dirent.h> header describes a directory entry.
      
        From definitions:
      
         3.129 Directory Entry (or Link)
      
         An object that associates a filename with a file. Several directory
         entries can associate names with the same file.
      
        ...
      
         3.169 Filename
      
         A name consisting of 1 to {NAME_MAX} bytes used to name a file. The
         characters composing the name may be selected from the set of all
         character values excluding the slash character and the null byte. The
         filenames dot and dot-dot have special meaning. A filename is
         sometimes referred to as a 'pathname component'."
      
      Note that I didn't bother adding the checks to any legacy interfaces
      that nobody uses.
      
      Also note that if this ends up being noticeable as a performance
      regression, we can fix that to do a much more optimized model that
      checks for both NUL and '/' at the same time one word at a time.
      
      We haven't really tended to optimize 'memchr()', and it only checks for
      one pattern at a time anyway, and we really _should_ check for NUL too
      (but see the comment about "soft errors" in the code about why it
      currently only checks for '/')
      
      See the CONFIG_DCACHE_WORD_ACCESS case of hash_name() for how the name
      lookup code looks for pathname terminating characters in parallel.
      
      Link: https://lore.kernel.org/lkml/20190118161440.220134-2-jannh@google.com/
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Jann Horn <jannh@google.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8a23eb80