1. 31 Jul, 2018 4 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace beauty: Default header_dir to cwd to work without parms · 61b229ce
      Arnaldo Carvalho de Melo authored
      Useful when checking the effects of header synchs for the files it uses
      as a input to generate string tables, in retrospect this is how it
      should've been done from day 1, not requiring the header_dir to be set
      on the Makefile, will change everything later, so that the only parm,
      common to all generators will be $(srctree) and $(beauty_outdir).
      
      So, to see what it generates, just call it without any parameters:
      
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh
        static const char *vhost_virtio_ioctl_cmds[] = {
      	[0x00] = "SET_FEATURES",
      	[0x01] = "SET_OWNER",
      	[0x02] = "RESET_OWNER",
      	[0x03] = "SET_MEM_TABLE",
      	[0x04] = "SET_LOG_BASE",
      	[0x07] = "SET_LOG_FD",
      	[0x10] = "SET_VRING_NUM",
      	[0x11] = "SET_VRING_ADDR",
      	[0x12] = "SET_VRING_BASE",
      	[0x13] = "SET_VRING_ENDIAN",
      	[0x14] = "GET_VRING_ENDIAN",
      	[0x20] = "SET_VRING_KICK",
      	[0x21] = "SET_VRING_CALL",
      	[0x22] = "SET_VRING_ERR",
      	[0x23] = "SET_VRING_BUSYLOOP_TIMEOUT",
      	[0x24] = "GET_VRING_BUSYLOOP_TIMEOUT",
      	[0x30] = "NET_SET_BACKEND",
      	[0x40] = "SCSI_SET_ENDPOINT",
      	[0x41] = "SCSI_CLEAR_ENDPOINT",
      	[0x42] = "SCSI_GET_ABI_VERSION",
      	[0x43] = "SCSI_SET_EVENTS_MISSED",
      	[0x44] = "SCSI_GET_EVENTS_MISSED",
      	[0x60] = "VSOCK_SET_GUEST_CID",
      	[0x61] = "VSOCK_SET_RUNNING",
        };
        static const char *vhost_virtio_ioctl_read_cmds[] = {
      	[0x00] = "GET_FEATURES",
      	[0x12] = "GET_VRING_BASE",
        };
        $
      
      Or:
      
        $ tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
        static const char *sndrv_pcm_ioctl_cmds[] = {
      	[0x00] = "PVERSION",
      	[0x01] = "INFO",
      	[0x02] = "TSTAMP",
      	[0x03] = "TTSTAMP",
      	[0x04] = "USER_PVERSION",
      	[0x10] = "HW_REFINE",
      	[0x11] = "HW_PARAMS",
      	[0x12] = "HW_FREE",
      	[0x13] = "SW_PARAMS",
      	[0x20] = "STATUS",
      	[0x21] = "DELAY",
      	[0x22] = "HWSYNC",
      	[0x23] = "SYNC_PTR",
      	[0x24] = "STATUS_EXT",
      	[0x32] = "CHANNEL_INFO",
      	[0x40] = "PREPARE",
      	[0x41] = "RESET",
      	[0x42] = "START",
      	[0x43] = "DROP",
      	[0x44] = "DRAIN",
      	[0x45] = "PAUSE",
      	[0x46] = "REWIND",
      	[0x47] = "RESUME",
      	[0x48] = "XRUN",
      	[0x49] = "FORWARD",
      	[0x50] = "WRITEI_FRAMES",
      	[0x51] = "READI_FRAMES",
      	[0x52] = "WRITEN_FRAMES",
      	[0x53] = "READN_FRAMES",
      	[0x60] = "LINK",
      	[0x61] = "UNLINK",
        };
        $
      
      Etc.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-90am4vm8hh1osms894dp2otr@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      61b229ce
    • Arnaldo Carvalho de Melo's avatar
      c2586cfb
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo-4.18-20180730' of... · ce03b6d2
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo-4.18-20180730' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      - Update the tools copy of several files, including perf_event.h,
        powerpc's asm/unistd.h (new io_pgetevents syscall), bpf.h and
        x86's memcpy_64.s (used in 'perf bench mem'), silencing the
        respective warnings during the perf tools build.
      
      - Fix the build on the alpine:edge distro.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ce03b6d2
    • Kan Liang's avatar
      perf/x86/intel/uncore: Fix hardcoded index of Broadwell extra PCI devices · 156c8b58
      Kan Liang authored
      Masayoshi Mizuma reported that a warning message is shown while a CPU is
      hot-removed on Broadwell servers:
      
        WARNING: CPU: 126 PID: 6 at arch/x86/events/intel/uncore.c:988
        uncore_pci_remove+0x10b/0x150
        Call Trace:
         pci_device_remove+0x42/0xd0
         device_release_driver_internal+0x148/0x220
         pci_stop_bus_device+0x76/0xa0
         pci_stop_root_bus+0x44/0x60
         acpi_pci_root_remove+0x1f/0x80
         acpi_bus_trim+0x57/0x90
         acpi_bus_trim+0x2e/0x90
         acpi_device_hotplug+0x2bc/0x4b0
         acpi_hotplug_work_fn+0x1a/0x30
         process_one_work+0x174/0x3a0
         worker_thread+0x4c/0x3d0
         kthread+0xf8/0x130
      
      This bug was introduced by:
      
        commit 15a3e845 ("perf/x86/intel/uncore: Fix SBOX support for Broadwell CPUs")
      
      The index of "QPI Port 2 filter" was hardcode to 2, but this conflicts with the
      index of "PCU.3" which is "HSWEP_PCI_PCU_3", which equals to 2 as well.
      
      To fix the conflict, the hardcoded index needs to be cleaned up:
      
       - introduce a new enumerator "BDX_PCI_QPI_PORT2_FILTER" for "QPI Port 2
         filter" on Broadwell,
       - increase UNCORE_EXTRA_PCI_DEV_MAX by one,
       - clean up the hardcoded index.
      Debugged-by: default avatarMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
      Suggested-by: default avatarIngo Molnar <mingo@kernel.org>
      Reported-by: default avatarMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
      Tested-by: default avatarMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: msys.mizuma@gmail.com
      Cc: stable@vger.kernel.org
      Fixes: 15a3e845 ("perf/x86/intel/uncore: Fix SBOX support for Broadwell CPUs")
      Link: http://lkml.kernel.org/r/1532953688-15008-1-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      156c8b58
  2. 30 Jul, 2018 10 commits
  3. 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
  4. 28 Jul, 2018 3 commits
  5. 27 Jul, 2018 18 commits