1. 05 Apr, 2023 5 commits
  2. 04 Apr, 2023 24 commits
  3. 19 Mar, 2023 11 commits
    • Linus Torvalds's avatar
      Linux 6.3-rc3 · e8d018dd
      Linus Torvalds authored
      e8d018dd
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · eaba52d6
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix setting affinity of hwlat threads in containers
      
         Using sched_set_affinity() has unwanted side effects when being
         called within a container. Use set_cpus_allowed_ptr() instead
      
       - Fix per cpu thread management of the hwlat tracer:
          - Do not start per_cpu threads if one is already running for the CPU
          - When starting per_cpu threads, do not clear the kthread variable
            as it may already be set to running per cpu threads
      
       - Fix return value for test_gen_kprobe_cmd()
      
         On error the return value was overwritten by being set to the result
         of the call from kprobe_event_delete(), which would likely succeed,
         and thus have the function return success
      
       - Fix splice() reads from the trace file that was broken by commit
         36e2c742 ("fs: don't allow splice read/write without explicit
         ops")
      
       - Remove obsolete and confusing comment in ring_buffer.c
      
         The original design of the ring buffer used struct page flags for
         tricks to optimize, which was shortly removed due to them being
         tricks. But a comment for those tricks remained
      
       - Set local functions and variables to static
      
      * tag 'trace-v6.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing/hwlat: Replace sched_setaffinity with set_cpus_allowed_ptr
        ring-buffer: remove obsolete comment for free_buffer_page()
        tracing: Make splice_read available again
        ftrace: Set direct_ops storage-class-specifier to static
        trace/hwlat: Do not start per-cpu thread if it is already running
        trace/hwlat: Do not wipe the contents of per-cpu thread data
        tracing/osnoise: set several trace_osnoise.c variables storage-class-specifier to static
        tracing: Fix wrong return in kprobe_event_gen_test.c
      eaba52d6
    • Costa Shulyupin's avatar
      tracing/hwlat: Replace sched_setaffinity with set_cpus_allowed_ptr · 71c7a304
      Costa Shulyupin authored
      There is a problem with the behavior of hwlat in a container,
      resulting in incorrect output. A warning message is generated:
      "cpumask changed while in round-robin mode, switching to mode none",
      and the tracing_cpumask is ignored. This issue arises because
      the kernel thread, hwlatd, is not a part of the container, and
      the function sched_setaffinity is unable to locate it using its PID.
      Additionally, the task_struct of hwlatd is already known.
      Ultimately, the function set_cpus_allowed_ptr achieves
      the same outcome as sched_setaffinity, but employs task_struct
      instead of PID.
      
      Test case:
      
        # cd /sys/kernel/tracing
        # echo 0 > tracing_on
        # echo round-robin > hwlat_detector/mode
        # echo hwlat > current_tracer
        # unshare --fork --pid bash -c 'echo 1 > tracing_on'
        # dmesg -c
      
      Actual behavior:
      
      [573502.809060] hwlat_detector: cpumask changed while in round-robin mode, switching to mode none
      
      Link: https://lore.kernel.org/linux-trace-kernel/20230316144535.1004952-1-costa.shul@redhat.com
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Fixes: 0330f7aa ("tracing: Have hwlat trace migrate across tracing_cpumask CPUs")
      Signed-off-by: default avatarCosta Shulyupin <costa.shul@redhat.com>
      Acked-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      71c7a304
    • Vlastimil Babka's avatar
      ring-buffer: remove obsolete comment for free_buffer_page() · a98151ad
      Vlastimil Babka authored
      The comment refers to mm/slob.c which is being removed. It comes from
      commit ed56829c ("ring_buffer: reset buffer page when freeing") and
      according to Steven the borrowed code was a page mapcount and mapping
      reset, which was later removed by commit e4c2ce82 ("ring_buffer:
      allocate buffer page pointer"). Thus the comment is not accurate anyway,
      remove it.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20230315142446.27040-1-vbabka@suse.cz
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Reported-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
      Suggested-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Fixes: e4c2ce82 ("ring_buffer: allocate buffer page pointer")
      Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Reviewed-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      a98151ad
    • Sung-hun Kim's avatar
      tracing: Make splice_read available again · e400be67
      Sung-hun Kim authored
      Since the commit 36e2c742 ("fs: don't allow splice read/write
      without explicit ops") is applied to the kernel, splice() and
      sendfile() calls on the trace file (/sys/kernel/debug/tracing
      /trace) return EINVAL.
      
      This patch restores these system calls by initializing splice_read
      in file_operations of the trace file. This patch only enables such
      functionalities for the read case.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20230314013707.28814-1-sfoon.kim@samsung.com
      
      Cc: stable@vger.kernel.org
      Fixes: 36e2c742 ("fs: don't allow splice read/write without explicit ops")
      Signed-off-by: default avatarSung-hun Kim <sfoon.kim@samsung.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      e400be67
    • Linus Torvalds's avatar
      Merge tag 'tty-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 5cdfdd6d
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty and serial driver fixes for 6.3-rc3 to resolve
        some reported issues.
      
        They include:
      
         - 8250 driver Kconfig issue pointed out by you that showed up in -rc1
      
         - qcom-geni serial driver fixes
      
         - various 8250 driver fixes for reported problems
      
         - fsl_lpuart driver fixes
      
         - serdev fix for regression in -rc1
      
         - vt.c bugfix
      
        All have been in linux-next for over a week with no reported problems"
      
      * tag 'tty-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: vt: protect KD_FONT_OP_GET_TALL from unbound access
        serial: qcom-geni: drop bogus uart_write_wakeup()
        serial: qcom-geni: fix mapping of empty DMA buffer
        serial: qcom-geni: fix DMA mapping leak on shutdown
        serial: qcom-geni: fix console shutdown hang
        serdev: Set fwnode for serdev devices
        tty: serial: fsl_lpuart: fix race on RX DMA shutdown
        serial: 8250_pci1xxxx: Disable SERIAL_8250_PCI1XXXX config by default
        serial: 8250_fsl: fix handle_irq locking
        serial: 8250_em: Fix UART port type
        serial: 8250: ASPEED_VUART: select REGMAP instead of depending on it
        tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted
        Revert "tty: serial: fsl_lpuart: adjust SERIAL_FSL_LPUART_CONSOLE config dependency"
      5cdfdd6d
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · ce86beb4
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are a few small char/misc/other driver subsystem patches to
        resolve reported problems for 6.3-rc3.
      
        Included in here are:
      
         - Interconnect driver fixes for reported problems
      
         - Memory driver fixes for reported problems
      
         - nvmem core fix
      
         - firmware driver fix for reported problem
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (23 commits)
        memory: tegra30-emc: fix interconnect registration race
        memory: tegra20-emc: fix interconnect registration race
        memory: tegra124-emc: fix interconnect registration race
        memory: tegra: fix interconnect registration race
        interconnect: exynos: drop redundant link destroy
        interconnect: exynos: fix registration race
        interconnect: exynos: fix node leak in probe PM QoS error path
        interconnect: qcom: msm8974: fix registration race
        interconnect: qcom: rpmh: fix registration race
        interconnect: qcom: rpmh: fix probe child-node error handling
        interconnect: qcom: rpm: fix registration race
        nvmem: core: return -ENOENT if nvmem cell is not found
        firmware: xilinx: don't make a sleepable memory allocation from an atomic context
        interconnect: qcom: rpm: fix probe child-node error handling
        interconnect: qcom: osm-l3: fix registration race
        interconnect: imx: fix registration race
        interconnect: fix provider registration API
        interconnect: fix icc_provider_del() error handling
        interconnect: fix mem leak when freeing nodes
        interconnect: qcom: qcm2290: Fix MASTER_SNOC_BIMC_NRT
        ...
      ce86beb4
    • Linus Torvalds's avatar
      Merge tag 'ras_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c46a7d04
      Linus Torvalds authored
      Pull RAS fix from Borislav Petkov:
      
       - Flush out logged errors immediately after MCA banks configuration
         changes over sysfs have been done instead of waiting until something
         else triggers the workqueue later - another error or the polling
         interval cycle is reached
      
      * tag 'ras_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Make sure logged MCEs are processed after sysfs update
      c46a7d04
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 80102f2e
      Linus Torvalds authored
      Pull perf fixes from Borislav Petkov:
      
       - Check whether sibling events have been deactivated before adding them
         to groups
      
       - Update the proper event time tracking variable depending on the event
         type
      
       - Fix a memory overwrite issue due to using the wrong function argument
         when outputting perf events
      
      * tag 'perf_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix check before add_event_to_groups() in perf_group_detach()
        perf: fix perf_event_context->time
        perf/core: Fix perf_output_begin parameter is incorrectly invoked in perf_event_bpf_output
      80102f2e
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4ac39c59
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
       "There's a little bit more 'movement' in there for my taste but it
        needs to happen and should make the code better after it.
      
         - Check cmdline_find_option()'s return value before further
           processing
      
         - Clear temporary storage in the resctrl code to prevent access to an
           unexistent MSR
      
         - Add a simple throttling mechanism to protect the hypervisor from
           potentially malicious SEV guests issuing requests in rapid
           succession.
      
           In order to not jeopardize the sanity of everyone involved in
           maintaining this code, the request issuing side has received a
           cleanup, split in more or less trivial, small and digestible
           pieces. Otherwise, the code was threatening to become an
           unmaintainable mess.
      
           Therefore, that cleanup is marked indirectly also for stable so
           that there's no differences between the upstream code and the
           stable variant when it comes down to backporting more there"
      
      * tag 'x86_urgent_for_v6.3_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Fix use of uninitialized buffer in sme_enable()
        x86/resctrl: Clear staged_config[] before and after it is used
        virt/coco/sev-guest: Add throttling awareness
        virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case
        virt/coco/sev-guest: Do some code style cleanups
        virt/coco/sev-guest: Carve out the request issuing logic into a helper
        virt/coco/sev-guest: Remove the disable_vmpck label in handle_guest_request()
        virt/coco/sev-guest: Simplify extended guest request handling
        virt/coco/sev-guest: Check SEV_SNP attribute at probe time
      4ac39c59
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 995bba43
      Linus Torvalds authored
      Pull ext4 fix from Ted Ts'o:
       "Fix a double unlock bug on an error path in ext4, found by smatch and
        syzkaller"
      
      * tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix possible double unlock when moving a directory
      995bba43