Skip to content
  1. Jul 31, 2020
    • Thomas Richter's avatar
      perf tests: Fix test 68 zstd compression for s390 · 463538a3
      Thomas Richter authored
      Commit 5aa98879
      
       ("s390/cpum_sf: prohibit callchain data collection")
      prohibits call graph sampling for hardware events on s390. The
      information recorded is out of context and does not match.
      
      On s390 this commit now breaks test case 68 Zstd perf.data
      compression/decompression.
      
      Therefore omit call graph sampling on s390 in this test.
      
      Output before:
        [root@t35lp46 perf]# ./perf test -Fv 68
        68: Zstd perf.data compression/decompression              :
        --- start ---
        Collecting compressed record file:
        Error:
        cycles: PMU Hardware doesn't support sampling/overflow-interrupts.
                                      Try 'perf stat'
        ---- end ----
        Zstd perf.data compression/decompression: FAILED!
        [root@t35lp46 perf]#
      
      Output after:
      [root@t35lp46 perf]# ./perf test -Fv 68
        68: Zstd perf.data compression/decompression              :
        --- start ---
        Collecting compressed record file:
        500+0 records in
        500+0 records out
        256000 bytes (256 kB, 250 KiB) copied, 0.00615638 s, 41.6 MB/s
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.004 MB /tmp/perf.data.X3M,
                              compressed (original 0.002 MB, ratio is 3.609) ]
        Checking compressed events stats:
        # compressed : Zstd, level = 1, ratio = 4
              COMPRESSED events:          1
        2ELIFREPh---- end ----
        Zstd perf.data compression/decompression: Ok
        [root@t35lp46 perf]#
      
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Reviewed-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/lkml/20200729135314.91281-1-tmricht@linux.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      463538a3
    • Philippe Duplessis-Guindon's avatar
      tools lib traceevent: Fix memory leak in process_dynamic_array_len · e24c6447
      Philippe Duplessis-Guindon authored
      
      
      I compiled with AddressSanitizer and I had these memory leaks while I
      was using the tep_parse_format function:
      
          Direct leak of 28 byte(s) in 4 object(s) allocated from:
              #0 0x7fb07db49ffe in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dffe)
              #1 0x7fb07a724228 in extend_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:985
              #2 0x7fb07a724c21 in __read_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1140
              #3 0x7fb07a724f78 in read_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1206
              #4 0x7fb07a725191 in __read_expect_type /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1291
              #5 0x7fb07a7251df in read_expect_type /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1299
              #6 0x7fb07a72e6c8 in process_dynamic_array_len /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:2849
              #7 0x7fb07a7304b8 in process_function /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3161
              #8 0x7fb07a730900 in process_arg_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3207
              #9 0x7fb07a727c0b in process_arg /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1786
              #10 0x7fb07a731080 in event_read_print_args /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3285
              #11 0x7fb07a731722 in event_read_print /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3369
              #12 0x7fb07a740054 in __tep_parse_format /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:6335
              #13 0x7fb07a74047a in __parse_event /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:6389
              #14 0x7fb07a740536 in tep_parse_format /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:6431
              #15 0x7fb07a785acf in parse_event ../../../src/fs-src/fs.c:251
              #16 0x7fb07a785ccd in parse_systems ../../../src/fs-src/fs.c:284
              #17 0x7fb07a786fb3 in read_metadata ../../../src/fs-src/fs.c:593
              #18 0x7fb07a78760e in ftrace_fs_source_init ../../../src/fs-src/fs.c:727
              #19 0x7fb07d90c19c in add_component_with_init_method_data ../../../../src/lib/graph/graph.c:1048
              #20 0x7fb07d90c87b in add_source_component_with_initialize_method_data ../../../../src/lib/graph/graph.c:1127
              #21 0x7fb07d90c92a in bt_graph_add_source_component ../../../../src/lib/graph/graph.c:1152
              #22 0x55db11aa632e in cmd_run_ctx_create_components_from_config_components ../../../src/cli/babeltrace2.c:2252
              #23 0x55db11aa6fda in cmd_run_ctx_create_components ../../../src/cli/babeltrace2.c:2347
              #24 0x55db11aa780c in cmd_run ../../../src/cli/babeltrace2.c:2461
              #25 0x55db11aa8a7d in main ../../../src/cli/babeltrace2.c:2673
              #26 0x7fb07d5460b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
      
      The token variable in the process_dynamic_array_len function is
      allocated in the read_expect_type function, but is not freed before
      calling the read_token function.
      
      Free the token variable before calling read_token in order to plug the
      leak.
      
      Signed-off-by: default avatarPhilippe Duplessis-Guindon <pduplessis@efficios.com>
      Reviewed-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Link: https://lore.kernel.org/linux-trace-devel/20200730150236.5392-1-pduplessis@efficios.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e24c6447
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-07-31' of git://anongit.freedesktop.org/drm/drm · d8b9faec
      Linus Torvalds authored
      Pull more drm fixes from Dave Airlie:
       "As mentioned previously this contains the nouveau regression fix.
      
        amdgpu had three fixes outstanding as well, one revert, an info leak
        and use after free. The use after free is a bit trickier than I'd
        like, and I've personally gone over it to confirm I'm happy that it is
        doing what it says.
      
        nouveau:
         - final modifiers regression fix
      
        amdgpu:
         - Revert a fix which caused other regressions
         - Fix potential kernel info leak
         - Fix a use-after-free bug that was uncovered by another change in 5.7"
      
      * tag 'drm-fixes-2020-07-31' of git://anongit.freedesktop.org/drm/drm:
        drm/nouveau: Accept 'legacy' format modifiers
        Revert "drm/amdgpu: Fix NULL dereference in dpm sysfs handlers"
        drm/amd/display: Clear dm_state for fast updates
        drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()
      d8b9faec
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.8-2020-07-30' of... · 887c909d
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.8-2020-07-30' of git://people.freedesktop.org/~agd5f/linux
      
       into drm-fixes
      
      amd-drm-fixes-5.8-2020-07-30:
      
      amdgpu:
      - Revert a fix which caused other regressions
      - Fix potential kernel info leak
      - Fix a use-after-free bug that was uncovered by another change in 5.7
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200730154338.244104-1-alexander.deucher@amd.com
      887c909d
    • James Jones's avatar
      drm/nouveau: Accept 'legacy' format modifiers · faa0fcf9
      James Jones authored
      
      
      Accept the DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK()
      family of modifiers to handle broken userspace
      Xorg modesetting and Mesa drivers. Existing Mesa
      drivers are still aware of only these older
      format modifiers which do not differentiate
      between different variations of the block linear
      layout. When the format modifier support flag was
      flipped in the nouveau kernel driver, the X.org
      modesetting driver began attempting to use its
      format modifier-enabled framebuffer path. Because
      the set of format modifiers advertised by the
      kernel prior to this change do not intersect with
      the set of format modifiers advertised by Mesa,
      allocating GBM buffers using format modifiers
      fails and the modesetting driver falls back to
      non-modifier allocation. However, it still later
      queries the modifier of the GBM buffer when
      creating its DRM-KMS framebuffer object, receives
      the old-format modifier from Mesa, and attempts
      to create a framebuffer with it. Since the kernel
      is still not aware of these formats, this fails.
      
      Userspace should not be attempting to query format
      modifiers of GBM buffers allocated with a non-
      format-modifier-aware allocation path, but to
      avoid breaking existing userspace behavior, this
      change accepts the old-style format modifiers when
      creating framebuffers and applying them to planes
      by translating them to the equivalent new-style
      modifier. To accomplish this, some layout
      parameters must be assumed to match properties of
      the device targeted by the relevant ioctls. To
      avoid perpetuating misuse of the old-style
      modifiers, this change does not advertise support
      for them. Doing so would imply compatibility
      between devices with incompatible memory layouts.
      
      Tested with Xorg 1.20 modesetting driver,
      weston@c46c70dac84a4b3030cd05b380f9f410536690fc,
      gnome & KDE wayland desktops from Ubuntu 18.04,
      and sway 1.5
      
      Reported-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
      Fixes: fa4f4c21 ("drm/nouveau/kms: Support NVIDIA format modifiers")
      Link: https://lkml.org/lkml/2020/6/30/1251
      
      
      Signed-off-by: default avatarJames Jones <jajones@nvidia.com>
      Acked-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      faa0fcf9
    • Alain Michaud's avatar
      Bluetooth: fix kernel oops in store_pending_adv_report · a2ec905d
      Alain Michaud authored
      Fix kernel oops observed when an ext adv data is larger than 31 bytes.
      
      This can be reproduced by setting up an advertiser with advertisement
      larger than 31 bytes.  The issue is not sensitive to the advertisement
      content.  In particular, this was reproduced with an advertisement of
      229 bytes filled with 'A'.  See stack trace below.
      
      This is fixed by not catching ext_adv as legacy adv are only cached to
      be able to concatenate a scanable adv with its scan response before
      sending it up through mgmt.
      
      With ext_adv, this is no longer necessary.
      
        general protection fault: 0000 [#1] SMP PTI
        CPU: 6 PID: 205 Comm: kworker/u17:0 Not tainted 5.4.0-37-generic #41-Ubuntu
        Hardware name: Dell Inc. XPS 15 7590/0CF6RR, BIOS 1.7.0 05/11/2020
        Workqueue: hci0 hci_rx_work [bluetooth]
        RIP: 0010:hci_bdaddr_list_lookup+0x1e/0x40 [bluetooth]
        Code: ff ff e9 26 ff ff ff 0f 1f 44 00 00 0f 1f 44 00 00 55 48 8b 07 48 89 e5 48 39 c7 75 0a eb 24 48 8b 00 48 39 f8 74 1c 44 8b 06 <44> 39 40 10 75 ef 44 0f b7 4e 04 66 44 39 48 14 75 e3 38 50 16 75
        RSP: 0018:ffffbc6a40493c70 EFLAGS: 00010286
        RAX: 4141414141414141 RBX: 000000000000001b RCX: 0000000000000000
        RDX: 0000000000000000 RSI: ffff9903e76c100f RDI: ffff9904289d4b28
        RBP: ffffbc6a40493c70 R08: 0000000093570362 R09: 0000000000000000
        R10: 0000000000000000 R11: ffff9904344eae38 R12: ffff9904289d4000
        R13: 0000000000000000 R14: 00000000ffffffa3 R15: ffff9903e76c100f
        FS: 0000000000000000(0000) GS:ffff990434580000(0000) knlGS:0000000000000000
        CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 00007feed125a000 CR3: 00000001b860a003 CR4: 00000000003606e0
        Call Trace:
          process_adv_report+0x12e/0x560 [bluetooth]
          hci_le_meta_evt+0x7b2/0xba0 [bluetooth]
          hci_event_packet+0x1c29/0x2a90 [bluetooth]
          hci_rx_work+0x19b/0x360 [bluetooth]
          process_one_work+0x1eb/0x3b0
          worker_thread+0x4d/0x400
          kthread+0x104/0x140
      
      Fixes: c215e939
      
       ("Bluetooth: Process extended ADV report event")
      Reported-by: default avatarAndy Nguyen <theflow@google.com>
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
      Signed-off-by: default avatarAlain Michaud <alainm@chromium.org>
      Tested-by: default avatarSonny Sasaka <sonnysasaka@chromium.org>
      Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a2ec905d
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 417385c4
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "A couple of last minute bugfixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio-mem: Fix build error due to improper use 'select'
        virtio_balloon: fix up endian-ness for free cmd id
        virtio-balloon: Document byte ordering of poison_val
        vhost/scsi: fix up req type endian-ness
        firmware: Fix a reference count leak.
      417385c4
    • Grygorii Strashko's avatar
      ARM: percpu.h: fix build error · aa54ea90
      Grygorii Strashko authored
      Fix build error for the case:
        defined(CONFIG_SMP) && !defined(CONFIG_CPU_V6)
      
      config: keystone_defconfig
      
        CC      arch/arm/kernel/signal.o
        In file included from ../include/linux/random.h:14,
                          from ../arch/arm/kernel/signal.c:8:
        ../arch/arm/include/asm/percpu.h: In function ‘__my_cpu_offset’:
        ../arch/arm/include/asm/percpu.h:29:34: error: ‘current_stack_pointer’ undeclared (first use in this function); did you mean ‘user_stack_pointer’?
            : "Q" (*(const unsigned long *)current_stack_pointer));
                                           ^~~~~~~~~~~~~~~~~~~~~
                                           user_stack_pointer
      
      Fixes: f227e3ec
      
       ("random32: update the net random state on interrupt and activity")
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa54ea90
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.8-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · d9644712
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
       "Disable ASPM on ASM1083/1085 PCIe-to-PCI bridge (Robert Hancock)"
      
      * tag 'pci-v5.8-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/ASPM: Disable ASPM on ASMedia ASM1083/1085 PCIe-to-PCI bridge
      d9644712
    • Linus Torvalds's avatar
      Merge tag 'block-5.8-2020-07-30' of git://git.kernel.dk/linux-block · e2c46b57
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Three NVMe fixes"
      
      * tag 'block-5.8-2020-07-30' of git://git.kernel.dk/linux-block:
        nvme: add a Identify Namespace Identification Descriptor list quirk
        nvme-pci: prevent SK hynix PC400 from using Write Zeroes command
        nvme-tcp: fix possible hang waiting for icresp response
      e2c46b57
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.8-2020-07-30' of git://git.kernel.dk/linux-block · 0513b9d7
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two small fixes for corner/error cases"
      
      * tag 'io_uring-5.8-2020-07-30' of git://git.kernel.dk/linux-block:
        io_uring: fix lockup in io_fail_links()
        io_uring: fix ->work corruption with poll_add
      0513b9d7
    • Willy Tarreau's avatar
      random: fix circular include dependency on arm64 after addition of percpu.h · 1c9df907
      Willy Tarreau authored
      Daniel Díaz and Kees Cook independently reported that commit
      f227e3ec
      
       ("random32: update the net random state on interrupt and
      activity") broke arm64 due to a circular dependency on include files
      since the addition of percpu.h in random.h.
      
      The correct fix would definitely be to move all the prandom32 stuff out
      of random.h but for backporting, a smaller solution is preferred.
      
      This one replaces linux/percpu.h with asm/percpu.h, and this fixes the
      problem on x86_64, arm64, arm, and mips.  Note that moving percpu.h
      around didn't change anything and that removing it entirely broke
      differently.  When backporting, such options might still be considered
      if this patch fails to help.
      
      [ It turns out that an alternate fix seems to be to just remove the
        troublesome <asm/pointer_auth.h> remove from the arm64 <asm/smp.h>
        that causes the circular dependency.
      
        But we might as well do the whole belt-and-suspenders thing, and
        minimize inclusion in <linux/random.h> too. Either will fix the
        problem, and both are good changes.   - Linus ]
      
      Reported-by: default avatarDaniel Díaz <daniel.diaz@linaro.org>
      Reported-by: default avatarKees Cook <keescook@chromium.org>
      Tested-by: default avatarMarc Zyngier <maz@kernel.org>
      Fixes: f227e3ec
      
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c9df907
  2. Jul 30, 2020
  3. Jul 29, 2020
  4. Jul 28, 2020
  5. Jul 27, 2020