linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Beau Belgrave <beaub@linux.microsoft.com>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	dcook@linux.microsoft.com, alanau@linux.microsoft.com,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] tracing/user_events: Ensure bit is cleared on unregister
Date: Tue, 25 Apr 2023 13:56:15 -0400	[thread overview]
Message-ID: <20230425135615.5801d0cf@gandalf.local.home> (raw)
In-Reply-To: <20230425170654.GA74@W11-BEAU-MD.localdomain>

On Tue, 25 Apr 2023 10:06:54 -0700
Beau Belgrave <beaub@linux.microsoft.com> wrote:

> That's a good point, user_event_mm_fault() is a wrapper around
> fixup_user_fault(). We retry if it works, so I guess if the user could
> somehow cause a fail on the write and succeed to page in repeatedly, it
> could keep the loop going for that time period. I cannot think of a way
> to achieve this forever, but that doesn't mean it couldn't happen.
> 
> I can certainly add an upper bound of retries (maybe 3 or so?) if you
> think it would be possible for this to occur. I think we need retries of
> some amount to handle spurious faults.

Even 10 is fine. With a comment saying, "This really shouldn't loop more
than a couple of times, but we want to make sure some mischievous user
doesn't take advantage of this looping".

-- Steve

  reply	other threads:[~2023-04-25 17:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 21:17 [PATCH 0/3] tracing/user_events: Fixes and improvements for 6.4 Beau Belgrave
2023-04-11 21:17 ` [PATCH 1/3] tracing/user_events: Ensure write index cannot be negative Beau Belgrave
2023-04-25 14:43   ` Masami Hiramatsu
2023-04-11 21:17 ` [PATCH 2/3] tracing/user_events: Ensure bit is cleared on unregister Beau Belgrave
2023-04-25  1:39   ` Steven Rostedt
2023-04-25 17:06     ` Beau Belgrave
2023-04-25 17:56       ` Steven Rostedt [this message]
2023-04-11 21:17 ` [PATCH 3/3] tracing/user_events: Prevent same address and bit per process Beau Belgrave
2023-04-25  1:41   ` Steven Rostedt

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=20230425135615.5801d0cf@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=alanau@linux.microsoft.com \
    --cc=beaub@linux.microsoft.com \
    --cc=dcook@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).