1. 09 May, 2024 3 commits
    • David Gstir's avatar
      KEYS: trusted: Introduce NXP DCP-backed trusted keys · 2e8a0f40
      David Gstir authored
      DCP (Data Co-Processor) is the little brother of NXP's CAAM IP.
      Beside of accelerated crypto operations, it also offers support for
      hardware-bound keys. Using this feature it is possible to implement a blob
      mechanism similar to what CAAM offers. Unlike on CAAM, constructing and
      parsing the blob has to happen in software (i.e. the kernel).
      
      The software-based blob format used by DCP trusted keys encrypts
      the payload using AES-128-GCM with a freshly generated random key and nonce.
      The random key itself is AES-128-ECB encrypted using the DCP unique
      or OTP key.
      
      The DCP trusted key blob format is:
      /*
       * struct dcp_blob_fmt - DCP BLOB format.
       *
       * @fmt_version: Format version, currently being %1
       * @blob_key: Random AES 128 key which is used to encrypt @payload,
       *            @blob_key itself is encrypted with OTP or UNIQUE device key in
       *            AES-128-ECB mode by DCP.
       * @nonce: Random nonce used for @payload encryption.
       * @payload_len: Length of the plain text @payload.
       * @payload: The payload itself, encrypted using AES-128-GCM and @blob_key,
       *           GCM auth tag of size AES_BLOCK_SIZE is attached at the end of it.
       *
       * The total size of a DCP BLOB is sizeof(struct dcp_blob_fmt) + @payload_len +
       * AES_BLOCK_SIZE.
       */
      struct dcp_blob_fmt {
      	__u8 fmt_version;
      	__u8 blob_key[AES_KEYSIZE_128];
      	__u8 nonce[AES_KEYSIZE_128];
      	__le32 payload_len;
      	__u8 payload[];
      } __packed;
      
      By default the unique key is used. It is also possible to use the
      OTP key. While the unique key should be unique it is not documented how
      this key is derived. Therefore selection the OTP key is supported as
      well via the use_otp_key module parameter.
      Co-developed-by: default avatarRichard Weinberger <richard@nod.at>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Co-developed-by: default avatarDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
      Signed-off-by: default avatarDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
      Signed-off-by: default avatarDavid Gstir <david@sigma-star.at>
      Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      2e8a0f40
    • David Gstir's avatar
      KEYS: trusted: improve scalability of trust source config · 633cb72f
      David Gstir authored
      Enabling trusted keys requires at least one trust source implementation
      (currently TPM, TEE or CAAM) to be enabled. Currently, this is
      done by checking each trust source's config option individually.
      This does not scale when more trust sources like the one for DCP
      are added, because the condition will get long and hard to read.
      
      Add config HAVE_TRUSTED_KEYS which is set to true by each trust source
      once its enabled and adapt the check for having at least one active trust
      source to use this option. Whenever a new trust source is added, it now
      needs to select HAVE_TRUSTED_KEYS.
      Signed-off-by: default avatarDavid Gstir <david@sigma-star.at>
      Tested-by: Jarkko Sakkinen <jarkko@kernel.org> # for TRUSTED_KEYS_TPM
      Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      633cb72f
    • David Gstir's avatar
      crypto: mxs-dcp: Add support for hardware-bound keys · 3d16af0b
      David Gstir authored
      DCP (Data Co-Processor) is able to derive private keys for a fused
      random seed, which can be referenced by handle but not accessed by
      the CPU. Similarly, DCP is able to store arbitrary keys in four
      dedicated key slots located in its secure memory area (internal SRAM).
      These keys can be used to perform AES encryption.
      
      Expose these derived keys and key slots through the crypto API via their
      handle. The main purpose is to add DCP-backed trusted keys. Other
      use cases are possible too (see similar existing paes implementations),
      but these should carefully be evaluated as e.g. enabling AF_ALG will
      give userspace full access to use keys. In scenarios with untrustworthy
      userspace, this will enable en-/decryption oracles.
      Co-developed-by: default avatarRichard Weinberger <richard@nod.at>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Co-developed-by: default avatarDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
      Signed-off-by: default avatarDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
      Signed-off-by: default avatarDavid Gstir <david@sigma-star.at>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      3d16af0b
  2. 08 May, 2024 7 commits
    • Linus Torvalds's avatar
      Merge tag '6.9-rc7-ksmbd-fixes' of git://git.samba.org/ksmbd · 45db3ab7
      Linus Torvalds authored
      Pull smb server fixes from Steve French:
       "Five ksmbd server fixes, all also for stable
      
         - Three fixes related to SMB3 leases (fixes two xfstests, and a
           locking issue)
      
         - Unitialized variable fix
      
         - Socket creation fix when bindv6only is set"
      
      * tag '6.9-rc7-ksmbd-fixes' of git://git.samba.org/ksmbd:
        ksmbd: do not grant v2 lease if parent lease key and epoch are not set
        ksmbd: use rwsem instead of rwlock for lease break
        ksmbd: avoid to send duplicate lease break notifications
        ksmbd: off ipv6only for both ipv4/ipv6 binding
        ksmbd: fix uninitialized symbol 'share' in smb2_tree_connect()
      45db3ab7
    • Linus Torvalds's avatar
      Merge tag 'fuse-fixes-6.9-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 065a057a
      Linus Torvalds authored
      Pull fuse fixes from Miklos Szeredi:
       "Two one-liner fixes for issues introduced in -rc1"
      
      * tag 'fuse-fixes-6.9-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        virtiofs: include a newline in sysfs tag
        fuse: verify zero padding in fuse_backing_map
      065a057a
    • Linus Torvalds's avatar
      Merge tag 'exfat-for-6.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · fe35bf27
      Linus Torvalds authored
      Pull exfat fixes from Namjae Jeon:
      
       - Fix xfstests generic/013 test failure with dirsync mount option
      
       - Initialize the reserved fields of deleted file and stream extension
         dentries to zero
      
      * tag 'exfat-for-6.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: zero the reserved fields of file and stream extension dentries
        exfat: fix timing of synchronizing bitmap and inode
      fe35bf27
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-05-07.2' of https://evilpiepirate.org/git/bcachefs · f5fcbc8b
      Linus Torvalds authored
      Pull bcachefs fixes from Kent Overstreet:
      
       - Various syzbot fixes; mainly small gaps in validation
      
       - Fix an integer overflow in fiemap() which was preventing filefrag
         from returning the full list of extents
      
       - Fix a refcounting bug on the device refcount, turned up by new
         assertions in the development branch
      
       - Fix a device removal/readd bug; write_super() was repeatedly dropping
         and retaking bch_dev->io_ref references
      
      * tag 'bcachefs-2024-05-07.2' of https://evilpiepirate.org/git/bcachefs:
        bcachefs: Add missing sched_annotate_sleep() in bch2_journal_flush_seq_async()
        bcachefs: Fix race in bch2_write_super()
        bcachefs: BCH_SB_LAYOUT_SIZE_BITS_MAX
        bcachefs: Add missing skcipher_request_set_callback() call
        bcachefs: Fix snapshot_t() usage in bch2_fs_quota_read_inode()
        bcachefs: Fix shift-by-64 in bformat_needs_redo()
        bcachefs: Guard against unknown k.k->type in __bkey_invalid()
        bcachefs: Add missing validation for superblock section clean
        bcachefs: Fix assert in bch2_alloc_v4_invalid()
        bcachefs: fix overflow in fiemap
        bcachefs: Add a better limit for maximum number of buckets
        bcachefs: Fix lifetime issue in device iterator helpers
        bcachefs: Fix bch2_dev_lookup() refcounting
        bcachefs: Initialize bch_write_op->failed in inline data path
        bcachefs: Fix refcount put in sb_field_resize error path
        bcachefs: Inodes need extra padding for varint_decode_fast()
        bcachefs: Fix early error path in bch2_fs_btree_key_cache_exit()
        bcachefs: bucket_pos_to_bp_noerror()
        bcachefs: don't free error pointers
        bcachefs: Fix a scheduler splat in __bch2_next_write_buffer_flush_journal_buf()
      f5fcbc8b
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 6d7ddd80
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "These are a couple of last minute fixes that came in over the previous
        week, addressing:
      
         - A pin configuration bug on a qualcomm board that caused issues with
           ethernet and mmc
      
         - Two minor code fixes for misleading console output in the microchip
           firmware driver
      
         - A build warning in the sifive cache driver"
      
      * tag 'soc-fixes-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        firmware: microchip: clarify that sizes and addresses are in hex
        firmware: microchip: don't unconditionally print validation success
        arm64: dts: qcom: sa8155p-adp: fix SDHC2 CD pin configuration
        cache: sifive_ccache: Silence unused variable warning
      6d7ddd80
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · 1ab1a19d
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Update kernel-parameters doc to describe "pcie_aspm=off" more
         accurately (Bjorn Helgaas)
      
       - Restore the parent's (not the child's) ASPM state to the parent
         during resume, which fixes a reboot during resume (Kai-Heng Feng)
      
      * tag 'pci-v6.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI/ASPM: Restore parent state to parent, child state to child
        PCI/ASPM: Clarify that pcie_aspm=off means leave ASPM untouched
      1ab1a19d
    • Brian Foster's avatar
      virtiofs: include a newline in sysfs tag · 96d88f65
      Brian Foster authored
      The internal tag string doesn't contain a newline. Append one when
      emitting the tag via sysfs.
      
      [Stefan] Orthogonal to the newline issue, sysfs_emit(buf, "%s", fs->tag) is
      needed to prevent format string injection.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Fixes: a8f62f50 ("virtiofs: export filesystem tags through sysfs")
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      96d88f65
  3. 07 May, 2024 3 commits
  4. 06 May, 2024 23 commits
  5. 05 May, 2024 4 commits