All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: David Hildenbrand <david@redhat.com>,
	Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: BUG selftests/mm]
Date: Mon, 11 Mar 2024 15:28:26 -0400	[thread overview]
Message-ID: <Ze9bWkrD6UBZ2ErV@x1n> (raw)
In-Reply-To: <CAJHvVcie+N+4j60m_Dxh7QzbZLmsjnq2-04peuqE8VkkMq984A@mail.gmail.com>

On Mon, Mar 11, 2024 at 11:59:59AM -0700, Axel Rasmussen wrote:
> I'd prefer not to require root or CAP_SYS_ADMIN or similar for
> UFFDIO_POISON, because those control access to lots more things
> besides, which we don't necessarily want the process using UFFD to be
> able to do. :/
> 
> Ratelimiting seems fairly reasonable to me. I do see the concern about
> dropping some addresses though.

Do you know how much could an admin rely on such addresses?  How frequent
would MCE generate normally in a sane system?

> Perhaps we can mitigate that concern by defining our own ratelimit
> interval/burst configuration?

Any details?

> Another idea would be to only ratelimit it if !CONFIG_DEBUG_VM or
> similar. Not sure if that's considered valid or not. :)

This, OTOH, sounds like an overkill..

I just checked again on the detail of ratelimit code, where we by default
it has:

#define DEFAULT_RATELIMIT_INTERVAL	(5 * HZ)
#define DEFAULT_RATELIMIT_BURST		10

So it allows a 10 times burst rather than 2.. IIUC it means even if
there're continous 10 MCEs it won't get suppressed, until the 11th came, in
5 seconds interval.  I think it means it's possibly even less of a concern
to directly use pr_err_ratelimited().

Thanks,

-- 
Peter Xu


  reply	other threads:[~2024-03-11 19:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09 19:12 BUG selftests/mm] Mirsad Todorovac
2024-03-11  9:31 ` David Hildenbrand
2024-03-11 14:35   ` Peter Xu
2024-03-11 14:48     ` David Hildenbrand
2024-03-11 15:12       ` Peter Xu
2024-03-11 18:59         ` Axel Rasmussen
2024-03-11 19:28           ` Peter Xu [this message]
2024-03-11 21:26             ` James Houghton
2024-03-11 22:28               ` Jiaqi Yan
2024-03-12 15:38                 ` Peter Xu
2024-03-12 16:47                   ` Axel Rasmussen

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=Ze9bWkrD6UBZ2ErV@x1n \
    --to=peterx@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mirsad.todorovac@alu.unizg.hr \
    --cc=shuah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.