1. 01 Aug, 2018 1 commit
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-tools' · 9b7c19e9
      Rafael J. Wysocki authored
      Merge turbostat utility fixes for final 4.18:
      
       - Fix the -S option on 1-CPU systems.
       - Fix computations using incorrect processor core counts.
       - Fix the x2apic debug message.
       - Fix logical node enumeration to allow for non-sequential physical nodes.
       - Fix reported family on modern AMD processors.
       - Clarify the RAPL column information in the man page.
      
      * pm-tools:
        tools/power turbostat: version 18.07.27
        tools/power turbostat: Read extended processor family from CPUID
        tools/power turbostat: Fix logical node enumeration to allow for non-sequential physical nodes
        tools/power turbostat: fix x2apic debug message output file
        tools/power turbostat: fix bogus summary values
        tools/power turbostat: fix -S on UP systems
        tools/power turbostat: Update turbostat(8) RAPL throttling column description
      9b7c19e9
  2. 31 Jul, 2018 1 commit
  3. 29 Jul, 2018 6 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
    • Rafael J. Wysocki's avatar
      Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · b0cd6035
      Rafael J. Wysocki authored
      Pull turbostat utility fixes for 4.18 from Len Brown:
      
      "Three of them are for regressions since Linux-4.17"
      
      * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        tools/power turbostat: version 18.07.27
        tools/power turbostat: Read extended processor family from CPUID
        tools/power turbostat: Fix logical node enumeration to allow for non-sequential physical nodes
        tools/power turbostat: fix x2apic debug message output file
        tools/power turbostat: fix bogus summary values
        tools/power turbostat: fix -S on UP systems
        tools/power turbostat: Update turbostat(8) RAPL throttling column description
      b0cd6035
    • 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
  4. 28 Jul, 2018 3 commits
  5. 27 Jul, 2018 25 commits
  6. 26 Jul, 2018 4 commits
    • Prarit Bhargava's avatar
      tools/power turbostat: Fix logical node enumeration to allow for non-sequential physical nodes · 2ffbb224
      Prarit Bhargava authored
      turbostat fails on some multi-package topologies because the logical node
      enumeration assumes that the nodes are sequentially numbered,
      which causes the logical numa nodes to not be enumerated, or enumerated incorrectly.
      
      Use a more robust enumeration algorithm which allows for non-seqential physical nodes.
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      2ffbb224
    • Len Brown's avatar
      tools/power turbostat: fix x2apic debug message output file · cfce494d
      Len Brown authored
      A recently added x2apic debug message was hard-coded to stderr.
      That doesn't work with "-o outfile".
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      cfce494d
    • Artem Bityutskiy's avatar
      tools/power turbostat: fix bogus summary values · 4f206a0f
      Artem Bityutskiy authored
      This patch fixes a regression introduced in
      
      commit 8cb48b32 ("tools/power turbostat: track thread ID in cpu_topology")
      
      Turbostat uses incorrect cores number ('topo.num_cores') - its value is count
      of logical CPUs, instead of count of physical cores. So it is twice as large as
      it should be on a typical Intel system. For example, on a 6 core Xeon system
      'topo.num_cores' is 12, and on a 52 core Xeon system 'topo.num_cores' is 104.
      
      And interestingly, on a 68-core Knights Landing Intel system 'topo.num_cores'
      is 272, because this system has 4 logical CPUs per core.
      
      As a result, some of the turbostat calculations are incorrect. For example,
      on idle 52-core Xeon system when all cores are ~99% in Core C6 (CPU%c6), the
      summary (very first) line shows ~48% Core C6, while it should be ~99%.
      
      This patch fixes the problem by fixing 'topo.num_cores' calculation.
      
      Was:
      
      1. Init 'thread_id' for all CPUs to -1
      2. Run 'get_thread_siblings()' which sets it to 0 or 1
      3. Increment 'topo.num_cores' when thread_id != -1 (bug!)
      
      Now:
      
      1. Init 'thread_id' for all CPUs to -1
      2. Run 'get_thread_siblings()' which sets it to 0 or 1
      3. Increment 'topo.num_cores' when thread_id is not 0
      
      I did not have a chance to test this on an AMD machine, and only tested on a
      couple of Intel Xeons (6 and 52 cores).
      Reported-by: default avatarVladislav Govtva <vladislav.govtva@intel.com>
      Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      4f206a0f
    • Martin Wilck's avatar
      block: bio_iov_iter_get_pages: pin more pages for multi-segment IOs · 17d51b10
      Martin Wilck authored
      bio_iov_iter_get_pages() currently only adds pages for the next non-zero
      segment from the iov_iter to the bio. That's suboptimal for callers,
      which typically try to pin as many pages as fit into the bio. This patch
      converts the current bio_iov_iter_get_pages() into a static helper, and
      introduces a new helper that allocates as many pages as
      
       1) fit into the bio,
       2) are present in the iov_iter,
       3) and can be pinned by MM.
      
      Error is returned only if zero pages could be pinned. Because of 3), a
      zero return value doesn't necessarily mean all pages have been pinned.
      Callers that have to pin every page in the iov_iter must still call this
      function in a loop (this is currently the case).
      
      This change matters most for __blkdev_direct_IO_simple(), which calls
      bio_iov_iter_get_pages() only once. If it obtains less pages than
      requested, it returns a "short write" or "short read", and
      __generic_file_write_iter() falls back to buffered writes, which may
      lead to data corruption.
      
      Fixes: 72ecad22 ("block: support a full bio worth of IO for simplified bdev direct-io")
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMartin Wilck <mwilck@suse.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      17d51b10