1. 15 Oct, 2019 4 commits
    • Andi Kleen's avatar
      perf evlist: Fix fix for freed id arrays · 5a40e199
      Andi Kleen authored
      In the earlier fix for the memory overrun of id arrays I managed to typo
      the wrong event in the fix.
      
      Of course we need to close the current event in the loop, not the
      original failing event.
      
      The same test case as in the original patch still passes.
      
      Fixes: 7834fa94 ("perf evlist: Fix access of freed id arrays")
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20191011182140.8353-2-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5a40e199
    • Andi Kleen's avatar
      perf script: Fix --reltime with --time · b3509b6e
      Andi Kleen authored
      My earlier patch to just enable --reltime with --time was a little too
      optimistic.  The --time parsing would accept absolute time, which is
      very confusing to the user.
      
      Support relative time in --time parsing too. This only works with recent
      perf record that records the first sample time. Otherwise we error out.
      
      Fixes: 3714437d ("perf script: Allow --time with --reltime")
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: http://lore.kernel.org/lkml/20191011182140.8353-1-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b3509b6e
    • Jiri Olsa's avatar
      perf tools: Allow to build with -ltcmalloc · bb91a073
      Jiri Olsa authored
      By using "make TCMALLOC=1" you can enable perf to be build for usage
      with libtcmalloc.so (gperftools).
      
      Get heap profile (tools/perf directory):
      
        $ <install gperftools>
        $ make TCMALLOC=1 DEBUG=1
        $ HEAPPROFILE=/tmp/heapprof ./perf ...
        $ pprof ./perf /tmp/heapprof.000*
        (pprof) top
        Total: 2335.5 MB
          1735.1  74.3%  74.3%   1735.1  74.3% memdup
           402.0  17.2%  91.5%    402.0  17.2% zalloc
           140.2   6.0%  97.5%    145.8   6.2% map__new
            33.6   1.4%  98.9%     33.6   1.4% symbol__new
            12.4   0.5%  99.5%     12.4   0.5% alloc_event
             6.2   0.3%  99.7%      6.2   0.3% nsinfo__new
             5.5   0.2% 100.0%      5.5   0.2% nsinfo__copy
             0.3   0.0% 100.0%      0.3   0.0% dso__new
             0.1   0.0% 100.0%      0.1   0.0% do_read_string
             0.0   0.0% 100.0%      0.0   0.0% __GI__IO_file_doallocate
      
      See callstack:
        $ pprof --pdf ./perf /tmp/heapprof.00* > callstack.pdf
        $ pprof --web ./perf /tmp/heapprof.00*
      
      Committer testing:
      
      Install gperftools, on fedora:
      
        # dnf install gperftools-devel
      
      Then build:
      
       $ make TCMALLOC=1 DEBUG=1 -C tools/perf O=/tmp/build/perf install-bin
      
      Verify that it linked against the right library:
      
        $ ldd ~/bin/perf | grep tcma
      	libtcmalloc.so.4 => /lib64/libtcmalloc.so.4 (0x00007fb2953a7000)
        $
      
      Run 'perf trace' system wide for 1 minute:
      
        # HEAPPROFILE=/tmp/heapprof perf trace -a sleep 1m
        <SNIP>
         59985.524 ( 0.006 ms): Web Content/20354 recvmsg(fd: 9<socket:[1762817]>, msg: 0x7ffee5fdafb0) = -1 EAGAIN (Resource temporarily unavailable)
         59985.536 ( 0.005 ms): Web Content/20354 recvmsg(fd: 9<socket:[1762817]>, msg: 0x7ffee5fdafc0) = -1 EAGAIN (Resource temporarily unavailable)
         59981.956 (10.143 ms): SCTP timer/21716  ... [continued]: select())                            = 0 (Timeout)
         59985.549 (         ): Web Content/20354 poll(ufds: 0x7f1df38af180, nfds: 3, timeout_msecs: 4294967295) ...
             0.926 (59999.481 ms): sleep/29764  ... [continued]: nanosleep())                           = 0
         59992.133 (         ): SCTP timer/21716 select(tvp: 0x7ff5bf7fee80)                            ...
         60000.477 ( 0.009 ms): sleep/29764 close(fd: 1)                                                = 0
         60000.493 ( 0.005 ms): sleep/29764 close(fd: 2)                                                = 0
         60000.514 (         ): sleep/29764 exit_group()                                                = ?
        Dumping heap profile to /tmp/heapprof.0001.heap (Exiting, 3 MB in use)
      [root@quaco ~]#
      
      Install pprof:
      
        # dnf install pprof
      
      And run it:
      
        # pprof ~/bin/perf /tmp/heapprof.0001.heap
        Using local file /root/bin/perf.
        Using local file /tmp/heapprof.0001.heap.
        Welcome to pprof!  For help, type 'help'.
        (pprof) top
        Total: 4.0 MB
             1.7  42.0%  42.0%      2.2  54.1% map__new
             0.9  23.3%  65.3%      0.9  23.3% zalloc
             0.5  11.4%  76.7%      0.5  11.4% dso__new
             0.2   5.6%  82.3%      0.3   8.5% trace__sys_enter
             0.2   4.9%  87.2%      0.2   4.9% __GI___strdup
             0.2   3.8%  91.0%      0.2   3.8% new_term
             0.1   2.2%  93.2%      0.4  10.1% __perf_pmu__new_alias
             0.0   1.0%  94.3%      0.0   1.2% event_read_fields
             0.0   0.8%  95.1%      0.0   0.8% nsinfo__new
             0.0   0.7%  95.8%      0.1   3.2% trace__read_syscall_info
        (pprof)
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Michael Petlan <mpetlan@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20191013151427.11941-2-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bb91a073
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-5.5-20191011' of... · 39b656ee
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-5.5-20191011' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      perf trace:
      
        Arnaldo Carvalho de Melo:
      
        - Reuse the strace-like syscall_arg_fmt->scnprintf() beautification routines
          (convert integer arguments into strings, like open flags, etc) in tracepoint
          arguments.
      
          For now the type based scnprintf routines (pid_t, umode_t, etc) and the
          ones based in well known arg name based ("fd", etc) gets associated with
          tracepoint args of that type.
      
          A tracepoint only arg, "msr", for the msr:{write,read}_msr gets added as
          an initial step.
      
        - Introduce syscall_arg_fmt->strtoul() methods to be the reverse operation
          of ->scnprintf(), i.e. to go from a string to an integer.
      
        - Implement --filter, just like in 'perf record', that affects the tracepoint
          events specied thus far in the command line, use the ->strtoul() methods
          to allow strings in tables associated with beautifiers to the integers
          the in-kernel tracepoint (eBPF later) filters expect, e.g.:
      
           # perf trace --max-events 1 -e sched:*ipi --filter="cpu==1 || cpu==2"
            0.000 as/24630 sched:sched_wake_idle_without_ipi(cpu: 1)
           #
      
           # perf trace --max-events 1 --max-stack=32 -e msr:* --filter="msr==IA32_TSC_DEADLINE"
            207.000 cc1/19963 msr:write_msr(msr: IA32_TSC_DEADLINE, val: 5442316760822)
                                              do_trace_write_msr ([kernel.kallsyms])
                                              do_trace_write_msr ([kernel.kallsyms])
                                              lapic_next_deadline ([kernel.kallsyms])
                                              clockevents_program_event ([kernel.kallsyms])
                                              hrtimer_interrupt ([kernel.kallsyms])
                                              smp_apic_timer_interrupt ([kernel.kallsyms])
                                              apic_timer_interrupt ([kernel.kallsyms])
                                              [0x6ff66c] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x7047c3] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x707708] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              execute_one_pass (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x4f3d37] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x4f3d49] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              execute_pass_list (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              cgraph_node::expand (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x2625b4] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              symbol_table::finalize_compilation_unit (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x5ae8b9] (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              toplev::main (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              main (/usr/lib/gcc-cross/alpha-linux-gnu/8/cc1)
                                              [0x26b6a] (/usr/lib/x86_64-linux-gnu/libc-2.29.so)
           #
           # perf trace --max-events 8 -e msr:* --filter="msr==IA32_SPEC_CTRL"
               0.000 :13281/13281 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
               0.063 migration/3/25 msr:write_msr(msr: IA32_SPEC_CTRL)
               0.217 kworker/u16:1-/4826 msr:write_msr(msr: IA32_SPEC_CTRL)
               0.687 rcu_sched/11 msr:write_msr(msr: IA32_SPEC_CTRL)
               0.696 :13280/13280 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
               0.305 :13281/13281 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
               0.355 :13274/13274 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
               2.743 kworker/u16:0-/6711 msr:write_msr(msr: IA32_SPEC_CTRL)
           #
           # perf trace --max-events 8 --cpu 1 -e msr:* --filter="msr!=IA32_SPEC_CTRL && msr!=IA32_TSC_DEADLINE && msr != FS_BASE"
                 0.000 mtr-packet/30819 msr:write_msr(msr: 0x830, val: 68719479037)
                 0.096 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST)
               238.925 mtr-packet/30819 msr:write_msr(msr: 0x830, val: 8589936893)
               511.010 :0/0 msr:write_msr(msr: 0x830, val: 68719479037)
              1005.052 :0/0 msr:read_msr(msr: IA32_TSC_ADJUST)
              1235.131 CPU 0/KVM/3750 msr:write_msr(msr: 0x830, val: 4294969595)
              1235.195 CPU 0/KVM/3750 msr:read_msr(msr: IA32_SYSENTER_ESP, val: -2199023037952)
              1235.201 CPU 0/KVM/3750 msr:read_msr(msr: IA32_APICBASE, val: 4276096000)
           #
      
        - Default to not using libtraceevent and its plugins for beautifying
          tracepoint arguments, since now we're reusing the strace-like beatufiers.
          Use --libtraceevent_print (using just --libtrace is unambiguous and can
          be used as a short hand) to go back to those beautifiers.
      
          This will help in the transition, as can be seen in some of the sched tracepoints
          that still need some work in the libbeauty based mode:
      
          # trace --no-inherit -e msr:*,*sleep,sched:* sleep 1
               0.000 (         ): sched:sched_waking(comm: "trace", pid: 3319 (trace), prio: 120, success: 1)
               0.006 (         ): sched:sched_wakeup(comm: "trace", pid: 3319 (trace), prio: 120, success: 1)
               0.348 (         ): sched:sched_process_exec(filename: 140212596720100, pid: 3319 (sleep), old_pid: 3319 (sleep))
               0.490 (         ): msr:write_msr(msr: FS_BASE, val: 139631189321088)
               0.670 (         ): nanosleep(rqtp: 0x7ffc52c23bc0)                                    ...
               0.674 (         ): sched:sched_stat_runtime(comm: "sleep", pid: 3319 (sleep), runtime: 659259, vruntime: 78942418342)
               0.675 (         ): sched:sched_switch(prev_comm: "sleep", prev_pid: 3319 (sleep), prev_prio: 120, prev_state: 1, next_comm: "swapper/0", next_prio: 120)
            1001.059 (         ): sched:sched_waking(comm: "sleep", pid: 3319 (sleep), prio: 120, success: 1)
            1001.098 (         ): sched:sched_wakeup(comm: "sleep", pid: 3319 (sleep), prio: 120, success: 1)
               0.670 (1000.504 ms):  ... [continued]: nanosleep())                                        = 0
            1001.456 (         ): sched:sched_process_exit(comm: "sleep", pid: 3319 (sleep), prio: 120)
          # trace --libtrace --no-inherit -e msr:*,*sleep,sched:* sleep 1
          # trace --libtrace --no-inherit -e msr:*,*sleep,sched:* sleep 1
               0.000 (         ): sched:sched_waking(comm=trace pid=3323 prio=120 target_cpu=000)
               0.007 (         ): sched:sched_wakeup(comm=trace pid=3323 prio=120 target_cpu=000)
               0.382 (         ): sched:sched_process_exec(filename=/usr/bin/sleep pid=3323 old_pid=3323)
               0.525 (         ): msr:write_msr(c0000100, value 7f5d508a0580)
               0.713 (         ): nanosleep(rqtp: 0x7fff487fb4a0)                                    ...
               0.717 (         ): sched:sched_stat_runtime(comm=sleep pid=3323 runtime=617722 [ns] vruntime=78957731636 [ns])
               0.719 (         ): sched:sched_switch(prev_comm=sleep prev_pid=3323 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120)
            1001.117 (         ): sched:sched_waking(comm=sleep pid=3323 prio=120 target_cpu=000)
            1001.157 (         ): sched:sched_wakeup(comm=sleep pid=3323 prio=120 target_cpu=000)
               0.713 (1000.522 ms):  ... [continued]: nanosleep())                                        = 0
            1001.538 (         ): sched:sched_process_exit(comm=sleep pid=3323 prio=120)
          #
      
        - Make -v (verbose) mode be honoured for .perfconfig based trace.add_events,
          to help in diagnosing problems with building eBPF events (-e source.c).
      
        - When using eBPF syscall payload augmentation do not show strace-like
          syscalls when all the user specified was some tracepoint event, bringing
          the behaviour in line with that of when not using eBPF augmentation.
      
      Intel PT:
      
        exported-sql-viewer GUI:
      
        Adrian Hunter:
      
        - Add LookupModel, HBoxLayout, VBoxLayout, global time range calculations
          so as to add a time chart by CPU.
      
      perf script:
      
        Andi Kleen:
      
        - Allow --time (to specify a time span of interest) with --reltime
      
      perf diff:
      
        Jin Yao:
      
        - Report noise for cycles diff, i.e. a histogram + stddev.
          (timestamps relative to start).
      
      perf annotate:
      
        Arnaldo Carvalho de Melo:
      
        - Initialize env->cpuid when running in live mode (perf top), as it
          is used in some of the per arch annotation init routines.
      
      samples bpf:
      
        Björn Töpel:
      
        - Fixup fallout of using tools/perf/perf-sys. from outside tools/perf.
      
      Core:
      
        Ian Rogers:
      
        - Avoid 'sample_reg_masks' being const + weak, as this breaks with some
          compilers that constant-propagate from the weak symbol.
      
      libperf:
      
        - First part of moving the perf_mmap class from tools/perf to libperf.
      
        - Propagate CFLAGS to libperf from the tools/perf Makefile.
      
      Vendor events:
      
        John Garry:
      
        - Add entry in MAINTAINERS with reviewers for the for perf tool arm64
          pmu-events files.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      39b656ee
  2. 13 Oct, 2019 16 commits
  3. 12 Oct, 2019 20 commits
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · da940012
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char/misc driver fixes for 5.4-rc3.
      
        Nothing huge here. Some binder driver fixes (although it is still
        being discussed if these all fix the reported issues or not, so more
        might be coming later), some mei device ids and fixes, and a google
        firmware driver bugfix that fixes a regression, as well as some other
        tiny fixes.
      
        All have been in linux-next with no reported issues"
      
      * tag 'char-misc-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        firmware: google: increment VPD key_len properly
        w1: ds250x: Fix build error without CRC16
        virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr
        binder: Fix comment headers on binder_alloc_prepare_to_free()
        binder: prevent UAF read in print_binder_transaction_log_entry()
        misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach
        mei: avoid FW version request on Ibex Peak and earlier
        mei: me: add comet point (lake) LP device ids
      da940012
    • Linus Torvalds's avatar
      Merge tag 'staging-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 9cbc6348
      Linus Torvalds authored
      Pull staging/IIO driver fixes from Greg KH:
       "Here are some staging and IIO driver fixes for 5.4-rc3.
      
        The "biggest" thing here is a removal of the fbtft device and flexfb
        code as they have been abandoned by their authors and are no longer
        needed for that hardware.
      
        Other than that, the usual amount of staging driver and iio driver
        fixes for reported issues, and some speakup sysfs file documentation,
        which has been long awaited for.
      
        All have been in linux-next with no reported issues"
      
      * tag 'staging-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (32 commits)
        iio: Fix an undefied reference error in noa1305_probe
        iio: light: opt3001: fix mutex unlock race
        iio: adc: ad799x: fix probe error handling
        iio: light: add missing vcnl4040 of_compatible
        iio: light: fix vcnl4000 devicetree hooks
        iio: imu: st_lsm6dsx: fix waitime for st_lsm6dsx i2c controller
        iio: adc: axp288: Override TS pin bias current for some models
        iio: imu: adis16400: fix memory leak
        iio: imu: adis16400: release allocated memory on failure
        iio: adc: stm32-adc: fix a race when using several adcs with dma and irq
        iio: adc: stm32-adc: move registers definitions
        iio: accel: adxl372: Perform a reset at start up
        iio: accel: adxl372: Fix push to buffers lost samples
        iio: accel: adxl372: Fix/remove limitation for FIFO samples
        iio: adc: hx711: fix bug in sampling of data
        staging: vt6655: Fix memory leak in vt6655_probe
        staging: exfat: Use kvzalloc() instead of kzalloc() for exfat_sb_info
        Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc
        staging: speakup: document sysfs attributes
        staging: rtl8188eu: fix HighestRate check in odm_ARFBRefresh_8188E()
        ...
      9cbc6348
    • Linus Torvalds's avatar
      Merge tag 'tty-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 82c87e7d
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty and serial driver fixes for 5.4-rc3 that
        resolve a number of reported issues and regressions.
      
        None of these are huge, full details are in the shortlog. There's also
        a MAINTAINERS update that I think you might have already taken in your
        tree already, but git should handle that merge easily.
      
        All have been in linux-next with no reported issues"
      
      * tag 'tty-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        MAINTAINERS: kgdb: Add myself as a reviewer for kgdb/kdb
        tty: serial: imx: Use platform_get_irq_optional() for optional IRQs
        serial: fix kernel-doc warning in comments
        serial: 8250_omap: Fix gpio check for auto RTS/CTS
        serial: mctrl_gpio: Check for NULL pointer
        tty: serial: fsl_lpuart: Fix lpuart_flush_buffer()
        tty: serial: Fix PORT_LINFLEXUART definition
        tty: n_hdlc: fix build on SPARC
        serial: uartps: Fix uartps_major handling
        serial: uartlite: fix exit path null pointer
        tty: serial: linflexuart: Fix magic SysRq handling
        serial: sh-sci: Use platform_get_irq_optional() for optional interrupts
        dt-bindings: serial: sh-sci: Document r8a774b1 bindings
        serial/sifive: select SERIAL_EARLYCON
        tty: serial: rda: Fix the link time qualifier of 'rda_uart_exit()'
        tty: serial: owl: Fix the link time qualifier of 'owl_uart_exit()'
      82c87e7d
    • Linus Torvalds's avatar
      Merge tag 'usb-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 6c90bbd0
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a lot of small USB driver fixes for 5.4-rc3.
      
        syzbot has stepped up its testing of the USB driver stack, now able to
        trigger fun race conditions between disconnect and probe functions.
        Because of that we have a lot of fixes in here from Johan and others
        fixing these reported issues that have been around since almost all
        time.
      
        We also are just deleting the rio500 driver, making all of the syzbot
        bugs found in it moot as it turns out no one has been using it for
        years as there is a userspace version that is being used instead.
      
        There are also a number of other small fixes in here, all resolving
        reported issues or regressions.
      
        All have been in linux-next without any reported issues"
      
      * tag 'usb-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (65 commits)
        USB: yurex: fix NULL-derefs on disconnect
        USB: iowarrior: use pr_err()
        USB: iowarrior: drop redundant iowarrior mutex
        USB: iowarrior: drop redundant disconnect mutex
        USB: iowarrior: fix use-after-free after driver unbind
        USB: iowarrior: fix use-after-free on release
        USB: iowarrior: fix use-after-free on disconnect
        USB: chaoskey: fix use-after-free on release
        USB: adutux: fix use-after-free on release
        USB: ldusb: fix NULL-derefs on driver unbind
        USB: legousbtower: fix use-after-free on release
        usb: cdns3: Fix for incorrect DMA mask.
        usb: cdns3: fix cdns3_core_init_role()
        usb: cdns3: gadget: Fix full-speed mode
        USB: usb-skeleton: drop redundant in-urb check
        USB: usb-skeleton: fix use-after-free after driver unbind
        USB: usb-skeleton: fix NULL-deref on disconnect
        usb:cdns3: Fix for CV CH9 running with g_zero driver.
        usb: dwc3: Remove dev_err() on platform_get_irq() failure
        usb: dwc3: Switch to platform_get_irq_byname_optional()
        ...
      6c90bbd0
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 328fefad
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Two fixes: a guest-cputime accounting fix, and a cgroup bandwidth
        quota precision fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/vtime: Fix guest/system mis-accounting on task switch
        sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision
      328fefad
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 465a7e29
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Mostly tooling fixes, but also a couple of updates for new Intel
        models (which are technically hw-enablement, but to users it's a fix
        to perf behavior on those new CPUs - hope this is fine), an AUX
        inheritance fix, event time-sharing fix, and a fix for lost non-perf
        NMI events on AMD systems"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
        perf/x86/cstate: Add Tiger Lake CPU support
        perf/x86/msr: Add Tiger Lake CPU support
        perf/x86/intel: Add Tiger Lake CPU support
        perf/x86/cstate: Update C-state counters for Ice Lake
        perf/x86/msr: Add new CPU model numbers for Ice Lake
        perf/x86/cstate: Add Comet Lake CPU support
        perf/x86/msr: Add Comet Lake CPU support
        perf/x86/intel: Add Comet Lake CPU support
        perf/x86/amd: Change/fix NMI latency mitigation to use a timestamp
        perf/core: Fix corner case in perf_rotate_context()
        perf/core: Rework memory accounting in perf_mmap()
        perf/core: Fix inheritance of aux_output groups
        perf annotate: Don't return -1 for error when doing BPF disassembly
        perf annotate: Return appropriate error code for allocation failures
        perf annotate: Fix arch specific ->init() failure errors
        perf annotate: Propagate the symbol__annotate() error return
        perf annotate: Fix the signedness of failure returns
        perf annotate: Propagate perf_env__arch() error
        perf evsel: Fall back to global 'perf_env' in perf_evsel__env()
        perf tools: Propagate get_cpuid() error
        ...
      465a7e29
    • Linus Torvalds's avatar
      Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9b4e40c8
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "Misc EFI fixes all across the map: CPER error report fixes, fixes to
        TPM event log parsing, fix for a kexec hang, a Sparse fix and other
        fixes"
      
      * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/tpm: Fix sanity check of unsigned tbl_size being less than zero
        efi/x86: Do not clean dummy variable in kexec path
        efi: Make unexported efi_rci2_sysfs_init() static
        efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing
        efi/tpm: Don't traverse an event log with no events
        efi/tpm: Don't access event->count when it isn't mapped
        efivar/ssdt: Don't iterate over EFI vars if no SSDT override was specified
        efi/cper: Fix endianness of PCIe class code
      9b4e40c8
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fcb45a28
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "A handful of fixes: a kexec linking fix, an AMD MWAITX fix, a vmware
        guest support fix when built under Clang, and new CPU model number
        definitions"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Add Comet Lake to the Intel CPU models header
        lib/string: Make memzero_explicit() inline instead of external
        x86/cpu/vmware: Use the full form of INL in VMWARE_PORT
        x86/asm: Fix MWAITX C-state hint value
      fcb45a28
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e9ec3588
      Linus Torvalds authored
      Pull x86 license tag fixlets from Ingo Molnar:
       "Fix a couple of SPDX tags in x86 headers to follow the canonical
        pattern"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Use the correct SPDX License Identifier in headers
      e9ec3588
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 48acba98
      Linus Torvalds authored
      Pull RISC-V fixes from Paul Walmsley:
      
       - Fix several bugs in the breakpoint trap handler
      
       - Drop an unnecessary loop around calls to preempt_schedule_irq()
      
      * tag 'riscv/for-v5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: entry: Remove unneeded need_resched() loop
        riscv: Correct the handling of unexpected ebreak in do_trap_break()
        riscv: avoid sending a SIGTRAP to a user thread trapped in WARN()
        riscv: avoid kernel hangs when trapped in BUG()
      48acba98
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.4_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 63f9bff5
      Linus Torvalds authored
      Pull MIPS fixes from Paul Burton:
      
       - Build fixes for CONFIG_OPTIMIZE_INLINING=y builds in which the
         compiler may choose not to inline __xchg() & __cmpxchg().
      
       - A build fix for Loongson configurations with GCC 9.x.
      
       - Expose some extra HWCAP bits to indicate support for various
         instruction set extensions to userland.
      
       - Fix bad stack access in firmware handling code for old SNI
         RM200/300/400 machines.
      
      * tag 'mips_fixes_5.4_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: Disable Loongson MMI instructions for kernel build
        MIPS: elf_hwcap: Export userspace ASEs
        MIPS: fw: sni: Fix out of bounds init of o32 stack
        MIPS: include: Mark __xchg as __always_inline
        MIPS: include: Mark __cmpxchg as __always_inline
      63f9bff5
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · db60a5a0
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fix a kernel crash in spufs_create_root() on Cell machines, since the
        new mount API went in.
      
        Fix a regression in our KVM code caused by our recent PCR changes.
      
        Avoid a warning message about a failing hypervisor API on systems that
        don't have that API.
      
        A couple of minor build fixes.
      
        Thanks to: Alexey Kardashevskiy, Alistair Popple, Desnes A. Nunes do
        Rosario, Emmanuel Nicolet, Jordan Niethe, Laurent Dufour, Stephen
        Rothwell"
      
      * tag 'powerpc-5.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        spufs: fix a crash in spufs_create_root()
        powerpc/kvm: Fix kvmppc_vcore->in_guest value in kvmhv_switch_to_host
        selftests/powerpc: Fix compile error on tlbie_test due to newer gcc
        powerpc/pseries: Remove confusing warning message.
        powerpc/64s/radix: Fix build failure with RADIX_MMU=n
      db60a5a0
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 680b5b3c
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - correct panic handling when running as a Xen guest
      
       - cleanup the Xen grant driver to remove printing a pointer being
         always NULL
      
       - remove a soon to be wrong call of of_dma_configure()
      
      * tag 'for-linus-5.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: Stop abusing DT of_dma_configure API
        xen/grant-table: remove unnecessary printing
        x86/xen: Return from panic notifier
      680b5b3c
    • Linus Torvalds's avatar
      Merge tag 's390-5.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · f154988a
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix virtio-ccw DMA regression
      
       - Fix compiler warnings in uaccess
      
      * tag 's390-5.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/uaccess: avoid (false positive) compiler warnings
        s390/cio: fix virtio-ccw DMA without PV
      f154988a
    • Kan Liang's avatar
      perf/x86/cstate: Add Tiger Lake CPU support · 52e92f40
      Kan Liang authored
      Tiger Lake is the followon to Ice Lake. From the perspective of Intel
      cstate residency counters, there is nothing changed compared with
      Ice Lake.
      
      Share icl_cstates with Ice Lake.
      Update the comments for Tiger Lake.
      
      The External Design Specification (EDS) is not published yet. It comes
      from an authoritative internal source.
      
      The patch has been tested on real hardware.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/1570549810-25049-10-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      52e92f40
    • Kan Liang's avatar
      perf/x86/msr: Add Tiger Lake CPU support · 0917b950
      Kan Liang authored
      Tiger Lake is the followon to Ice Lake. PPERF and SMI_COUNT MSRs are
      also supported.
      
      The External Design Specification (EDS) is not published yet. It comes
      from an authoritative internal source.
      
      The patch has been tested on real hardware.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/1570549810-25049-9-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      0917b950
    • Kan Liang's avatar
      perf/x86/intel: Add Tiger Lake CPU support · 23645a76
      Kan Liang authored
      Tiger Lake is the followon to Ice Lake. From the perspective of Intel
      core PMU, there is little changes compared with Ice Lake, e.g. small
      changes in event list. But it doesn't impact on core PMU functionality.
      Share the perf code with Ice Lake. The event list patch will be submitted
      later separately.
      
      The patch has been tested on real hardware.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/1570549810-25049-8-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      23645a76
    • Kan Liang's avatar
      perf/x86/cstate: Update C-state counters for Ice Lake · f1857a24
      Kan Liang authored
      There is no Core C3 C-State counter for Ice Lake.
      Package C8/C9/C10 C-State counters are added for Ice Lake.
      
      Introduce a new event list, icl_cstates, for Ice Lake.
      Update the comments accordingly.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: f08c47d1 ("perf/x86/intel/cstate: Add Icelake support")
      Link: https://lkml.kernel.org/r/1570549810-25049-7-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f1857a24
    • Kan Liang's avatar
      perf/x86/msr: Add new CPU model numbers for Ice Lake · 1a5da78d
      Kan Liang authored
      PPERF and SMI_COUNT MSRs are also supported by Ice Lake desktop and
      server.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/1570549810-25049-6-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1a5da78d
    • Kan Liang's avatar
      perf/x86/cstate: Add Comet Lake CPU support · 1ffa6c04
      Kan Liang authored
      Comet Lake is the new 10th Gen Intel processor. From the perspective of
      Intel cstate residency counters, there is nothing changed compared with
      Kaby Lake.
      
      Share hswult_cstates with Kaby Lake.
      Update the comments for Comet Lake.
      Kaby Lake is missed in the comments for some Residency Counters. Update
      the comments for Kaby Lake as well.
      
      The External Design Specification (EDS) is not published yet. It comes
      from an authoritative internal source.
      
      The patch has been tested on real hardware.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/1570549810-25049-5-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1ffa6c04