public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: runtime warning after merge of the cel-fixes tree
Date: Thu, 7 Apr 2022 15:35:24 +0000	[thread overview]
Message-ID: <F1B98786-A0C4-4907-9B44-7D13050237F2@oracle.com> (raw)
In-Reply-To: <20220407111318.649f908d@gandalf.local.home>

Hi Steven-

> On Apr 7, 2022, at 11:13 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> On Thu, 7 Apr 2022 10:54:46 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
>> Hmm, I know we added code to handle "__get_sockaddr()" but I guess this
>> should also be fine for "__get_dynamic_array()" as well.
> 
> Does the below patch fix it?
> 
> (not even compiled tested)
> 
> -- Steve
> 
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index e11e167b7809..043b80f3e19a 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -392,8 +392,9 @@ static void test_event_printk(struct trace_event_call *call)
> 			if (!(dereference_flags & (1ULL << arg)))
> 				goto next_arg;
> 
> -			/* Check for __get_sockaddr */;
> -			if (str_has_prefix(fmt + i, "__get_sockaddr(")) {
> +			/* Check for __get_sockaddr or __get_dynamic_array */;
> +			if (str_has_prefix(fmt + i, "__get_sockaddr(") ||
> +			    str_has_prefix(fmt + i, "__get_dynamic_array(")) {
> 				dereference_flags &= ~(1ULL << arg);
> 				goto next_arg;
> 			}

That looks reasonable for present and future kernels.

We're looking for a solution that can be back-ported to stable,
however, because the patch Mr. Rothwell had to revert is meant
to address a NULL pointer deref that was introduced several years
ago. (Otherwise I would have just used __get_sockaddr() and put
my pencil down).

The simplest option is to take a brute-force approach and
convert the sockaddr to a presentation address with an snprintf()
call in the TP_fast_assign() arm of the tracepoints. Allow that
to be carried into -stable as needed; then in v5.19 apply a
clean-up that converts that mess into a proper __get_sockaddr().

That way, it stays my issue to address without needing to
co-ordinate with fixes in other areas.


--
Chuck Lever




  reply	other threads:[~2022-04-07 15:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  4:45 linux-next: runtime warning after merge of the cel-fixes tree Stephen Rothwell
2022-04-07 13:48 ` Chuck Lever III
2022-04-07 14:54   ` Steven Rostedt
2022-04-07 15:13     ` Steven Rostedt
2022-04-07 15:35       ` Chuck Lever III [this message]
2022-04-07 15:42         ` Steven Rostedt
2022-04-07 15:50           ` Steven Rostedt
2022-04-07 16:05             ` Steven Rostedt
2022-04-07 16:04           ` Chuck Lever III

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=F1B98786-A0C4-4907-9B44-7D13050237F2@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sfr@canb.auug.org.au \
    /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