Skip to content
  1. Oct 28, 2021
    • Steven Rostedt (VMware)'s avatar
      tracing: Do not warn when connecting eprobe to non existing event · 7fa598f9
      Steven Rostedt (VMware) authored
      When the syscall trace points are not configured in, the kselftests for
      ftrace will try to attach an event probe (eprobe) to one of the system
      call trace points. This triggered a WARNING, because the failure only
      expects to see memory issues. But this is not the only failure. The user
      may attempt to attach to a non existent event, and the kernel must not
      warn about it.
      
      Link: https://lkml.kernel.org/r/20211027120854.0680aa0f@gandalf.local.home
      
      Fixes: 7491e2c4
      
       ("tracing: Add a probe that attaches to trace events")
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      7fa598f9
    • Steven Rostedt (VMware)'s avatar
      ftrace/nds32: Update the proto for ftrace_trace_function to match ftrace_stub · 4e84dc47
      Steven Rostedt (VMware) authored
      The ftrace callback prototype was changed to pass a special ftrace_regs
      instead of pt_regs as the last parameter, but the static ftrace for nds32
      missed updating ftrace_trace_function and this caused a warning when
      compared to ftrace_stub:
      
      ../arch/nds32/kernel/ftrace.c: In function '_mcount':
      ../arch/nds32/kernel/ftrace.c:24:35: error: comparison of distinct pointer types lacks a cast [-Werror]
         24 |         if (ftrace_trace_function != ftrace_stub)
            |                                   ^~
      
      Link: https://lore.kernel.org/all/20211027055554.19372-1-rdunlap@infradead.org/
      Link: https://lkml.kernel.org/r/20211027125101.33449969@gandalf.local.home
      
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      Fixes: d19ad077
      
       ("ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs")
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      4e84dc47
  2. Oct 19, 2021
    • Steven Rostedt (VMware)'s avatar
      tracing: Have all levels of checks prevent recursion · ed65df63
      Steven Rostedt (VMware) authored
      While writing an email explaining the "bit = 0" logic for a discussion on
      making ftrace_test_recursion_trylock() disable preemption, I discovered a
      path that makes the "not do the logic if bit is zero" unsafe.
      
      The recursion logic is done in hot paths like the function tracer. Thus,
      any code executed causes noticeable overhead. Thus, tricks are done to try
      to limit the amount of code executed. This included the recursion testing
      logic.
      
      Having recursion testing is important, as there are many paths that can
      end up in an infinite recursion cycle when tracing every function in the
      kernel. Thus protection is needed to prevent that from happening.
      
      Because it is OK to recurse due to different running context levels (e.g.
      an interrupt preempts a trace, and then a trace occurs in the interrupt
      handler), a set of bits are used to know which context one is in (normal,
      softirq, irq and NMI). If a recursion occurs in the same level, it is
      prevented*.
      
      Then there are infrastructure levels of recursion as well. When more than
      one callback is attached to the same function to trace, it calls a loop
      function to iterate over all the callbacks. Both the callbacks and the
      loop function have recursion protection. The callbacks use the
      "ftrace_test_recursion_trylock()" which has a "function" set of context
      bits to test, and the loop function calls the internal
      trace_test_and_set_recursion() directly, with an "internal" set of bits.
      
      If an architecture does not implement all the features supported by ftrace
      then the callbacks are never called directly, and the loop function is
      called instead, which will implement the features of ftrace.
      
      Since both the loop function and the callbacks do recursion protection, it
      was seemed unnecessary to do it in both locations. Thus, a trick was made
      to have the internal set of recursion bits at a more significant bit
      location than the function bits. Then, if any of the higher bits were set,
      the logic of the function bits could be skipped, as any new recursion
      would first have to go through the loop function.
      
      This is true for architectures that do not support all the ftrace
      features, because all functions being traced must first go through the
      loop function before going to the callbacks. But this is not true for
      architectures that support all the ftrace features. That's because the
      loop function could be called due to two callbacks attached to the same
      function, but then a recursion function inside the callback could be
      called that does not share any other callback, and it will be called
      directly.
      
      i.e.
      
       traced_function_1: [ more than one callback tracing it ]
         call loop_func
      
       loop_func:
         trace_recursion set internal bit
         call callback
      
       callback:
         trace_recursion [ skipped because internal bit is set, return 0 ]
         call traced_function_2
      
       traced_function_2: [ only traced by above callback ]
         call callback
      
       callback:
         trace_recursion [ skipped because internal bit is set, return 0 ]
         call traced_function_2
      
       [ wash, rinse, repeat, BOOM! out of shampoo! ]
      
      Thus, the "bit == 0 skip" trick is not safe, unless the loop function is
      call for all functions.
      
      Since we want to encourage architectures to implement all ftrace features,
      having them slow down due to this extra logic may encourage the
      maintainers to update to the latest ftrace features. And because this
      logic is only safe for them, remove it completely.
      
       [*] There is on layer of recursion that is allowed, and that is to allow
           for the transition between interrupt context (normal -> softirq ->
           irq -> NMI), because a trace may occur before the context update is
           visible to the trace recursion logic.
      
      Link: https://lore.kernel.org/all/609b565a-ed6e-a1da-f025-166691b5d994@linux.alibaba.com/
      Link: https://lkml.kernel.org/r/20211018154412.09fcad3c@gandalf.local.home
      
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Miroslav Benes <mbenes@suse.cz>
      Cc: Joe Lawrence <joe.lawrence@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Jisheng Zhang <jszhang@kernel.org>
      Cc: =?utf-8?b?546L6LSH?= <yun.wang@linux.alibaba.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: stable@vger.kernel.org
      Fixes: edc15caf
      
       ("tracing: Avoid unnecessary multiple recursion checks")
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      ed65df63
  3. Oct 16, 2021
    • Steven Rostedt's avatar
      nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^' · be358af1
      Steven Rostedt authored
      
      
      I received a build failure for a new patch I'm working on the nds32
      architecture, and when I went to test it, I couldn't get to my build error,
      because it failed to build with a bunch of:
      
        Error: invalid operands (*UND* and *UND* sections) for `^'
      
      issues with various files. Those files were temporary asm files that looked
      like:  kernel/.tmp_mc_fork.s
      
      I decided to look deeper, and found that the "mc" portion of that name
      stood for "mcount", and was created by the recordmcount.pl script. One that
      I wrote over a decade ago. Once I knew the source of the problem, I was
      able to investigate it further.
      
      The way the recordmcount.pl script works (BTW, there's a C version that
      simply modifies the ELF object) is by doing an "objdump" on the object
      file. Looks for all the calls to "mcount", and creates an offset of those
      locations from some global variable it can use (usually a global function
      name, found with <.*>:). Creates a asm file that is a table of references
      to these locations, using the found variable/function. Compiles it and
      links it back into the original object file. This asm file is called
      ".tmp_mc_<object_base_name>.s".
      
      The problem here is that the objdump produced by the nds32 object file,
      contains things that look like:
      
       0000159a <.L3^B1>:
          159a:       c6 00           beqz38 $r6, 159a <.L3^B1>
                              159a: R_NDS32_9_PCREL_RELA      .text+0x159e
          159c:       84 d2           movi55 $r6, #-14
          159e:       80 06           mov55 $r0, $r6
          15a0:       ec 3c           addi10.sp #0x3c
      
      Where ".L3^B1 is somehow selected as the "global" variable to index off of.
      
      Then the assembly file that holds the mcount locations looks like this:
      
              .section __mcount_loc,"a",@progbits
              .align 2
              .long .L3^B1 + -5522
              .long .L3^B1 + -5384
              .long .L3^B1 + -5270
              .long .L3^B1 + -5098
              .long .L3^B1 + -4970
              .long .L3^B1 + -4758
              .long .L3^B1 + -4122
              [...]
      
      And when it is compiled back to an object to link to the original object,
      the compile fails on the "^" symbol.
      
      Simple solution for now, is to have the perl script ignore using function
      symbols that have an "^" in the name.
      
      Link: https://lkml.kernel.org/r/20211014143507.4ad2c0f7@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Acked-by: default avatarGreentime Hu <green.hu@gmail.com>
      Fixes: fbf58a52
      
       ("nds32/ftrace: Add RECORD_MCOUNT support")
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      be358af1
  4. Oct 14, 2021
    • Steven Rostedt (VMware)'s avatar
      selftests/ftrace: Update test for more eprobe removal process · 0282b0f0
      Steven Rostedt (VMware) authored
      
      
      The removal of eprobes was broken and missed in testing. Add various ways
      to remove eprobes that are considered acceptable to the testing process to
      catch when/if they break again.
      
      Link: https://lkml.kernel.org/r/20211013205533.836644549@goodmis.org
      
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      0282b0f0
    • Steven Rostedt (VMware)'s avatar
      tracing: Fix event probe removal from dynamic events · 7d5fda1c
      Steven Rostedt (VMware) authored
      
      
      When an event probe is to be removed via the API that created it via the
      dynamic events, an -ENOENT error is returned.
      
      This is because the removal of the event probe does not expect to see the
      event system and name that the event probe is attached to, even though
      that's part of the API to create it. As the removal of probes is to use
      the same API as they are created.
      
      In fact, the removal is not consistent with the kprobes and uprobes
      removal. Fix that by allowing various ways to remove the eprobe.
      
      The eprobe is created with:
      
       e:[GROUP/]NAME SYSTEM/EVENT [OPTIONS]
      
      Have it get removed by echoing in the following into dynamic_events:
      
       # Remove all eprobes with NAME
       echo '-:NAME' >> dynamic_events
      
       # Remove a specific eprobe
       echo '-:GROUP/NAME' >> dynamic_events
       echo '-:GROUP/NAME SYSTEM/EVENT' >> dynamic_events
       echo '-:NAME SYSTEM/EVENT' >> dynamic_events
       echo '-:GROUP/NAME SYSTEM/EVENT OPTIONS' >> dynamic_events
       echo '-:NAME SYSTEM/EVENT OPTIONS' >> dynamic_events
      
      Link: https://lkml.kernel.org/r/20211012081925.0e19cc4f@gandalf.local.home
      Link: https://lkml.kernel.org/r/20211013205533.630722129@goodmis.org
      
      Suggested-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Fixes: 7491e2c4
      
       ("tracing: Add a probe that attaches to trace events")
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      7d5fda1c
  5. Oct 11, 2021
    • Colin Ian King's avatar
      tracing: Fix missing * in comment block · b26503b1
      Colin Ian King authored
      
      
      There is a missing * in a comment block, add it in.
      
      Link: https://lkml.kernel.org/r/20211006172830.1025336-1-colin.king@canonical.com
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      b26503b1
    • Masami Hiramatsu's avatar
      bootconfig: init: Fix memblock leak in xbc_make_cmdline() · 1ae43851
      Masami Hiramatsu authored
      Free unused memblock in a error case to fix memblock leak
      in xbc_make_cmdline().
      
      Link: https://lkml.kernel.org/r/163177339181.682366.8713781325929549256.stgit@devnote2
      
      Fixes: 51887d03
      
       ("bootconfig: init: Allow admin to use bootconfig for kernel command line")
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      1ae43851
    • Vamshi K Sthambamkadi's avatar
      tracing: Fix memory leak in eprobe_register() · 6675880f
      Vamshi K Sthambamkadi authored
      kmemleak report:
      unreferenced object 0xffff900a70ec7ec0 (size 32):
        comm "ftracetest", pid 2770, jiffies 4295042510 (age 311.464s)
        hex dump (first 32 bytes):
          c8 31 23 45 0a 90 ff ff 40 85 c7 6e 0a 90 ff ff  .1#E....@..n....
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<000000009d3751fd>] kmem_cache_alloc_trace+0x2a2/0x440
          [<0000000088b8124b>] eprobe_register+0x1e3/0x350
          [<000000002a9a0517>] __ftrace_event_enable_disable+0x7c/0x240
          [<0000000019109321>] event_enable_write+0x93/0xe0
          [<000000007d85b320>] vfs_write+0xb9/0x260
          [<00000000b94c5e41>] ksys_write+0x67/0xe0
          [<000000005a08c81d>] __x64_sys_write+0x1a/0x20
          [<00000000240bf576>] do_syscall_64+0x3b/0xc0
          [<0000000043d5d9f6>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      unreferenced object 0xffff900a56bbf280 (size 128):
        comm "ftracetest", pid 2770, jiffies 4295042510 (age 311.464s)
        hex dump (first 32 bytes):
          ff ff ff ff ff ff ff ff 00 00 00 00 01 00 00 00  ................
          80 69 3b b2 ff ff ff ff 20 69 3b b2 ff ff ff ff  .i;..... i;.....
        backtrace:
          [<000000009d3751fd>] kmem_cache_alloc_trace+0x2a2/0x440
          [<00000000c4e90fad>] eprobe_register+0x1fc/0x350
          [<000000002a9a0517>] __ftrace_event_enable_disable+0x7c/0x240
          [<0000000019109321>] event_enable_write+0x93/0xe0
          [<000000007d85b320>] vfs_write+0xb9/0x260
          [<00000000b94c5e41>] ksys_write+0x67/0xe0
          [<000000005a08c81d>] __x64_sys_write+0x1a/0x20
          [<00000000240bf576>] do_syscall_64+0x3b/0xc0
          [<0000000043d5d9f6>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      In new_eprobe_trigger(), allocated edata and trigger variables are
      never freed.
      
      To fix, free memory in disable_eprobe().
      
      Link: https://lkml.kernel.org/r/20211008071802.GA2098@cosmos
      
      Fixes: 7491e2c4
      
       ("tracing: Add a probe that attaches to trace events")
      Signed-off-by: default avatarVamshi K Sthambamkadi <vamshi.k.sthambamkadi@gmail.com>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      6675880f
  6. Oct 07, 2021
    • Jackie Liu's avatar
      tracing: Fix missing osnoise tracer on max_latency · 424b650f
      Jackie Liu authored
      The compiler warns when the data are actually unused:
      
        kernel/trace/trace.c:1712:13: error: ‘trace_create_maxlat_file’ defined but not used [-Werror=unused-function]
         1712 | static void trace_create_maxlat_file(struct trace_array *tr,
              |             ^~~~~~~~~~~~~~~~~~~~~~~~
      
      [Why]
      CONFIG_HWLAT_TRACER=n, CONFIG_TRACER_MAX_TRACE=n, CONFIG_OSNOISE_TRACER=y
      gcc report warns.
      
      [How]
      Now trace_create_maxlat_file will only take effect when
      CONFIG_HWLAT_TRACER=y or CONFIG_TRACER_MAX_TRACE=y. In fact, after
      adding osnoise trace, it also needs to take effect.
      
      Link: https://lore.kernel.org/all/c1d9e328-ad7c-920b-6c24-9e1598a6421c@infradead.org/
      Link: https://lkml.kernel.org/r/20210922025122.3268022-1-liu.yun@linux.dev
      
      Fixes: bce29ac9
      
       ("trace: Add osnoise tracer")
      Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
      Suggested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Reviewed-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: default avatarJackie Liu <liuyun01@kylinos.cn>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      424b650f
  7. Sep 27, 2021
    • Linus Torvalds's avatar
      Linux 5.15-rc3 · 5816b3e6
      Linus Torvalds authored
      5816b3e6
    • Linus Torvalds's avatar
      Merge tag '5.15-rc2-ksmbd-fixes' of git://git.samba.org/ksmbd · 5e5d7597
      Linus Torvalds authored
      Pull ksmbd fixes from Steve French:
       "Five fixes for the ksmbd kernel server, including three security
        fixes:
      
         - remove follow symlinks support
      
         - use LOOKUP_BENEATH to prevent out of share access
      
         - SMB3 compounding security fix
      
         - fix for returning the default streams correctly, fixing a bug when
           writing ppt or doc files from some clients
      
         - logging more clearly that ksmbd is experimental (at module load
           time)"
      
      * tag '5.15-rc2-ksmbd-fixes' of git://git.samba.org/ksmbd:
        ksmbd: use LOOKUP_BENEATH to prevent the out of share access
        ksmbd: remove follow symlinks support
        ksmbd: check protocol id in ksmbd_verify_smb_message()
        ksmbd: add default data stream name in FILE_STREAM_INFORMATION
        ksmbd: log that server is experimental at module load
      5e5d7597
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v5.15_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 996148ee
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
       "Fix two EDAC drivers using the wrong value type for the DIMM mode"
      
      * tag 'edac_urgent_for_v5.15_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/dmc520: Assign the proper type to dimm->edac_mode
        EDAC/synopsys: Fix wrong value type assignment for edac_mode
      996148ee
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · 299d6e47
      Linus Torvalds authored
      Pull thermal fixes from Daniel Lezcano:
      
       - Fix thermal shutdown after a suspend/resume due to a wrong TCC value
         restored on Intel platform (Antoine Tenart)
      
       - Fix potential buffer overflow when building the list of policies. The
         buffer size is not updated after writing to it (Dan Carpenter)
      
       - Fix wrong check against IS_ERR instead of NULL (Ansuel Smith)
      
      * tag 'thermal-v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
        thermal/drivers/tsens: Fix wrong check for tzd in irq handlers
        thermal/core: Potential buffer overflow in thermal_build_list_of_policies()
        thermal/drivers/int340x: Do not set a wrong tcc offset on resume
      299d6e47
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5bb7b210
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of fixes for X86:
      
         - Prevent sending the wrong signal when protection keys are enabled
           and the kernel handles a fault in the vsyscall emulation.
      
         - Invoke early_reserve_memory() before invoking e820_memory_setup()
           which is required to make the Xen dom0 e820 hooks work correctly.
      
         - Use the correct data type for the SETZ operand in the EMQCMDS
           instruction wrapper.
      
         - Prevent undefined behaviour to the potential unaligned accesss in
           the instruction decoder library"
      
      * tag 'x86-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/insn, tools/x86: Fix undefined behavior due to potential unaligned accesses
        x86/asm: Fix SETZ size enqcmds() build failure
        x86/setup: Call early_reserve_memory() earlier
        x86/fault: Fix wrong signal when vsyscall fails with pkey
      5bb7b210
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3a398acc
      Linus Torvalds authored
      Pull timer fix from Thomas Gleixner:
       "A single fix for the recently introduced regression in posix CPU
        timers which failed to stop the timer when requested. That caused
        unexpected signals to be sent to the process/thread causing
        malfunction"
      
      * tag 'timers-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-cpu-timers: Prevent spuriously armed 0-value itimer
      3a398acc
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dc0f97c2
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A set of fixes for interrupt chip drivers:
      
         - Work around a bad GIC integration on a Renesas platform which can't
           handle byte-sized MMIO access
      
         - Plug a potential memory leak in the GICv4 driver
      
         - Fix a regression in the Armada 370-XP IPI code which was caused by
           issuing EOI instack of ACK.
      
         - A couple of small fixes here and there"
      
      * tag 'irq-urgent-2021-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic: Work around broken Renesas integration
        irqchip/renesas-rza1: Use semicolons instead of commas
        irqchip/gic-v3-its: Fix potential VPE leak on error
        irqchip/goldfish-pic: Select GENERIC_IRQ_CHIP to fix build
        irqchip/mbigen: Repair non-kernel-doc notation
        irqdomain: Change the type of 'size' in __irq_domain_add() to be consistent
        irqchip/armada-370-xp: Fix ack/eoi breakage
        Documentation: Fix irq-domain.rst build warning
      dc0f97c2
  8. Sep 26, 2021
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a3b397b4
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "16 patches.
      
        Subsystems affected by this patch series: xtensa, sh, ocfs2, scripts,
        lib, and mm (memory-failure, kasan, damon, shmem, tools, pagecache,
        debug, and pagemap)"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm: fix uninitialized use in overcommit_policy_handler
        mm/memory_failure: fix the missing pte_unmap() call
        kasan: always respect CONFIG_KASAN_STACK
        sh: pgtable-3level: fix cast to pointer from integer of different size
        mm/debug: sync up latest migrate_reason to migrate_reason_names
        mm/debug: sync up MR_CONTIG_RANGE and MR_LONGTERM_PIN
        mm: fs: invalidate bh_lrus for only cold path
        lib/zlib_inflate/inffast: check config in C to avoid unused function warning
        tools/vm/page-types: remove dependency on opt_file for idle page tracking
        scripts/sorttable: riscv: fix undeclared identifier 'EM_RISCV' error
        ocfs2: drop acl cache for directories too
        mm/shmem.c: fix judgment error in shmem_is_huge()
        xtensa: increase size of gcc stack frame check
        mm/damon: don't use strnlen() with known-bogus source length
        kasan: fix Kconfig check of CC_HAS_WORKING_NOSANITIZE_ADDRESS
        mm, hwpoison: add is_free_buddy_page() in HWPoisonHandlable()
      a3b397b4
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · bb19237b
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Thirty-three fixes, I'm afraid.
      
        Essentially the build up from the last couple of weeks while I've been
        dealling with Linux Plumbers conference infrastructure issues. It's
        mostly the usual assortment of spelling fixes and minor corrections.
      
        The only core relevant changes are to the sd driver to reduce the spin
        up message spew and fix a small memory leak on the freeing path"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (33 commits)
        scsi: ses: Retry failed Send/Receive Diagnostic commands
        scsi: target: Fix spelling mistake "CONFLIFT" -> "CONFLICT"
        scsi: lpfc: Fix gcc -Wstringop-overread warning, again
        scsi: lpfc: Use correct scnprintf() limit
        scsi: lpfc: Fix sprintf() overflow in lpfc_display_fpin_wwpn()
        scsi: core: Remove 'current_tag'
        scsi: acornscsi: Remove tagged queuing vestiges
        scsi: fas216: Kill scmd->tag
        scsi: qla2xxx: Restore initiator in dual mode
        scsi: ufs: core: Unbreak the reset handler
        scsi: sd_zbc: Support disks with more than 2**32 logical blocks
        scsi: ufs: core: Revert "scsi: ufs: Synchronize SCSI and UFS error handling"
        scsi: bsg: Fix device unregistration
        scsi: sd: Make sd_spinup_disk() less noisy
        scsi: ufs: ufs-pci: Fix Intel LKF link stability
        scsi: mpt3sas: Clean up some inconsistent indenting
        scsi: megaraid: Clean up some inconsistent indenting
        scsi: sr: Fix spelling mistake "does'nt" -> "doesn't"
        scsi: Remove SCSI CDROM MAINTAINERS entry
        scsi: megaraid: Fix Coccinelle warning
        ...
      bb19237b
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.15-2021-09-25' of git://git.kernel.dk/linux-block · f6f360ae
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "This one looks a bit bigger than it is, but that's mainly because 2/3
        of it is enabling IORING_OP_CLOSE to close direct file descriptors.
      
        We've had a few folks using them and finding it confusing that the way
        to close them is through using -1 for file update, this just brings
        API symmetry for direct descriptors. Hence I think we should just do
        this now and have a better API for 5.15 release. There's some room for
        de-duplicating the close code, but we're leaving that for the next
        merge window.
      
        Outside of that, just small fixes:
      
         - Poll race fixes (Hao)
      
         - io-wq core dump exit fix (me)
      
         - Reschedule around potentially intensive tctx and buffer iterators
           on teardown (me)
      
         - Fix for always ending up punting files update to io-wq (me)
      
         - Put the provided buffer meta data under memcg accounting (me)
      
         - Tweak for io_write(), removing dead code that was added with the
           iterator changes in this release (Pavel)"
      
      * tag 'io_uring-5.15-2021-09-25' of git://git.kernel.dk/linux-block:
        io_uring: make OP_CLOSE consistent with direct open
        io_uring: kill extra checks in io_write()
        io_uring: don't punt files update to io-wq unconditionally
        io_uring: put provided buffer meta data under memcg accounting
        io_uring: allow conditional reschedule for intensive iterators
        io_uring: fix potential req refcount underflow
        io_uring: fix missing set of EPOLLONESHOT for CQ ring overflow
        io_uring: fix race between poll completion and cancel_hash insertion
        io-wq: ensure we exit if thread group is exiting
      f6f360ae
    • Linus Torvalds's avatar
      Merge tag 'block-5.15-2021-09-25' of git://git.kernel.dk/linux-block · 2d70de4e
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
            - keep ctrl->namespaces ordered (Christoph Hellwig)
            - fix incorrect h2cdata pdu offset accounting in nvme-tcp (Sagi
              Grimberg)
            - handled updated hw_queues in nvme-fc more carefully (Daniel
              Wagner, James Smart)
      
       - md lock order fix (Christoph)
      
       - fallocate locking fix (Ming)
      
       - blktrace UAF fix (Zhihao)
      
       - rq-qos bio tracking fix (Ming)
      
      * tag 'block-5.15-2021-09-25' of git://git.kernel.dk/linux-block:
        block: hold ->invalidate_lock in blkdev_fallocate
        blktrace: Fix uaf in blk_trace access after removing by sysfs
        block: don't call rq_qos_ops->done_bio if the bio isn't tracked
        md: fix a lock order reversal in md_alloc
        nvme: keep ctrl->namespaces ordered
        nvme-tcp: fix incorrect h2cdata pdu offset accounting
        nvme-fc: remove freeze/unfreeze around update_nr_hw_queues
        nvme-fc: avoid race between time out and tear down
        nvme-fc: update hardware queues before using them
      2d70de4e
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.15b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 57398443
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Some minor cleanups and fixes of some theoretical bugs, as well as a
        fix of a bug introduced in 5.15-rc1"
      
      * tag 'for-linus-5.15b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/x86: fix PV trap handling on secondary processors
        xen/balloon: fix balloon kthread freezing
        swiotlb-xen: this is PV-only on x86
        xen/pci-swiotlb: reduce visibility of symbols
        PCI: only build xen-pcifront in PV-enabled environments
        swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests
        Xen/gntdev: don't ignore kernel unmapping error
        xen/x86: drop redundant zeroing from cpu_initialize_context()
      57398443
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-5.15-rc3' of... · 90316e6e
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
      
       - fix to Kselftest common framework header install to run before other
         targets for it work correctly in parallel build case.
      
       - fixes to kvm test to not ignore fscanf() returns which could result
         in inconsistent test behavior and failures.
      
      * tag 'linux-kselftest-fixes-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: kvm: fix get_run_delay() ignoring fscanf() return warn
        selftests: kvm: move get_run_delay() into lib/test_util
        selftests:kvm: fix get_trans_hugepagesz() ignoring fscanf() return warn
        selftests:kvm: fix get_warnings_count() ignoring fscanf() return warn
        selftests: be sure to make khdr before other targets
      90316e6e
    • Linus Torvalds's avatar
      Merge tag 'erofs-for-5.15-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs · a5e0acea
      Linus Torvalds authored
      Pull erofs fixes from Gao Xiang:
       "Two bugfixes to fix the 4KiB blockmap chunk format availability and a
        dangling pointer usage. There is also a trivial cleanup to clarify
        compacted_2b if compacted_4b_initial > totalidx.
      
        Summary:
      
         - fix the dangling pointer use in erofs_lookup tracepoint
      
         - fix unsupported chunk format check
      
         - zero out compacted_2b if compacted_4b_initial > totalidx"
      
      * tag 'erofs-for-5.15-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
        erofs: clear compacted_2b if compacted_4b_initial > totalidx
        erofs: fix misbehavior of unsupported chunk format check
        erofs: fix up erofs_lookup tracepoint
      a5e0acea
    • Linus Torvalds's avatar
      Merge tag '5.15-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · b8f42965
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Six small cifs/smb3 fixes, two for stable:
      
         - important fix for deferred close (found by a git functional test)
           related to attribute caching on close.
      
         - four (two cosmetic, two more serious) small fixes for problems
           pointed out by smatch via Dan Carpenter
      
         - fix for comment formatting problems pointed out by W=1"
      
      * tag '5.15-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix incorrect check for null pointer in header_assemble
        smb3: correct server pointer dereferencing check to be more consistent
        smb3: correct smb3 ACL security descriptor
        cifs: Clear modified attribute bit from inode flags
        cifs: Deal with some warnings from W=1
        cifs: fix a sign extension bug
      b8f42965
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 85736168
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.15-rc3.
      
        Nothing huge in here, just fixes for a number of small issues that
        have been reported. These include:
      
         - habanalabs race conditions and other bugs fixed
      
         - binder driver fixes
      
         - fpga driver fixes
      
         - coresight build warning fix
      
         - nvmem driver fix
      
         - comedi memory leak fix
      
         - bcm-vk tty race fix
      
         - other tiny driver fixes
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
        comedi: Fix memory leak in compat_insnlist()
        nvmem: NVMEM_NINTENDO_OTP should depend on WII
        misc: bcm-vk: fix tty registration race
        fpga: dfl: Avoid reads to AFU CSRs during enumeration
        fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
        fpga: machxo2-spi: Return an error on failure
        habanalabs: expose a single cs seq in staged submissions
        habanalabs: fix wait offset handling
        habanalabs: rate limit multi CS completion errors
        habanalabs/gaudi: fix LBW RR configuration
        habanalabs: Fix spelling mistake "FEADBACK" -> "FEEDBACK"
        habanalabs: fail collective wait when not supported
        habanalabs/gaudi: use direct MSI in single mode
        habanalabs: fix kernel OOPs related to staged cs
        habanalabs: fix potential race in interrupt wait ioctl
        mcb: fix error handling in mcb_alloc_bus()
        misc: genwqe: Fixes DMA mask setting
        coresight: syscfg: Fix compiler warning
        nvmem: core: Add stubs for nvmem_cell_read_variable_le_u32/64 if !CONFIG_NVMEM
        binder: make sure fd closes complete
        ...
      85736168
    • Linus Torvalds's avatar
      Merge tag 'staging-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 9cbef308
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are two small staging driver fixes for 5.15-rc3:
      
         - greybus tty use-after-free bugfix
      
         - r8188eu ioctl overlap build warning fix
      
        Note, the r8188eu ioctl has been entirely removed for 5.16-rc1, but
        it's good to get this fixed now for people using this in 5.15.
      
        Both of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: r8188eu: fix -Wrestrict warnings
        staging: greybus: uart: fix tty use after free
      9cbef308
    • Linus Torvalds's avatar
      Merge tag 'tty-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · f9d4be25
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are four small tty/serial driver fixes for 5.15-rc3. They
        include:
      
         - remove an export now that no one is using it anymore
      
         - mvebu-uart tx_empty callback fix
      
         - 8250_omap bugfix
      
         - synclink_gt build fix
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: unexport tty_ldisc_release
        tty: synclink_gt: rename a conflicting function name
        serial: mvebu-uart: fix driver's tx_empty callback
        serial: 8250: 8250_omap: Fix RX_LVL register offset
      f9d4be25
    • Linus Torvalds's avatar
      Merge tag 'usb-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 2c4e969c
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some USB driver fixes and new device ids for 5.15-rc3.
      
        They include:
      
         - usb-storage quirk additions
      
         - usb-serial new device ids
      
         - usb-serial driver fixes
      
         - USB roothub registration bugfix to resolve a long-reported issue
      
         - usb gadget driver fixes for a large number of small things
      
         - dwc2 driver fixes
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
        USB: serial: option: add device id for Foxconn T99W265
        USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
        USB: serial: cp210x: add part-number debug printk
        USB: serial: cp210x: fix dropped characters with CP2102
        MAINTAINERS: usb, update Peter Korsgaard's entries
        usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
        usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
        Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
        USB: serial: option: remove duplicate USB device ID
        USB: serial: mos7840: remove duplicated 0xac24 device ID
        arm64: dts: qcom: ipq8074: remove USB tx-fifo-resize property
        usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval
        usb: gadget: f_uac2: Add missing companion descriptor for feedback EP
        usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
        usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd()
        xhci: Set HCD flag to defer primary roothub registration
        usb: core: hcd: Add support for deferring roothub registration
        usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
        usb: dwc3: core: balance phy init and exit
        Revert "USB: bcma: Add a check for devm_gpiod_get"
        ...
      2c4e969c
  9. Sep 25, 2021