1. 07 Aug, 2018 2 commits
    • Herbert Xu's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 3465893d
      Herbert Xu authored
      Merge crypto-2.6 to pick up NEON yield revert.
      3465893d
    • Ard Biesheuvel's avatar
      crypto: arm64 - revert NEON yield for fast AEAD implementations · f10dc56c
      Ard Biesheuvel authored
      As it turns out, checking the TIF_NEED_RESCHED flag after each
      iteration results in a significant performance regression (~10%)
      when running fast algorithms (i.e., ones that use special instructions
      and operate in the < 4 cycles per byte range) on in-order cores with
      comparatively slow memory accesses such as the Cortex-A53.
      
      Given the speed of these ciphers, and the fact that the page based
      nature of the AEAD scatterwalk API guarantees that the core NEON
      transform is never invoked with more than a single page's worth of
      input, we can estimate the worst case duration of any resulting
      scheduling blackout: on a 1 GHz Cortex-A53 running with 64k pages,
      processing a page's worth of input at 4 cycles per byte results in
      a delay of ~250 us, which is a reasonable upper bound.
      
      So let's remove the yield checks from the fused AES-CCM and AES-GCM
      routines entirely.
      
      This reverts commit 7b67ae4d and
      partially reverts commit 7c50136a.
      
      Fixes: 7c50136a ("crypto: arm64/aes-ghash - yield NEON after every ...")
      Fixes: 7b67ae4d ("crypto: arm64/aes-ccm - yield NEON after every ...")
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      f10dc56c
  2. 03 Aug, 2018 24 commits
  3. 31 Jul, 2018 1 commit
  4. 29 Jul, 2018 5 commits
    • Linus Torvalds's avatar
      Linux 4.18-rc7 · acb18725
      Linus Torvalds authored
      acb18725
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 3cfb6772
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Some miscellaneous ext4 fixes for 4.18; one fix is for a regression
        introduced in 4.18-rc4.
      
        Sorry for the late-breaking pull. I was originally going to wait for
        the next merge window, but Eric Whitney found a regression introduced
        in 4.18-rc4, so I decided to push out the regression plus the other
        fixes now. (The other commits have been baking in linux-next since
        early July)"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix check to prevent initializing reserved inodes
        ext4: check for allocation block validity with block group locked
        ext4: fix inline data updates with checksums enabled
        ext4: clear mmp sequence number when remounting read-only
        ext4: fix false negatives *and* false positives in ext4_check_descriptors()
      3cfb6772
    • Linus Torvalds's avatar
      squashfs: be more careful about metadata corruption · 01cfb793
      Linus Torvalds authored
      Anatoly Trosinenko reports that a corrupted squashfs image can cause a
      kernel oops.  It turns out that squashfs can end up being confused about
      negative fragment lengths.
      
      The regular squashfs_read_data() does check for negative lengths, but
      squashfs_read_metadata() did not, and the fragment size code just
      blindly trusted the on-disk value.  Fix both the fragment parsing and
      the metadata reading code.
      Reported-by: default avatarAnatoly Trosinenko <anatoly.trosinenko@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Phillip Lougher <phillip@squashfs.org.uk>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      01cfb793
    • Theodore Ts'o's avatar
      ext4: fix check to prevent initializing reserved inodes · 50122847
      Theodore Ts'o authored
      Commit 8844618d: "ext4: only look at the bg_flags field if it is
      valid" will complain if block group zero does not have the
      EXT4_BG_INODE_ZEROED flag set.  Unfortunately, this is not correct,
      since a freshly created file system has this flag cleared.  It gets
      almost immediately after the file system is mounted read-write --- but
      the following somewhat unlikely sequence will end up triggering a
      false positive report of a corrupted file system:
      
         mkfs.ext4 /dev/vdc
         mount -o ro /dev/vdc /vdc
         mount -o remount,rw /dev/vdc
      
      Instead, when initializing the inode table for block group zero, test
      to make sure that itable_unused count is not too large, since that is
      the case that will result in some or all of the reserved inodes
      getting cleared.
      
      This fixes the failures reported by Eric Whiteney when running
      generic/230 and generic/231 in the the nojournal test case.
      
      Fixes: 8844618d ("ext4: only look at the bg_flags field if it is valid")
      Reported-by: default avatarEric Whitney <enwlinux@gmail.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      50122847
    • Linus Torvalds's avatar
      Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random · a26fb01c
      Linus Torvalds authored
      Pull random fixes from Ted Ts'o:
       "In reaction to the fixes to address CVE-2018-1108, some Linux
        distributions that have certain systemd versions in some cases
        combined with patches to libcrypt for FIPS/FEDRAMP compliance, have
        led to boot-time stalls for some hardware.
      
        The reaction by some distros and Linux sysadmins has been to install
        packages that try to do complicated things with the CPU and hope that
        leads to randomness.
      
        To mitigate this, if RDRAND is available, mix it into entropy provided
        by userspace. It won't hurt, and it will probably help"
      
      * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
        random: mix rdrand with entropy sent in from userspace
      a26fb01c
  5. 28 Jul, 2018 3 commits
  6. 27 Jul, 2018 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20180727' of git://git.kernel.dk/linux-block · eb181a81
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Bigger than usual at this time, mostly due to the O_DIRECT corruption
        issue and the fact that I was on vacation last week. This contains:
      
         - NVMe pull request with two fixes for the FC code, and two target
           fixes (Christoph)
      
         - a DIF bio reset iteration fix (Greg Edwards)
      
         - two nbd reply and requeue fixes (Josef)
      
         - SCSI timeout fixup (Keith)
      
         - a small series that fixes an issue with bio_iov_iter_get_pages(),
           which ended up causing corruption for larger sized O_DIRECT writes
           that ended up racing with buffered writes (Martin Wilck)"
      
      * tag 'for-linus-20180727' of git://git.kernel.dk/linux-block:
        block: reset bi_iter.bi_done after splitting bio
        block: bio_iov_iter_get_pages: pin more pages for multi-segment IOs
        blkdev: __blkdev_direct_IO_simple: fix leak in error case
        block: bio_iov_iter_get_pages: fix size of last iovec
        nvmet: only check for filebacking on -ENOTBLK
        nvmet: fixup crash on NULL device path
        scsi: set timed out out mq requests to complete
        blk-mq: export setting request completion state
        nvme: if_ready checks to fail io to deleting controller
        nvmet-fc: fix target sgl list on large transfers
        nbd: handle unexpected replies better
        nbd: don't requeue the same request twice.
      eb181a81
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 864af0d4
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "11 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        kvm, mm: account shadow page tables to kmemcg
        zswap: re-check zswap_is_full() after do zswap_shrink()
        include/linux/eventfd.h: include linux/errno.h
        mm: fix vma_is_anonymous() false-positives
        mm: use vma_init() to initialize VMAs on stack and data segments
        mm: introduce vma_init()
        mm: fix exports that inadvertently make put_page() EXPORT_SYMBOL_GPL
        ipc/sem.c: prevent queue.status tearing in semop
        mm: disallow mappings that conflict for devm_memremap_pages()
        kasan: only select SLUB_DEBUG with SYSFS=y
        delayacct: fix crash in delayacct_blkio_end() after delayacct init failure
      864af0d4
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 1a3d8691
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
       "Fix a use-after-free error in fatal error recovery (Thomas Tai)"
      
      * tag 'pci-v4.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/AER: Work around use-after-free in pcie_do_fatal_recovery()
      1a3d8691
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6284c99c
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Inevitably, after saying that I hoped we would be done on the fixes
        front, a couple of issues have cropped up over the last week. Next
        time I'll stay schtum.
      
        We've fixed an over-eager BUILD_BUG_ON() which Arnd ran into with
        arndconfig, as well as ensuring that KPTI really is disabled on
        Thunder-X1, where the cure is worse than the disease (this regressed
        when we reworked the heterogeneous CPU feature checking).
      
        Summary:
      
         - Fix disabling of kpti on Thunder-X machines
      
         - Fix premature BUILD_BUG_ON() found with randconfig"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: fix vmemmap BUILD_BUG_ON() triggering on !vmemmap setups
        arm64: Check for errata before evaluating cpu features
      6284c99c
    • Rafał Miłecki's avatar
      Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum" · d5ea019f
      Rafał Miłecki authored
      This reverts commit 2a027b47 ("MIPS: BCM47XX: Enable 74K Core
      ExternalSync for PCIe erratum").
      
      Enabling ExternalSync caused a regression for BCM4718A1 (used e.g. in
      Netgear E3000 and ASUS RT-N16): it simply hangs during PCIe
      initialization. It's likely that BCM4717A1 is also affected.
      
      I didn't notice that earlier as the only BCM47XX devices with PCIe I
      own are:
      1) BCM4706 with 2 x 14e4:4331
      2) BCM4706 with 14e4:4360 and 14e4:4331
      it appears that BCM4706 is unaffected.
      
      While BCM5300X-ES300-RDS.pdf seems to document that erratum and its
      workarounds (according to quotes provided by Tokunori) it seems not even
      Broadcom follows them.
      
      According to the provided info Broadcom should define CONF7_ES in their
      SDK's mipsinc.h and implement workaround in the si_mips_init(). Checking
      both didn't reveal such code. It *could* mean Broadcom also had some
      problems with the given workaround.
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Reported-by: default avatarMichael Marley <michael@michaelmarley.com>
      Patchwork: https://patchwork.linux-mips.org/patch/20032/
      URL: https://bugs.openwrt.org/index.php?do=details&task_id=1688
      Cc: Tokunori Ikegami <ikegami@allied-telesis.co.jp>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      d5ea019f