1. 26 Mar, 2020 1 commit
    • Olga Kornievskaia's avatar
      SUNRPC: fix krb5p mount to provide large enough buffer in rq_rcvsize · df513a77
      Olga Kornievskaia authored
      Ever since commit 2c94b8ec ("SUNRPC: Use au_rslack when computing
      reply buffer size"). It changed how "req->rq_rcvsize" is calculated. It
      used to use au_cslack value which was nice and large and changed it to
      au_rslack value which turns out to be too small.
      
      Since 5.1, v3 mount with sec=krb5p fails against an Ontap server
      because client's receive buffer it too small.
      
      For gss krb5p, we need to account for the mic token in the verifier,
      and the wrap token in the wrap token.
      
      RFC 4121 defines:
      mic token
      Octet no   Name        Description
               --------------------------------------------------------------
               0..1     TOK_ID     Identification field.  Tokens emitted by
                                   GSS_GetMIC() contain the hex value 04 04
                                   expressed in big-endian order in this
                                   field.
               2        Flags      Attributes field, as described in section
                                   4.2.2.
               3..7     Filler     Contains five octets of hex value FF.
               8..15    SND_SEQ    Sequence number field in clear text,
                                   expressed in big-endian order.
               16..last SGN_CKSUM  Checksum of the "to-be-signed" data and
                                   octet 0..15, as described in section 4.2.4.
      
      that's 16bytes (GSS_KRB5_TOK_HDR_LEN) + chksum
      
      wrap token
      Octet no   Name        Description
               --------------------------------------------------------------
                0..1     TOK_ID    Identification field.  Tokens emitted by
                                   GSS_Wrap() contain the hex value 05 04
                                   expressed in big-endian order in this
                                   field.
                2        Flags     Attributes field, as described in section
                                   4.2.2.
                3        Filler    Contains the hex value FF.
                4..5     EC        Contains the "extra count" field, in big-
                                   endian order as described in section 4.2.3.
                6..7     RRC       Contains the "right rotation count" in big-
                                   endian order, as described in section
                                   4.2.5.
                8..15    SND_SEQ   Sequence number field in clear text,
                                   expressed in big-endian order.
                16..last Data      Encrypted data for Wrap tokens with
                                   confidentiality, or plaintext data followed
                                   by the checksum for Wrap tokens without
                                   confidentiality, as described in section
                                   4.2.4.
      
      Also 16bytes of header (GSS_KRB5_TOK_HDR_LEN), encrypted data, and cksum
      (other things like padding)
      
      RFC 3961 defines known cksum sizes:
      Checksum type              sumtype        checksum         section or
                                      value            size         reference
         ---------------------------------------------------------------------
         CRC32                            1               4           6.1.3
         rsa-md4                          2              16           6.1.2
         rsa-md4-des                      3              24           6.2.5
         des-mac                          4              16           6.2.7
         des-mac-k                        5               8           6.2.8
         rsa-md4-des-k                    6              16           6.2.6
         rsa-md5                          7              16           6.1.1
         rsa-md5-des                      8              24           6.2.4
         rsa-md5-des3                     9              24             ??
         sha1 (unkeyed)                  10              20             ??
         hmac-sha1-des3-kd               12              20            6.3
         hmac-sha1-des3                  13              20             ??
         sha1 (unkeyed)                  14              20             ??
         hmac-sha1-96-aes128             15              20         [KRB5-AES]
         hmac-sha1-96-aes256             16              20         [KRB5-AES]
         [reserved]                  0x8003               ?         [GSS-KRB5]
      
      Linux kernel now mainly supports type 15,16 so max cksum size is 20bytes.
      (GSS_KRB5_MAX_CKSUM_LEN)
      
      Re-use already existing define of GSS_KRB5_MAX_SLACK_NEEDED that's used
      for encoding the gss_wrap tokens (same tokens are used in reply).
      
      Fixes: 2c94b8ec ("SUNRPC: Use au_rslack when computing reply buffer size")
      Signed-off-by: default avatarOlga Kornievskaia <kolga@netapp.com>
      Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      df513a77
  2. 25 Mar, 2020 2 commits
  3. 22 Mar, 2020 1 commit
  4. 17 Mar, 2020 1 commit
  5. 16 Mar, 2020 28 commits
  6. 15 Mar, 2020 7 commits
    • Linus Torvalds's avatar
      Linux 5.6-rc6 · fb33c651
      Linus Torvalds authored
      fb33c651
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a42a7bb6
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "A single commit to handle an erratum in Cavium ThunderX to prevent
        access to GIC registers which are broken in the implementation"
      
      * tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic-v3: Workaround Cavium erratum 38539 when reading GICD_TYPER2
      a42a7bb6
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 34d5a4b3
      Linus Torvalds authored
      Pull futex fix from Thomas Gleixner:
       "Fix for yet another subtle futex issue.
      
        The futex code used ihold() to prevent inodes from vanishing, but
        ihold() does not guarantee inode persistence. Replace the inode
        pointer with a per boot, machine wide, unique inode identifier.
      
        The second commit fixes the breakage of the hash mechanism which
        causes a 100% performance regression"
      
      * tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Unbreak futex hashing
        futex: Fix inode life-time issue
      34d5a4b3
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ec181b7f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for x86:
      
         - Map EFI runtime service data as encrypted when SEV is enabled.
      
           Otherwise e.g. SMBIOS data cannot be properly decoded by dmidecode.
      
         - Remove the warning in the vector management code which triggered
           when a managed interrupt affinity changed outside of a CPU hotplug
           operation.
      
           The warning was correct until the recent core code change that
           introduced a CPU isolation feature which needs to migrate managed
           interrupts away from online CPUs under certain conditions to
           achieve the isolation"
      
      * tag 'x86-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vector: Remove warning on managed interrupt migration
        x86/ioremap: Map EFI runtime services data as encrypted for SEV
      ec181b7f
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e99bc917
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A pile of perf fixes:
      
        Kernel side:
      
         - AMD uncore driver: Replace the open coded sanity check with the
           core variant, which provides the correct error code and also leaves
           a hint in dmesg
      
        Tooling:
      
         - Fix the stdio input handling with glibc versions >= 2.28
      
         - Unbreak the futex-wake benchmark which was reduced to 0 test
           threads due to the conversion to cpumaps
      
         - Initialize sigaction structs before invoking sys_sigactio()
      
         - Plug the mapfile memory leak in perf jevents
      
         - Fix off by one relative directory includes
      
         - Fix an undefined string comparison in perf diff"
      
      * tag 'perf-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
        tools: Fix off-by 1 relative directory includes
        perf jevents: Fix leak of mapfile memory
        perf bench: Clear struct sigaction before sigaction() syscall
        perf bench futex-wake: Restore thread count default to online CPU count
        perf top: Fix stdio interface input handling with glibc 2.28+
        perf diff: Fix undefined string comparision spotted by clang's -Wstring-compare
        perf symbols: Don't try to find a vmlinux file when looking for kernel modules
        perf bench: Share some global variables to fix build with gcc 10
        perf parse-events: Use asprintf() instead of strncpy() to read tracepoint files
        perf env: Do not return pointers to local variables
        perf tests bp_account: Make global variable static
      e99bc917
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ffe6da91
      Linus Torvalds authored
      Pull timer fix from Thomas Gleixner:
       "A single fix adding the missing time namespace adjustment in
        sys/sysinfo which caused sys/sysinfo to be inconsistent with
        /proc/uptime when read from a task inside a time namespace"
      
      * tag 'timers-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sys/sysinfo: Respect boottime inside time namespace
      ffe6da91
    • Linus Torvalds's avatar
      Merge tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 52ac3777
      Linus Torvalds authored
      Pull RAS fixes from Thomas Gleixner:
       "Two RAS related fixes:
      
         - Shut down the per CPU thermal throttling poll work properly when a
           CPU goes offline.
      
           The missing shutdown caused the poll work to be migrated to a
           unbound worker which triggered warnings about the usage of
           smp_processor_id() in preemptible context
      
         - Fix the PPIN feature initialization which missed to enable the
           functionality when PPIN_CTL was enabled but the MSR locked against
           updates"
      
      * tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Fix logic and comments around MSR_PPIN_CTL
        x86/mce/therm_throt: Undo thermal polling properly on CPU offline
      52ac3777