public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Cc: stable@vger.kernel.org, jolsa@kernel.org, daniel@iogearbox.net,
	yhs@fb.com
Subject: Re: [PATCH 5.15,6.1] Fixup preempt imbalance with bpf_trace_printk
Date: Fri, 23 Feb 2024 16:43:59 +0100	[thread overview]
Message-ID: <2024022352-spectrum-crier-44d9@gregkh> (raw)
In-Reply-To: <20240217121321.2045993-1-cascardo@igalia.com>

On Sat, Feb 17, 2024 at 09:13:14AM -0300, Thadeu Lima de Souza Cascardo wrote:
> When bpf_trace_printk is called without any args in a second depth level,
> it will enable preemption without disabling it.
> 
> These patch series fix this for 5.15 and 6.1. The fix was introduced in
> 6.3, so later kernels already have it. And 5.10 and earlier did not have
> the code that disabled preemption, so they are fine in that regard.
> 
> This was tested by attaching a bpf program doing a non-0 arguments
> trace_printk at sys_enter and a 0 arguments snprintf at local_timer_entry.
> 
> Dave Marchevsky (1):
>   bpf: Merge printk and seq_printf VARARG max macros
> 
> Jiri Olsa (3):
>   bpf: Add struct for bin_args arg in bpf_bprintf_prepare
>   bpf: Do cleanup in bpf_bprintf_cleanup only when needed
>   bpf: Remove trace_printk_lock
> 
>  include/linux/bpf.h      | 14 ++++++--
>  kernel/bpf/helpers.c     | 71 ++++++++++++++++++++++------------------
>  kernel/bpf/verifier.c    |  3 +-
>  kernel/trace/bpf_trace.c | 39 ++++++++++------------
>  4 files changed, 72 insertions(+), 55 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

All now queued up, thanks!

greg k-h

      parent reply	other threads:[~2024-02-23 15:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 12:13 [PATCH 5.15,6.1] Fixup preempt imbalance with bpf_trace_printk Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 6.1 1/3] bpf: Add struct for bin_args arg in bpf_bprintf_prepare Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 6.1 2/3] bpf: Do cleanup in bpf_bprintf_cleanup only when needed Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 6.1 3/3] bpf: Remove trace_printk_lock Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 5.15 1/4] bpf: Merge printk and seq_printf VARARG max macros Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 5.15 2/4] bpf: Add struct for bin_args arg in bpf_bprintf_prepare Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 5.15 3/4] bpf: Do cleanup in bpf_bprintf_cleanup only when needed Thadeu Lima de Souza Cascardo
2024-02-17 12:13 ` [PATCH 5.15 4/4] bpf: Remove trace_printk_lock Thadeu Lima de Souza Cascardo
2024-02-23 15:43 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024022352-spectrum-crier-44d9@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=cascardo@igalia.com \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox