1. 21 Aug, 2019 19 commits
    • Harald Freudenberger's avatar
      s390/pkey: add CCA AES cipher key support · f2bbc96e
      Harald Freudenberger authored
      Introduce new ioctls and structs to be used with these new ioctls
      which are able to handle CCA AES secure keys and CCA AES cipher keys:
      
      PKEY_GENSECK2: Generate secure key, version 2.
        Generate either a CCA AES secure key or a CCA AES cipher key.
      
      PKEY_CLR2SECK2: Generate secure key from clear key value, version 2.
        Construct a CCA AES secure key or CCA AES cipher key from a given
        clear key value.
      
      PKEY_VERIFYKEY2: Verify the given secure key, version 2.
        Check for correct key type. If cardnr and domain are given, also
        check if this apqn is able to handle this type of key. If cardnr and
        domain are 0xFFFF, on return these values are filled with an apqn
        able to handle this key. The function also checks for the master key
        verification patterns of the key matching to the current or
        alternate mkvp of the apqn. CCA AES cipher keys are also checked
        for CPACF export allowed (CPRTCPAC flag). Currently CCA AES secure
        keys and CCA AES cipher keys are supported (may get extended in the
        future).
      
      PKEY_KBLOB2PROTK2: Transform a key blob (of any type) into
        a protected key, version 2. Difference to version 1 is only that
        this new ioctl has additional parameters to provide a list of
        apqns to be used for the transformation.
      
      PKEY_APQNS4K: Generate a list of APQNs based on the key blob given.
        Is able to find out which type of secure key is given (CCA AES
        secure key or CCA AES cipher key) and tries to find all matching
        crypto cards based on the MKVP and maybe other criterias (like CCA
        AES cipher keys need a CEX6C or higher). The list of APQNs is
        further filtered by the key's mkvp which needs to match to either
        the current mkvp or the alternate mkvp (which is the old mkvp on CCA
        adapters) of the apqns. The flags argument may be used to limit the
        matching apqns. If the PKEY_FLAGS_MATCH_CUR_MKVP is given, only the
        current mkvp of each apqn is compared. Likewise with the
        PKEY_FLAGS_MATCH_ALT_MKVP. If both are given it is assumed to return
        apqns where either the current or the alternate mkvp matches. If no
        matching APQN is found, the ioctl returns with 0 but the
        apqn_entries value is 0.
      
      PKEY_APQNS4KT: Generate a list of APQNs based on the key type given.
        Build a list of APQNs based on the given key type and maybe further
        restrict the list by given master key verification patterns.
        For different key types there may be different ways to match the
        master key verification patterns. For CCA keys (CCA data key and CCA
        cipher key) the first 8 bytes of cur_mkvp refer to the current mkvp
        value of the apqn and the first 8 bytes of the alt_mkvp refer to the
        old mkvp. The flags argument controls if the apqns current and/or
        alternate mkvp should match. If the PKEY_FLAGS_MATCH_CUR_MKVP is
        given, only the current mkvp of each apqn is compared. Likewise with
        the PKEY_FLAGS_MATCH_ALT_MKVP. If both are given, it is assumed to
        return apqns where either the current or the alternate mkvp
        matches. If no matching APQN is found, the ioctl returns with 0 but
        the apqn_entries value is 0.
      
      These new ioctls are now prepared for another new type of secure key
      blob which may come in the future. They all use a pointer to the key
      blob and a key blob length information instead of some hardcoded byte
      array. They all use the new enums pkey_key_type, pkey_key_size and
      pkey_key_info for getting/setting key type, key size and additional
      info about the key. All but the PKEY_VERIFY2 ioctl now work based on a
      list of apqns. This list is walked through trying to perform the
      operation on exactly this apqn without any further checking (like card
      type or online state). If the apqn fails, simple the next one in the
      list is tried until success (return 0) or the end of the list is
      reached (return -1 with errno ENODEV). All apqns in the list need to
      be exact apqns (0xFFFF as any card or domain is not allowed). There
      are two new ioctls which can be used to build a list of apqns based on
      a key or key type and maybe restricted by match to a current or
      alternate master key verifcation pattern.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      f2bbc96e
    • Harald Freudenberger's avatar
      s390/zcrypt: Add low level functions for CCA AES cipher keys · 4bc123b1
      Harald Freudenberger authored
      This patch adds low level functions, structs and defines to support
      CCA AES cipher keys:
      - struct cipherkeytoken can be used for an inside view of the CCA AES
        cipher key token blob.
      - function cca_cipher2protkey() derives an CPACF protected key from an
        CCA AES cipher key.
      - function cca_gencipherkey() generates an CCA AES cipher key with
        random value.
      - function cca_findcard2() constructs a list of apqns based on input
        constrains like min hardware type, mkvp values.
      - cca_check_secaescipherkey() does a check on the given CCA AES cipher
        key blob.
      - cca_clr2cipherkey() generates an CCA AES cipher key from a given
        clear key value.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      4bc123b1
    • Harald Freudenberger's avatar
      s390/zcrypt: extend cca_findcard function and helper · 4da57a2f
      Harald Freudenberger authored
      Rework and extension of the cca_findcard function to be prepared for
      other types of secure key blobs. Split the function and extract an
      internal function which has no awareness of key blobs any
      more. Improve this function and the helper code around to be able to
      check for a minimal crypto card hardware level (Background: the newer
      AES cipher keys need to match to the master key verification pattern
      and need to have a crypto card CEX6 or higher).
      
      No API change, neither for the in-kernel API nor the ioctl interface.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      4da57a2f
    • Harald Freudenberger's avatar
      s390/pkey: pkey cleanup: narrow in-kernel API, fix some variable types · 183cb469
      Harald Freudenberger authored
      There are a lot of pkey functions exported as in-kernel callable
      API functions but not used at all. This patch narrows down the
      pkey in-kernel API to what is currently only used and exploited.
      
      Within the kernel just use u32 without any leading __u32. Also
      functions declared in a header file in arch/s390/include/asm
      don't need a comment 'In-kernel API', this is by definition,
      otherwise the header file would be in arch/s390/include/uapi/asm.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      183cb469
    • Vasily Gorbik's avatar
      s390/startup: round down "mem" option to page boundary · 22a33c7e
      Vasily Gorbik authored
      Make a usable value out of "mem" option once and for all. Kasan memory
      allocator just takes memory_end or online memory size as allocation
      base. If memory_end is not aligned paging structures allocated in kasan
      end up unaligned as well. So this change fixes potential kasan crash
      as well.
      
      Fixes: 78333d1f ("s390/kasan: add support for mem= kernel parameter")
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      22a33c7e
    • Vasily Gorbik's avatar
      s390/startup: adjust _sdma and _edma to page boundaries · 80ef517b
      Vasily Gorbik authored
      Move .dma.text section alignment out of section description, otherwise
      zeros used to align the section are included in the section itself (and
      section is not really aligned by itself).
      $ objdump -h arch/s390/boot/compressed/vmlinux
        5 .dma.text     00001e38  000000000001b1c8  000000000001b1c8  0001c1c8  2**2
                        CONTENTS, ALLOC, LOAD, READONLY, CODE
        6 .dma.ex_table 00000018  000000000001d000  000000000001d000  0001e000  2**2
                        CONTENTS, ALLOC, LOAD, READONLY, DATA
        7 .dma.data     00000240  000000000001d080  000000000001d080  0001e080  2**7
                        CONTENTS, ALLOC, LOAD, DATA
      $ cat /sys/kernel/debug/memblock/reserved
         0: 0x0000000000000000..0x0000000000011fff
         1: 0x000000000001b1c8..0x000000000001d2bf
      ...
      
      Also add alignment before _edma linker symbol definition, so that entire
      .dma* region is rounded up to page boundaries.
      $ objdump -h arch/s390/boot/compressed/vmlinux
        5 .dma.text     00001000  000000000001c000  000000000001c000  0001d000  2**2
                        CONTENTS, ALLOC, LOAD, READONLY, CODE
        6 .dma.ex_table 00000018  000000000001d000  000000000001d000  0001e000  2**2
                        CONTENTS, ALLOC, LOAD, READONLY, DATA
        7 .dma.data     00000240  000000000001d080  000000000001d080  0001e080  2**7
                        CONTENTS, ALLOC, LOAD, DATA
      $ cat /sys/kernel/debug/memblock/reserved
         0: 0x0000000000000000..0x0000000000011fff
         1: 0x000000000001c000..0x000000000001dfff
      ...
      $ cat /sys/kernel/debug/kernel_page_tables
      ---[ Identity Mapping ]---
      0x0000000000000000-0x000000000001c000       112K PTE RW NX
      0x000000000001c000-0x000000000001d000         4K PTE RO X
      0x000000000001d000-0x0000000000100000       908K PTE RW NX
      ...
      Reviewed-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      80ef517b
    • Vasily Gorbik's avatar
      s390/stacktrace: use common arch_stack_walk infrastructure · e991e5bb
      Vasily Gorbik authored
      Use common arch_stack_walk infrastructure to avoid duplicated code and
      avoid taking care of the stack storage and filtering.
      
      Common code also uses try_get_task_stack/put_task_stack when needed which
      have been missing in our code, which also solves potential problem for us.
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      e991e5bb
    • Vasily Gorbik's avatar
      s390/kasan: avoid report in get_wchan · 2c7fa8a1
      Vasily Gorbik authored
      Reading other running task's stack can be a dangerous endeavor. Kasan
      stack memory access instrumentation includes special prologue and epilogue
      to mark/remove red zones in shadow memory between stack variables. For
      that reason there is always a race between a task reading value in other
      task's stack and that other task returning from a function and entering
      another one generating different red zones pattern.
      
      To avoid kasan reports simply perform uninstrumented memory reads.
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      2c7fa8a1
    • Vasily Gorbik's avatar
      s390/process: avoid potential reading of freed stack · 8769f610
      Vasily Gorbik authored
      With THREAD_INFO_IN_TASK (which is selected on s390) task's stack usage
      is refcounted and should always be protected by get/put when touching
      other task's stack to avoid race conditions with task's destruction code.
      
      Fixes: d5c352cd ("s390: move thread_info into task_struct")
      Cc: stable@vger.kernel.org # v4.10+
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      8769f610
    • Vasily Gorbik's avatar
      s390/kasan: provide uninstrumented __strlen · f45f7b5b
      Vasily Gorbik authored
      s390 kasan code uses sclp_early_printk to report initialization
      failures. The code doing that should not be instrumented, because kasan
      shadow memory has not been set up yet. Even though sclp_early_core.c is
      compiled with instrumentation disabled it uses strlen function, which
      is instrumented and would produce shadow memory access if used. To
      avoid that, introduce uninstrumented __strlen function to be used
      instead.
      
      Before commit 7e0d92f0 ("s390/kasan: improve string/memory functions
      checks") few string functions (including strlen) were escaping kasan
      instrumentation due to usage of platform specific versions which are
      implemented in inline assembly.
      
      Fixes: 7e0d92f0 ("s390/kasan: improve string/memory functions checks")
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      f45f7b5b
    • Vasily Gorbik's avatar
      s390: clean .bss before running uncompressed kernel · 2e83e0eb
      Vasily Gorbik authored
      Clean uncompressed kernel .bss section in the startup code before
      the uncompressed kernel is executed. At this point of time initrd and
      certificates have been already rescued. Uncompressed kernel .bss size
      is known from vmlinux_info. It is also taken into consideration during
      uncompressed kernel positioning by kaslr (so it is safe to clean it).
      
      With that uncompressed kernel is starting with .bss section zeroed and
      no .bss section usage restrictions apply. Which makes chkbss checks for
      uncompressed kernel objects obsolete and they can be removed.
      
      early_nobss.c is also not needed anymore. Parts of it which are still
      relevant are moved to early.c. Kasan initialization code is now called
      directly from head64 (early.c is instrumented and should not be
      executed before kasan shadow memory is set up).
      Reviewed-by: default avatarPhilipp Rudo <prudo@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      2e83e0eb
    • Vasily Gorbik's avatar
      s390/startup: purge obsolete .gitignore patterns · 19413fe0
      Vasily Gorbik authored
      sizes.h and vmlinux.scr.lds are not generated since commit 369f91c3
      ("s390/decompressor: rework uncompressed image info collection").
      
      vmlinux.bin.full is not generated since commit 183ab05f ("s390: get
      rid of the first mb of uncompressed image").
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      19413fe0
    • Vasily Gorbik's avatar
      s390/startup: add initial pgm check handler · da9ed30d
      Vasily Gorbik authored
      The startup code is getting more complicated with features like kaslr and
      secure boot in place. In a potential unexpected startup code crash case
      the system would end up in a pgm check loop at address 0, overwriting
      pgm check old psw value and just making debugging more complicated. To
      avoid that introduce startup program check handler which is active
      immediately after kernel start and until early_pgm_check_handler is set
      in kernel/early.c. So it covers kernel relocation phase and transition
      to it. This pgm check handler simply saves general/control registers and
      psw in the save area which should guarantee that we still have something
      to look at when standalone dumper is called without saving registers. And
      it does disabled wait with a faulty address in the end.
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      da9ed30d
    • Chuhong Yuan's avatar
      s390/mm: use refcount_t for refcount · 40e90656
      Chuhong Yuan authored
      Reference counters are preferred to use refcount_t instead of
      atomic_t.
      This is because the implementation of refcount_t can prevent
      overflows and detect possible use-after-free.
      So convert atomic_t ref counters to refcount_t.
      
      Link: http://lkml.kernel.org/r/20190808071826.6649-1-hslester96@gmail.comSigned-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      40e90656
    • Chuhong Yuan's avatar
      s390/extmem: use refcount_t for refcount · 3434caec
      Chuhong Yuan authored
      Reference counters are preferred to use refcount_t instead of
      atomic_t.
      This is because the implementation of refcount_t can prevent
      overflows and detect possible use-after-free.
      So convert atomic_t ref counters to refcount_t.
      
      Link: http://lkml.kernel.org/r/20190808071817.6595-1-hslester96@gmail.comSigned-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      3434caec
    • Denis Efremov's avatar
      s390/pci: PCI_IOV_RESOURCES loop refactoring in zpci_map_resources · c4c37723
      Denis Efremov authored
      This patch alters the for loop iteration scheme in zpci_map_resources
      to make it more usual. Thus, the patch generalizes the style for
      PCI_IOV_RESOURCES iteration and improves readability.
      
      Link: http://lkml.kernel.org/r/20190806160137.29275-1-efremov@linux.comSigned-off-by: default avatarDenis Efremov <efremov@linux.com>
      Signed-off-by: default avatarSebastian Ott <sebott@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      c4c37723
    • Vasily Gorbik's avatar
      s390: move vmalloc option parsing to startup code · 59793c5a
      Vasily Gorbik authored
      Few other crucial memory setup options are already handled in
      the startup code. Those values are needed by kaslr and kasan
      implementations. "vmalloc" is the last piece required for future
      improvements such as early decision on kernel page levels depth required
      for actual memory setup, as well as vmalloc memory area access monitoring
      in kasan.
      Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      59793c5a
    • Heiko Carstens's avatar
      Documentation/s390: remove outdated debugging390 documentation · f62f7dcb
      Heiko Carstens authored
      This file would need a lot of work to make sense again. Thomas Huth
      started working on that four years ago, but that wasn't finished.
      Therefore remove this.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      f62f7dcb
    • Heiko Carstens's avatar
      Documentation/s390: remove outdated dasd documentation · 8c72e0c8
      Heiko Carstens authored
      The contents of the file is completely outdated - just remove it.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      8c72e0c8
  2. 29 Jul, 2019 3 commits
    • Harald Freudenberger's avatar
      s390/zcrypt: new sysfs attributes serialnr and mkvps · 7c4e91c0
      Harald Freudenberger authored
      This patch extends the sysfs interface with two new attributes for the
      CEX4, CEX5 and CEX6 crypto cards/queues in coprocessor ('CCA') mode:
        /sys/devices/ap/cardxx/serialnr
        /sys/devices/ap/cardxx/xx.yyyy/mkvps
      
      The serialnr attribute is card based and shows the 8 character ASCII
      serial number string which should unique identify the card.
      
      The mkvps is queue based and displays 3 lines of information about the
      new, current and old master key register:
        AES NEW: <new_aes_mk_state> <new_aes_mk_mkvp>
        AES CUR: <cur_aes_mk_state> <cur_aes_mk_mkvp>
        AES OLD: <old_aes_mk_state> <old_aes_mk_mkvp>
      with
        <new_aes_mk_state>: 'empty' or 'partial' or 'full'
        <cur_aes_mk_state>: 'valid' or 'invalid'
        <old_aes_mk_state>: 'valid' or 'invalid'
        <new_aes_mk_mkvp>, <cur_aes_mk_mkvp>, <old_aes_mk_mkvp>
          8 byte hex string with leading 0x
      MKVP means Master Key Verification Pattern and is a folded hash over
      the key value. Only the states 'full' and 'valid' result in displaying
      a useful mkvp, otherwise a mkvp of all bytes zero is shown. If for any
      reason the FQ fails and the (cached) information is not available, the
      state '-' will be shown with the mkvp value also '-'. The values shown
      here are the very same as the cca panel tools displays. As of now only
      the AES master keys states and verification patterns are shown. A CCA
      APQN also has similar master key registers for DES, RSA and ECC. So
      the content of this attribute may get extended.
      
      Reading the sysfs attribute automatically triggers an FQ CPRB to be
      sent to the queue as long as the queue is (soft-) online. For the
      serialnr attribute the queue with the default domain id is addressed
      (if available and valid). This is reasonable as it is assumed that
      this sysfs interface is not performance critical and on the other side
      a master key change should be visiable as soon as possible. When a
      queue is (soft-) offline however, the cached values are displayed. If
      no cached values are available, the serial number string will be empty
      and the mkvp lines will show state '-' and mkvp value '-'.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      7c4e91c0
    • Harald Freudenberger's avatar
      s390/zcrypt: add base code for cca crypto card info support · 94bbd34e
      Harald Freudenberger authored
      This patch widens the information held for cca crypto apqns.
      Currently the current and old master key verification pattern
      is used by the existing code. Now the new master key registers
      mkvp, the 8 byte serial number and state info about each master
      key register is part of the cca info cache.
      
      In a next step this information will be used to provide some
      additional attributes in sysfs for each CCA crypto adapter.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      94bbd34e
    • Harald Freudenberger's avatar
      s390/zcrypt: move cca misc functions to new code file · efc598e6
      Harald Freudenberger authored
      Rework of the pkey code. Moved all the cca generic code
      away from pkey_api.c into a new file zcrypt_ccamisc.c.
      This new file is now part of the zcrypt device driver
      and exports a bunch of cca functions to pkey and may
      be called from other kernel modules as well.
      
      The pkey ioctl API is unchanged.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      efc598e6
  3. 28 Jul, 2019 13 commits
    • Linus Torvalds's avatar
      Linux 5.3-rc2 · 609488bc
      Linus Torvalds authored
      609488bc
    • Linus Torvalds's avatar
      Merge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · c622fc5f
      Linus Torvalds authored
      Pull structleak fix from Kees Cook:
       "Disable gcc-based stack variable auto-init under KASAN (Arnd
        Bergmann).
      
        This fixes a bunch of build warnings under KASAN and the
        gcc-plugin-based stack auto-initialization features (which are
        arguably redundant, so better to let KASAN control this)"
      
      * tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK
      c622fc5f
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.3' of... · 8e61ea11
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - add compile_commands.json to .gitignore
      
       - fix false-positive warning from gen_compile_commands.py after
         allnoconfig build
      
       - remove unused code
      
      * tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: remove unused single-used-m
        gen_compile_commands: lower the entry count threshold
        .gitignore: Add compilation database file
        kbuild: remove unused objectify macro
      8e61ea11
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 04ce9318
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.3-rc2 to resolve
        some reported issues.
      
        Nothing major at all, some binder bugfixes for issues found, some new
        mei device ids, firmware building warning fixes, habanalabs fixes, a
        few other build fixes, and a MAINTAINERS update.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        test_firmware: fix a memory leak bug
        hpet: Fix division by zero in hpet_time_div()
        eeprom: make older eeprom drivers select NVMEM_SYSFS
        vmw_balloon: Remove Julien from the maintainers list
        fpga-manager: altera-ps-spi: Fix build error
        mei: me: add mule creek canyon (EHL) device ids
        binder: prevent transactions to context manager from its own process.
        binder: Set end of SG buffer area properly.
        firmware: Fix missing inline
        firmware: fix build errors in paged buffer handling code
        habanalabs: don't reset device when getting VRHOT
        habanalabs: use %pad for printing a dma_addr_t
      04ce9318
    • Linus Torvalds's avatar
      Merge tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 572782b2
      Linus Torvalds authored
      Pull tty fixes from Greg KH:
       "Here are two tty/vt fixes:
      
         - delete the netx-serial driver as the arch has been removed, no need
           to keep the serial driver for it around either.
      
         - vt console_lock fix to resolve a reported noisy warning at runtime
      
        Both of these have been in linux-next with no reported issues"
      
      * tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vt: Grab console_lock around con_is_bound in show_bind
        tty: serial: netx: Delete driver
      572782b2
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · ad28fd1c
      Linus Torvalds authored
      Pull SPDX fixes from Greg KH:
       "Here are some small SPDX fixes for 5.3-rc2 for things that came in
        during the 5.3-rc1 merge window that we previously missed.
      
        Only three small patches here:
      
         - two uapi patches to resolve some SPDX tags that were not correct
      
         - fix an invalid SPDX tag in the iomap Makefile file
      
        All have been properly reviewed on the public mailing lists"
      
      * tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        iomap: fix Invalid License ID
        treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers again
        treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
      ad28fd1c
    • Linus Torvalds's avatar
      Merge tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 29af915c
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small fixes for 5.3-rc2. All of these resolve some
        reported issues, some more than others :)
      
        Included in here is:
      
         - xhci fix for an annoying issue with odd devices
      
         - reversion of some usb251xb patches that should not have been merged
      
         - usb pci quirk additions and fixups
      
         - usb storage fix
      
         - usb host controller error test fix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).
        usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port
        Revert "usb: usb251xb: Add US port lanes inversion property"
        Revert "usb: usb251xb: Add US lanes inversion dts-bindings"
        usb: wusbcore: fix unbalanced get/put cluster_id
        usb/hcd: Fix a NULL vs IS_ERR() bug in usb_hcd_setup_local_mem()
        usb-storage: Add a limitation for blk_queue_max_hw_sectors()
        usb: pci-quirks: Minor cleanup for AMD PLL quirk
        usb: pci-quirks: Correct AMD PLL quirk detection
      29af915c
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 5bb575bc
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Here's the first batch of fixes for this release cycle.
      
        Main diffstat here is the re-deletion of netx. I messed up and most
        likely didn't remove the files from the index when I test-merged this
        and saw conflicts, and from there on out 'git rerere' remembered the
        mistake and I missed checking it. Here it's done again as expected.
      
        Besides that:
      
         - A defconfig refresh + enabling of new drivers for u8500
      
         - i.MX fixlets for i2c/SAI/pinmux
      
         - sleep.S build fix for Davinci
      
         - Broadcom devicetree build/warning fix"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: defconfig: u8500: Add new drivers
        ARM: defconfig: u8500: Refresh defconfig
        ARM: dts: bcm: bcm47094: add missing #cells for mdio-bus-mux
        ARM: davinci: fix sleep.S build error on ARMv4
        arm64: dts: imx8mq: fix SAI compatible
        arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1
        ARM: dts: imx6ul: fix clock frequency property name of I2C buses
        ARM: Delete netx a second time
        ARM: dts: imx7ulp: Fix usb-phy unit address format
      5bb575bc
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9815a4f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes and functional updates:
      
         - Prevent stale huge I/O TLB mappings on 32bit. A long standing bug
           which got exposed by KPTI support for 32bit
      
         - Prevent bogus access_ok() warnings in arch_stack_walk_user()
      
         - Add display quirks for Lenovo devices which have height and width
           swapped
      
         - Add the missing CR2 fixup for 32 bit async pagefaults. Fallout of
           the CR2 bug fix series.
      
         - Unbreak handling of force enabled HPET by moving the 'is HPET
           counting' check back to the original place.
      
         - A more accurate check for running on a hypervisor platform in the
           MDS mitigation code. Not perfect, but more accurate than the
           previous one.
      
         - Update a stale and confusing comment vs. IRQ stacks"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation/mds: Apply more accurate check on hypervisor platform
        x86/hpet: Undo the early counter is counting check
        x86/entry/32: Pass cr2 to do_async_page_fault()
        x86/irq/64: Update stale comment
        x86/sysfb_efi: Add quirks for some devices with swapped width and height
        x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user()
        mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
        x86/mm: Sync also unmappings in vmalloc_sync_all()
        x86/mm: Check for pfn instead of page in vmalloc_sync_one()
      a9815a4f
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e24ce84e
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "Two fixes for the fair scheduling class:
      
         - Prevent freeing memory which is accessible by concurrent readers
      
         - Make the RCU annotations for numa groups consistent"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Use RCU accessors consistently for ->numa_group
        sched/fair: Don't free p->numa_faults with concurrent readers
      e24ce84e
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 750991f9
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A pile of perf related fixes:
      
        Kernel:
         - Fix SLOTS PEBS event constraints for Icelake CPUs
      
         - Add the missing mask bit to allow counting hardware generated
           prefetches on L3 for Icelake CPUs
      
         - Make the test for hypervisor platforms more accurate (as far as
           possible)
      
         - Handle PMUs correctly which override event->cpu
      
         - Yet another missing fallthrough annotation
      
        Tools:
           perf.data:
              - Fix loading of compressed data split across adjacent records
              - Fix buffer size setting for processing CPU topology perf.data
                header.
      
           perf stat:
              - Fix segfault for event group in repeat mode
              - Always separate "stalled cycles per insn" line, it was being
                appended to the "instructions" line.
      
           perf script:
              - Fix --max-blocks man page description.
              - Improve man page description of metrics.
              - Fix off by one in brstackinsn IPC computation.
      
           perf probe:
              - Avoid calling freeing routine multiple times for same pointer.
      
           perf build:
              - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings
                treated as errors, breaking the build"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Mark expected switch fall-throughs
        perf/core: Fix creating kernel counters for PMUs that override event->cpu
        perf/x86: Apply more accurate check on hypervisor platform
        perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
        perf/x86/intel: Fix SLOTS PEBS event constraint
        perf build: Do not use -Wshadow on gcc < 4.8
        perf probe: Avoid calling freeing routine multiple times for same pointer
        perf probe: Set pev->nargs to zero after freeing pev->args entries
        perf session: Fix loading of compressed data split across adjacent records
        perf stat: Always separate stalled cycles per insn
        perf stat: Fix segfault for event group in repeat mode
        perf tools: Fix proper buffer size for feature processing
        perf script: Fix off by one in brstackinsn IPC computation
        perf script: Improve man page description of metrics
        perf script: Fix --max-blocks man page description
      750991f9
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 431f288e
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "A set of locking fixes:
      
         - Address the fallout of the rwsem rework. Missing ACQUIREs and a
           sanity check to prevent a use-after-free
      
         - Add missing checks for unitialized mutexes when mutex debugging is
           enabled.
      
         - Remove the bogus code in the generic SMP variant of
           arch_futex_atomic_op_inuser()
      
         - Fixup the #ifdeffery in lockdep to prevent compile warnings"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/mutex: Test for initialized mutex
        locking/lockdep: Clean up #ifdef checks
        locking/lockdep: Hide unused 'class' variable
        locking/rwsem: Add ACQUIRE comments
        tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop
        lcoking/rwsem: Add missing ACQUIRE to read_slowpath sleep loop
        locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty
        locking/rwsem: Don't call owner_on_cpu() on read-owner
        futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()
      431f288e
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 13fbe991
      Linus Torvalds authored
      Pull objtool fix from Thomas Gleixner:
       "A single robustness fix for objtool to handle unbalanced CLAC
        invocations under all circumstances"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Improve UACCESS coverage
      13fbe991
  4. 27 Jul, 2019 5 commits
    • Linus Torvalds's avatar
      Merge tag 'Wimplicit-fallthrough-5.3-rc2' of... · 88c50834
      Linus Torvalds authored
      Merge tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull Wimplicit-fallthrough enablement from Gustavo A. R. Silva:
       "This marks switch cases where we are expecting to fall through, and
        globally enables the -Wimplicit-fallthrough option in the main
        Makefile.
      
        Finally, some missing-break fixes that have been tagged for -stable:
      
         - drm/amdkfd: Fix missing break in switch statement
      
         - drm/amdgpu/gfx10: Fix missing break in switch statement
      
        With these changes, we completely get rid of all the fall-through
        warnings in the kernel"
      
      * tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        Makefile: Globally enable fall-through warning
        drm/i915: Mark expected switch fall-throughs
        drm/amd/display: Mark expected switch fall-throughs
        drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning
        drm/amdgpu/gfx10: Fix missing break in switch statement
        drm/amdkfd: Fix missing break in switch statement
        perf/x86/intel: Mark expected switch fall-throughs
        mtd: onenand_base: Mark expected switch fall-through
        afs: fsclient: Mark expected switch fall-throughs
        afs: yfsclient: Mark expected switch fall-throughs
        can: mark expected switch fall-throughs
        firewire: mark expected switch fall-throughs
      88c50834
    • Linus Torvalds's avatar
      Merge tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 43e317c1
      Linus Torvalds authored
      Pull s390 updates from Heiko Carstens:
      
       - Add ABI to kernel image file which allows e.g. the file utility to
         figure out the kernel version.
      
       - Wire up clone3 system call.
      
       - Add support for kasan bitops instrumentation.
      
       - uapi header cleanup: use __u{16,32,64} instead of uint{16,32,64}_t.
      
       - Provide proper ARCH_ZONE_DMA_BITS so the s390 DMA zone is correctly
         defined with 2 GB instead of the default value of 1 MB.
      
       - Farhan Ali leaves the group of vfio-ccw maintainers.
      
       - Various small vfio-ccw fixes.
      
       - Add missing locking for airq_areas array in virtio code.
      
       - Minor qdio improvements.
      
      * tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        MAINTAINERS: vfio-ccw: Remove myself as the maintainer
        s390/mm: use shared variables for sysctl range check
        virtio/s390: fix race on airq_areas[]
        s390/dma: provide proper ARCH_ZONE_DMA_BITS value
        s390/kasan: add bitops instrumentation
        s390/bitops: make test functions return bool
        s390: wire up clone3 system call
        kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header test
        s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header
        s390/hypfs: fix a typo in the name of a function
        s390/qdio: restrict QAOB usage to IQD unicast queues
        s390/qdio: add sanity checks to the fast-requeue path
        s390: enable detection of kernel version from bzImage
        Documentation: fix vfio-ccw doc
        vfio-ccw: Update documentation for csch/hsch
        vfio-ccw: Don't call cp_free if we are processing a channel program
        vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn
        vfio-ccw: Fix memory leak and don't call cp_free in cp_init
        vfio-ccw: Fix misleading comment when setting orb.cmd.c64
      43e317c1
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 5efbd937
      Linus Torvalds authored
      Pull Devicetree fixes from Rob Herring:
       "The nvmem changes would typically go thru Greg's tree, but they were
        missed in the merge window. [ Acked by Greg ]
      
        Summary:
      
         - Fix mismatches in $id values and actual filenames. Now checked by
           tools.
      
         - Convert nvmem binding to DT schema
      
         - Fix a typo in of_property_read_bool() kerneldoc
      
         - Remove some redundant description in al-fic interrupt-controller"
      
      * tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: Fix more $id value mismatches filenames
        dt-bindings: nvmem: SID: Fix the examples node names
        dt-bindings: nvmem: Add YAML schemas for the generic NVMEM bindings
        of: Fix typo in kerneldoc
        dt-bindings: interrupt-controller: al-fic: remove redundant binding
        dt-bindings: clk: allwinner,sun4i-a10-ccu: Correct path in $id
      5efbd937
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 523634db
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
       "A collection of locking and async operations fixes for v5.3-rc2. These
        had been soaking in a branch targeting the merge window, but missed
        due to a regression hunt. This fixed up version has otherwise been in
        -next this past week with no reported issues.
      
        In order to gain confidence in the locking changes the pull also
        includes a debug / instrumentation patch to enable lockdep coverage
        for libnvdimm subsystem operations that depend on the device_lock for
        exclusion. As mentioned in the changelog it is a hack, but it works
        and documents the locking expectations of the sub-system in a way that
        others can use lockdep to verify. The driver core touches got an ack
        from Greg.
      
        Summary:
      
         - Fix duplicate device_unregister() calls (multiple threads competing
           to do unregister work when scheduling device removal from a sysfs
           attribute of the self-same device).
      
         - Fix badblocks registration order bug. Ensure region badblocks are
           initialized in advance of namespace registration.
      
         - Fix a deadlock between the bus lock and probe operations.
      
         - Export device-core infrastructure to coordinate async operations
           via the device ->dead state.
      
         - Add device-core infrastructure to validate device_lock() usage with
           lockdep"
      
      * tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        driver-core, libnvdimm: Let device subsystems add local lockdep coverage
        libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock
        libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()
        libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant
        libnvdimm/region: Register badblocks before namespaces
        libnvdimm/bus: Prevent duplicate device_unregister() calls
        drivers/base: Introduce kill_device()
      523634db
    • Masahiro Yamada's avatar
      kbuild: remove unused single-used-m · b25e8a23
      Masahiro Yamada authored
      This is unused since commit 9f69a496 ("kbuild: split out *.mod out
      of {single,multi}-used-m rules").
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      b25e8a23