Skip to content
  1. Jan 20, 2022
    • Yafang Shao's avatar
      samples/bpf/test_overhead_kprobe_kern: replace bpf_probe_read_kernel with... · d068144d
      Yafang Shao authored
      
      samples/bpf/test_overhead_kprobe_kern: replace bpf_probe_read_kernel with bpf_probe_read_kernel_str to get task comm
      
      bpf_probe_read_kernel_str() will add a nul terminator to the dst, then
      we don't care about if the dst size is big enough.  This patch also
      replaces the hard-coded 16 with TASK_COMM_LEN to make it grepable.
      
      Link: https://lkml.kernel.org/r/20211120112738.45980-6-laoar.shao@gmail.com
      Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d068144d
    • Yafang Shao's avatar
      fs/binfmt_elf: replace open-coded string copy with get_task_comm · 95af469c
      Yafang Shao authored
      
      
      It is better to use get_task_comm() instead of the open coded string
      copy as we do in other places.
      
      struct elf_prpsinfo is used to dump the task information in userspace
      coredump or kernel vmcore.  Below is the verification of vmcore,
      
        crash> ps
           PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
              0      0   0  ffffffff9d21a940  RU   0.0       0      0  [swapper/0]
        >     0      0   1  ffffa09e40f85e80  RU   0.0       0      0  [swapper/1]
        >     0      0   2  ffffa09e40f81f80  RU   0.0       0      0  [swapper/2]
        >     0      0   3  ffffa09e40f83f00  RU   0.0       0      0  [swapper/3]
        >     0      0   4  ffffa09e40f80000  RU   0.0       0      0  [swapper/4]
        >     0      0   5  ffffa09e40f89f80  RU   0.0       0      0  [swapper/5]
              0      0   6  ffffa09e40f8bf00  RU   0.0       0      0  [swapper/6]
        >     0      0   7  ffffa09e40f88000  RU   0.0       0      0  [swapper/7]
        >     0      0   8  ffffa09e40f8de80  RU   0.0       0      0  [swapper/8]
        >     0      0   9  ffffa09e40f95e80  RU   0.0       0      0  [swapper/9]
        >     0      0  10  ffffa09e40f91f80  RU   0.0       0      0  [swapper/10]
        >     0      0  11  ffffa09e40f93f00  RU   0.0       0      0  [swapper/11]
        >     0      0  12  ffffa09e40f90000  RU   0.0       0      0  [swapper/12]
        >     0      0  13  ffffa09e40f9bf00  RU   0.0       0      0  [swapper/13]
        >     0      0  14  ffffa09e40f98000  RU   0.0       0      0  [swapper/14]
        >     0      0  15  ffffa09e40f9de80  RU   0.0       0      0  [swapper/15]
      
      It works well as expected.
      
      Some comments are added to explain why we use the hard-coded 16.
      
      Link: https://lkml.kernel.org/r/20211120112738.45980-5-laoar.shao@gmail.com
      Suggested-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95af469c
    • Yafang Shao's avatar
      drivers/infiniband: replace open-coded string copy with get_task_comm · 7b6397d7
      Yafang Shao authored
      
      
      We'd better use the helper get_task_comm() rather than the open-coded
      strlcpy() to get task comm.  As the comment above the hard-coded 16, we
      can replace it with TASK_COMM_LEN.
      
      Link: https://lkml.kernel.org/r/20211120112738.45980-4-laoar.shao@gmail.com
      Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7b6397d7
    • Yafang Shao's avatar
      fs/exec: replace strncpy with strscpy_pad in __get_task_comm · 503471ac
      Yafang Shao authored
      
      
      If the dest buffer size is smaller than sizeof(tsk->comm), the buffer
      will be without null ternimator, that may cause problem.  Using
      strscpy_pad() instead of strncpy() in __get_task_comm() can make the
      string always nul ternimated and zero padded.
      
      Link: https://lkml.kernel.org/r/20211120112738.45980-3-laoar.shao@gmail.com
      Suggested-by: default avatarKees Cook <keescook@chromium.org>
      Suggested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      503471ac
    • Yafang Shao's avatar
      fs/exec: replace strlcpy with strscpy_pad in __set_task_comm · 06c5088a
      Yafang Shao authored
      
      
      Patch series "task comm cleanups", v2.
      
      This patchset is part of the patchset "extend task comm from 16 to
      24"[1].  Now we have different opinion that dynamically allocates memory
      to store kthread's long name into a separate pointer, so I decide to
      take the useful cleanups apart from the original patchset and send it
      separately[2].
      
      These useful cleanups can make the usage around task comm less
      error-prone.  Furthermore, it will be useful if we want to extend task
      comm in the future.
      
      [1]. https://lore.kernel.org/lkml/20211101060419.4682-1-laoar.shao@gmail.com/
      [2]. https://lore.kernel.org/lkml/CALOAHbAx55AUo3bm8ZepZSZnw7A08cvKPdPyNTf=E_tPqmw5hw@mail.gmail.com/
      
      This patch (of 7):
      
      strlcpy() can trigger out-of-bound reads on the source string[1], we'd
      better use strscpy() instead.  To make it be robust against full tsk->comm
      copies that got noticed in other places, we should make sure it's zero
      padded.
      
      [1] https://github.com/KSPP/linux/issues/89
      
      Link: https://lkml.kernel.org/r/20211120112738.45980-1-laoar.shao@gmail.com
      Link: https://lkml.kernel.org/r/20211120112738.45980-2-laoar.shao@gmail.com
      Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      06c5088a
    • Andy Shevchenko's avatar
      kernel.h: include a note to discourage people from including it in headers · 40cbf09f
      Andy Shevchenko authored
      
      
      Include a note at the top to discourage people from including it in
      headers.
      
      Link: https://lkml.kernel.org/r/20211209150803.4473-1-andriy.shevchenko@linux.intel.com
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      40cbf09f
    • Andy Shevchenko's avatar
      include/linux/unaligned: replace kernel.h with the necessary inclusions · 22c03398
      Andy Shevchenko authored
      
      
      When kernel.h is used in the headers it adds a lot into dependency hell,
      especially when there are circular dependencies are involved.
      
      Replace kernel.h inclusion with the list of what is really being used.
      
      The rest of the changes are induced by the above and may not be split.
      
      Link: https://lkml.kernel.org/r/20211209123823.20425-1-andriy.shevchenko@linux.intel.com
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>	[brcmfmac]
      Acked-by: default avatarKalle Valo <kvalo@kernel.org>
      Cc: Arend van Spriel <aspriel@gmail.com>
      Cc: Franky Lin <franky.lin@broadcom.com>
      Cc: Hante Meuleman <hante.meuleman@broadcom.com>
      Cc: Chi-hsien Lin <chi-hsien.lin@infineon.com>
      Cc: Wright Feng <wright.feng@infineon.com>
      Cc: Chung-hsien Hsu <chung-hsien.hsu@infineon.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      22c03398
    • luo penghao's avatar
      sysctl: remove redundant ret assignment · 7080cead
      luo penghao authored
      
      
      Subsequent if judgments will assign new values to ret, so the statement
      here should be deleted
      
      The clang_analyzer complains as follows:
      
        fs/proc/proc_sysctl.c:
        Value stored to 'ret' is never read
      
      Link: https://lkml.kernel.org/r/20211230063622.586360-1-luo.penghao@zte.com.cn
      Signed-off-by: default avatarluo penghao <luo.penghao@zte.com.cn>
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7080cead
    • Geert Uytterhoeven's avatar
      sysctl: fix duplicate path separator in printed entries · 153ee1c4
      Geert Uytterhoeven authored
      
      
      sysctl_print_dir() always terminates the printed path name with a slash,
      so printing a slash before the file part causes a duplicate like in
      
          sysctl duplicate entry: /kernel//perf_user_access
      
      Fix this by dropping the extra slash.
      
      Link: https://lkml.kernel.org/r/e3054d605dc56f83971e4b6d2f5fa63a978720ad.1641551872.git.geert+renesas@glider.be
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
      Acked-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Iurii Zaikin <yzaikin@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      153ee1c4
    • Qi Zheng's avatar
      proc: convert the return type of proc_fd_access_allowed() to be boolean · 51a18734
      Qi Zheng authored
      
      
      Convert return type of proc_fd_access_allowed() and the 'allowed' in it
      to be boolean since the return type of ptrace_may_access() is boolean.
      
      Link: https://lkml.kernel.org/r/20211219024404.29779-1-zhengqi.arch@bytedance.com
      Signed-off-by: default avatarQi Zheng <zhengqi.arch@bytedance.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51a18734
    • Hans de Goede's avatar
      proc: make the proc_create[_data]() stubs static inlines · ae62fbe2
      Hans de Goede authored
      
      
      Change the proc_create[_data]() stubs which are used when CONFIG_PROC_FS
      is not set from #defines to a static inline stubs.
      
      This should fix clang -Werror builds failing due to errors like this:
      
        drivers/platform/x86/thinkpad_acpi.c:918:30: error: unused variable
         'dispatch_proc_ops' [-Werror,-Wunused-const-variable]
      
      Fixing this in include/linux/proc_fs.h should ensure that the same issue
      is also fixed in any other drivers hitting the same -Werror issue.
      
      [akpm@linux-foundation.org: fix CONFIG_PROC_FS=n]
      [akpm@linux-foundation.org: fix arch/sparc/kernel/led.c]
      [akpm@linux-foundation.org: fix build]
      
      Link: https://lkml.kernel.org/r/20211116131112.508304-1-hdegoede@redhat.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ae62fbe2
    • David Hildenbrand's avatar
      proc/vmcore: don't fake reading zeroes on surprise vmcore_cb unregistration · 25bc5b0d
      David Hildenbrand authored
      In commit cc5f2704
      
       ("proc/vmcore: convert oldmem_pfn_is_ram callback
      to more generic vmcore callbacks"), we added detection of surprise
      vmcore_cb unregistration after the vmcore was already opened.  Once
      detected, we warn the user and simulate reading zeroes from that point
      on when accessing the vmcore.
      
      The basic reason was that unexpected unregistration, for example, by
      manually unbinding a driver from a device after opening the vmcore, is
      not supported and could result in reading oldmem the vmcore_cb would
      have actually prohibited while registered.  However, something like that
      can similarly be trigger by a user that's really looking for trouble
      simply by unbinding the relevant driver before opening the vmcore -- or
      by disallowing loading the driver in the first place.  So it's actually
      of limited help.
      
      Currently, unregistration can only be triggered via virtio-mem when
      manually unbinding the driver from the device inside the VM; there is no
      way to trigger it from the hypervisor, as hypervisors don't allow for
      unplugging virtio-mem devices -- ripping out system RAM from a VM
      without coordination with the guest is usually not a good idea.
      
      The important part is that unbinding the driver and unregistering the
      vmcore_cb while concurrently reading the vmcore won't crash the system,
      and that is handled by the rwsem.
      
      To make the mechanism more future proof, let's remove the "read zero"
      part, but leave the warning in place.  For example, we could have a
      future driver (like virtio-balloon) that will contact the hypervisor to
      figure out if we already populated a page for a given PFN.
      Hotunplugging such a device and consequently unregistering the vmcore_cb
      could be triggered from the hypervisor without harming the system even
      while kdump is running.  In that case, we don't want to silently end up
      with a vmcore that contains wrong data, because the user inside the VM
      might be unaware of the hypervisor action and might easily miss the
      warning in the log.
      
      Link: https://lkml.kernel.org/r/20211111192243.22002-1-david@redhat.com
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Acked-by: default avatarBaoquan He <bhe@redhat.com>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Philipp Rudo <prudo@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      25bc5b0d
    • Kefeng Wang's avatar
      mm: percpu: add generic pcpu_populate_pte() function · 20c03576
      Kefeng Wang authored
      
      
      With NEED_PER_CPU_PAGE_FIRST_CHUNK enabled, we need a function to
      populate pte, this patch adds a generic pcpu populate pte function,
      pcpu_populate_pte(), which is marked __weak and used on most
      architectures, but it is overridden on x86, which has its own
      implementation.
      
      Link: https://lkml.kernel.org/r/20211216112359.103822-5-wangkefeng.wang@huawei.com
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      20c03576
    • Kefeng Wang's avatar
      mm: percpu: add generic pcpu_fc_alloc/free funciton · 23f91716
      Kefeng Wang authored
      
      
      With the previous patch, we could add a generic pcpu first chunk
      allocate and free function to cleanup the duplicated definations on each
      architecture.
      
      Link: https://lkml.kernel.org/r/20211216112359.103822-4-wangkefeng.wang@huawei.com
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      23f91716
    • Kefeng Wang's avatar
      mm: percpu: add pcpu_fc_cpu_to_node_fn_t typedef · 1ca3fb3a
      Kefeng Wang authored
      
      
      Add pcpu_fc_cpu_to_node_fn_t and pass it into pcpu_fc_alloc_fn_t, pcpu
      first chunk allocation will call it to alloc memblock on the
      corresponding node by it, this is prepare for the next patch.
      
      Link: https://lkml.kernel.org/r/20211216112359.103822-3-wangkefeng.wang@huawei.com
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1ca3fb3a
    • Kefeng Wang's avatar
      mm: percpu: generalize percpu related config · 7ecd19cf
      Kefeng Wang authored
      
      
      Patch series "mm: percpu: Cleanup percpu first chunk function".
      
      When supporting page mapping percpu first chunk allocator on arm64, we
      found there are lots of duplicated codes in percpu embed/page first chunk
      allocator.  This patchset is aimed to cleanup them and should no function
      change.
      
      The currently supported status about 'embed' and 'page' in Archs shows
      below,
      
      	embed: NEED_PER_CPU_PAGE_FIRST_CHUNK
      	page:  NEED_PER_CPU_EMBED_FIRST_CHUNK
      
      		embed	page
      	------------------------
      	arm64	  Y	 Y
      	mips	  Y	 N
      	powerpc	  Y	 Y
      	riscv	  Y	 N
      	sparc	  Y	 Y
      	x86	  Y	 Y
      	------------------------
      
      There are two interfaces about percpu first chunk allocator,
      
       extern int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
                                      size_t atom_size,
                                      pcpu_fc_cpu_distance_fn_t cpu_distance_fn,
      -                               pcpu_fc_alloc_fn_t alloc_fn,
      -                               pcpu_fc_free_fn_t free_fn);
      +                               pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn);
      
       extern int __init pcpu_page_first_chunk(size_t reserved_size,
      -                               pcpu_fc_alloc_fn_t alloc_fn,
      -                               pcpu_fc_free_fn_t free_fn,
      -                               pcpu_fc_populate_pte_fn_t populate_pte_fn);
      +                               pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn);
      
      The pcpu_fc_alloc_fn_t/pcpu_fc_free_fn_t is killed, we provide generic
      pcpu_fc_alloc() and pcpu_fc_free() function, which are called in the
      pcpu_embed/page_first_chunk().
      
      1) For pcpu_embed_first_chunk(), pcpu_fc_cpu_to_node_fn_t is needed to be
         provided when archs supported NUMA.
      
      2) For pcpu_page_first_chunk(), the pcpu_fc_populate_pte_fn_t is killed too,
         a generic pcpu_populate_pte() which marked '__weak' is provided, if you
         need a different function to populate pte on the arch(like x86), please
         provide its own implementation.
      
      [1] https://github.com/kevin78/linux.git percpu-cleanup
      
      This patch (of 4):
      
      The HAVE_SETUP_PER_CPU_AREA/NEED_PER_CPU_EMBED_FIRST_CHUNK/
      NEED_PER_CPU_PAGE_FIRST_CHUNK/USE_PERCPU_NUMA_NODE_ID configs, which have
      duplicate definitions on platforms that subscribe it.
      
      Move them into mm, drop these redundant definitions and instead just
      select it on applicable platforms.
      
      Link: https://lkml.kernel.org/r/20211216112359.103822-1-wangkefeng.wang@huawei.com
      Link: https://lkml.kernel.org/r/20211216112359.103822-2-wangkefeng.wang@huawei.com
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
      Cc: Will Deacon <will@kernel.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.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: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7ecd19cf
  2. Jan 10, 2022
    • Linus Torvalds's avatar
      Linux 5.16 · df0cc57e
      Linus Torvalds authored
      v5.16
      df0cc57e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · e900deb2
      Linus Torvalds authored
      Pull input fix from Dmitry Torokhov:
       "A small fixup to the Zinitix touchscreen driver to avoid enabling the
        IRQ line before we successfully requested it"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: zinitix - make sure the IRQ is allocated before it gets enabled
      e900deb2
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-5.16-5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 95350123
      Linus Torvalds authored
      Pull ARM SoC fix from Olof Johansson:
       "One more fix for 5.16
      
        I had missed one patch when I sent up what I thought was the last
        batch of fixes for this release. This one fixes issues on the
        Raspberry Pi platforms due to gpio init changes this release, so
        hopefully we can get it merged before final release is cut"
      
      * tag 'soc-fixes-5.16-5' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: dts: gpio-ranges property is now required
      95350123
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of... · 9a12a5aa
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Revert "libtraceevent: Increase libtraceevent logging when verbose",
         breaks the build with libtraceevent-1.3.0, i.e. when building with
         'LIBTRACEEVENT_DYNAMIC=1'.
      
       - Avoid early exit in 'perf trace' due to running SIGCHLD handler
         before it makes sense to. It can happen when using a BPF source code
         event that have to be first built into an object file.
      
      * tag 'perf-tools-fixes-for-v5.16-2022-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        Revert "libtraceevent: Increase libtraceevent logging when verbose"
        perf trace: Avoid early exit due to running SIGCHLD handler before it makes sense to
      9a12a5aa
    • Len Brown's avatar
      Revert "drm/amdgpu: stop scheduler when calling hw_fini (v2)" · df5bc0aa
      Len Brown authored
      This reverts commit f7d6779d.
      
      This bisected regression has impacted suspend-resume stability
      since 5.15-rc1. It regressed -stable via 5.14.10.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215315
      Fixes: f7d6779d
      
       ("drm/amdgpu: stop scheduler when calling hw_fini (v2)")
      Cc: Guchun Chen <guchun.chen@amd.com>
      Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
      Cc: Christian Koenig <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: <stable@vger.kernel.org> # 5.14+
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      df5bc0aa
  3. Jan 09, 2022
  4. Jan 08, 2022
    • Linus Torvalds's avatar
      Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · d1587f7b
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "This contains the cgroup.procs permission check fixes so that they use
        the credentials at the time of open rather than write, which also
        fixes the cgroup namespace lifetime bug"
      
      * 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        selftests: cgroup: Test open-time cgroup namespace usage for migration checks
        selftests: cgroup: Test open-time credential usage for migration checks
        selftests: cgroup: Make cg_create() use 0755 for permission instead of 0644
        cgroup: Use open-time cgroup namespace for process migration perm checks
        cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv
        cgroup: Use open-time credentials for process migraton perm checks
      d1587f7b
    • Linus Torvalds's avatar
      Merge tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block · 35632d92
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "Just the md bitmap regression this time"
      
      * tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block:
        md/raid1: fix missing bitmap update w/o WriteMostly devices
      35632d92
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 494603e0
      Linus Torvalds authored
      Pull EDAC fix from Tony Luck:
       "Fix 10nm EDAC driver to release and unmap resources on systems without
        HBM"
      
      * tag 'edac_urgent_for_v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/i10nm: Release mdev/mbase when failing to detect HBM
      494603e0
    • Wolfram Sang's avatar
      Revert "i2c: core: support bus regulator controlling in adapter" · a19f75de
      Wolfram Sang authored
      This largely reverts commit 5a7b95fb. It
      breaks suspend with AMD GPUs, and we couldn't incrementally fix it. So,
      let's remove the code and go back to the drawing board. We keep the
      header extension to not break drivers already populating the regulator.
      We expect to re-add the code handling it soon.
      
      Fixes: 5a7b95fb
      
       ("i2c: core: support bus regulator controlling in adapter")
      Reported-by: default avatar"Tareque Md.Hanif" <tarequemd.hanif@yahoo.com>
      Link: https://lore.kernel.org/r/1295184560.182511.1639075777725@mail.yahoo.com
      Reported-by: default avatarKonstantin Kharlamov <hi-angel@yandex.ru>
      Link: https://lore.kernel.org/r/7143a7147978f4104171072d9f5225d2ce355ec1.camel@yandex.ru
      BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1850
      Tested-by: default avatar"Tareque Md.Hanif" <tarequemd.hanif@yahoo.com>
      Tested-by: default avatarKonstantin Kharlamov <hi-angel@yandex.ru>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      Cc: <stable@vger.kernel.org> # 5.14+
      a19f75de
    • Arnaldo Carvalho de Melo's avatar
      Revert "libtraceevent: Increase libtraceevent logging when verbose" · dc9f2dd5
      Arnaldo Carvalho de Melo authored
      This reverts commit 08efcb4a
      
      .
      
      This breaks the build as it will prefer using libbpf-devel header files,
      even when not using LIBBPF_DYNAMIC=1, breaking the build.
      
      This was detected on OpenSuSE Tumbleweed with libtraceevent-devel 1.3.0,
      as described by Jiri Slaby:
      
      =======================================================================
      It breaks build with LIBTRACEEVENT_DYNAMIC and version 1.3.0:
      > util/debug.c: In function ‘perf_debug_option’:
      > util/debug.c:243:17: error: implicit declaration of function
      ‘tep_set_loglevel’ [-Werror=implicit-function-declaration]
      >   243 |                 tep_set_loglevel(TEP_LOG_INFO);
      >       |                 ^~~~~~~~~~~~~~~~
      > util/debug.c:243:34: error: ‘TEP_LOG_INFO’ undeclared (first use in this
      function); did you mean ‘TEP_PRINT_INFO’?
      >   243 |                 tep_set_loglevel(TEP_LOG_INFO);
      >       |                                  ^~~~~~~~~~~~
      >       |                                  TEP_PRINT_INFO
      > util/debug.c:243:34: note: each undeclared identifier is reported only once
      for each function it appears in
      > util/debug.c:245:34: error: ‘TEP_LOG_DEBUG’ undeclared (first use in this
      function)
      >   245 |                 tep_set_loglevel(TEP_LOG_DEBUG);
      >       |                                  ^~~~~~~~~~~~~
      > util/debug.c:247:34: error: ‘TEP_LOG_ALL’ undeclared (first use in this
      function)
      >   247 |                 tep_set_loglevel(TEP_LOG_ALL);
      >       |                                  ^~~~~~~~~~~
      
      It is because the gcc's command line looks like:
      gcc
      ...
      -I/home/abuild/rpmbuild/BUILD/tools/lib/
      ...
      -DLIBTRACEEVENT_VERSION=65790
      ...
      =======================================================================
      
      The proper way to fix this is more involved and so not suitable for this
      late in the 5.16-rc stage.
      
      Reported-by: default avatarJiri Slaby <jirislaby@kernel.org>
      Link: https://lore.kernel.org/lkml/bc2b0786-8965-1bcd-2316-9d9bb37b9c31@kernel.org
      Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: https://lore.kernel.org/lkml/YddGjjmlMZzxUZbN@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dc9f2dd5
    • Jiri Olsa's avatar
      perf trace: Avoid early exit due to running SIGCHLD handler before it makes sense to · f06a82f9
      Jiri Olsa authored
      
      
      When running 'perf trace' with an BPF object like:
      
        # perf trace -e openat,tools/perf/examples/bpf/hello.c
      
      the event parsing eventually calls llvm__get_kbuild_opts() that runs a
      script and that ends up with SIGCHLD delivered to the 'perf trace'
      handler, which assumes the workload process is done and quits 'perf
      trace'.
      
      Move the SIGCHLD handler setup directly to trace__run(), where the event
      is parsed and the object is already compiled.
      
      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: Christy Lee <christyc.y.lee@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Mark Rutland <mark.rutland@arm.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/20220106222030.227499-1-jolsa@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f06a82f9
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 24556728
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Two small fixes for x86:
      
         - lockdep WARN due to missing lock nesting annotation
      
         - NULL pointer dereference when accessing debugfs"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Check for rmaps allocation
        KVM: SEV: Mark nested locking of kvm->lock
      24556728
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm/drm · 7a6043cc
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "There is only the amdgpu runtime pm regression fix in here:
      
        amdgpu:
      
         - suspend/resume fix
      
         - fix runtime PM regression"
      
      * tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: disable runpm if we are the primary adapter
        fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb
        drm/amd/pm: keep the BACO feature enabled for suspend
      7a6043cc
    • Nikunj A Dadhania's avatar
      KVM: x86: Check for rmaps allocation · fffb5323
      Nikunj A Dadhania authored
      
      
      With TDP MMU being the default now, access to mmu_rmaps_stat debugfs
      file causes following oops:
      
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      PGD 0 P4D 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 7 PID: 3185 Comm: cat Not tainted 5.16.0-rc4+ #204
      RIP: 0010:pte_list_count+0x6/0x40
       Call Trace:
        <TASK>
        ? kvm_mmu_rmaps_stat_show+0x15e/0x320
        seq_read_iter+0x126/0x4b0
        ? aa_file_perm+0x124/0x490
        seq_read+0xf5/0x140
        full_proxy_read+0x5c/0x80
        vfs_read+0x9f/0x1a0
        ksys_read+0x67/0xe0
        __x64_sys_read+0x19/0x20
        do_syscall_64+0x3b/0xc0
        entry_SYSCALL_64_after_hwframe+0x44/0xae
       RIP: 0033:0x7fca6fc13912
      
      Return early when rmaps are not present.
      
      Reported-by: default avatarVasant Hegde <vasant.hegde@amd.com>
      Tested-by: default avatarVasant Hegde <vasant.hegde@amd.com>
      Signed-off-by: default avatarNikunj A Dadhania <nikunj@amd.com>
      Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
      Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20220105040337.4234-1-nikunj@amd.com>
      Cc: stable@vger.kernel.org
      Fixes: 3bcd0662
      
       ("KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fffb5323
    • Wanpeng Li's avatar
      KVM: SEV: Mark nested locking of kvm->lock · 597cb796
      Wanpeng Li authored
      Both source and dest vms' kvm->locks are held in sev_lock_two_vms.
      Mark one with a different subtype to avoid false positives from lockdep.
      
      Fixes: c9d61dcb
      
       (KVM: SEV: accept signals in sev_lock_two_vms)
      Reported-by: default avatarYiru Xu <xyru1999@gmail.com>
      Tested-by: default avatarJinrong Liang <cloudliang@tencent.com>
      Signed-off-by: default avatarWanpeng Li <wanpengli@tencent.com>
      Message-Id: <1641364863-26331-1-git-send-email-wanpengli@tencent.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      597cb796
  5. Jan 07, 2022
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · ddec8ed2
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Last pull for 5.16, the reversion has been known for a while now but
        didn't get a proper fix in time. Looks like we will have several
        info-leak bugs to take care of going foward.
      
         - Revert the patch fixing the DM related crash causing a widespread
           regression for kernel ULPs. A proper fix just didn't appear this
           cycle due to the holidays
      
         - Missing NULL check on alloc in uverbs
      
         - Double free in rxe error paths
      
         - Fix a new kernel-infoleak report when forming ah_attr's without
           GRH's in ucma"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/core: Don't infoleak GRH fields
        RDMA/uverbs: Check for null return of kmalloc_array
        Revert "RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow"
        RDMA/rxe: Prevent double freeing rxe_map_set()
      ddec8ed2
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · b2b436ec
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "Three minor tracing fixes:
      
         - Fix missing prototypes in sample module for direct functions
      
         - Fix check of valid buffer in get_trace_buf()
      
         - Fix annotations of percpu pointers"
      
      * tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Tag trace_percpu_buffer as a percpu pointer
        tracing: Fix check for trace_percpu_buffer validity in get_trace_buf()
        ftrace/samples: Add missing prototypes direct functions
      b2b436ec
    • Tejun Heo's avatar
      selftests: cgroup: Test open-time cgroup namespace usage for migration checks · bf35a787
      Tejun Heo authored
      
      
      When a task is writing to an fd opened by a different task, the perm check
      should use the cgroup namespace of the latter task. Add a test for it.
      
      Tested-by: default avatarMichal Koutný <mkoutny@suse.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      bf35a787