<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/rust/kernel/ratelimit.rs, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/rust/kernel/ratelimit.rs?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/rust/kernel/ratelimit.rs?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-10-12T05:03:26Z</updated>
<entry>
<title>rust: add pr_*_ratelimited! macros for printing</title>
<updated>2026-10-12T05:03:26Z</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2026-10-07T14:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ecdfcc7f2974c368fb932b16dd3c2deb4a8cbdb0'/>
<id>urn:sha1:ecdfcc7f2974c368fb932b16dd3c2deb4a8cbdb0</id>
<content type='text'>
Printing can be very expensive if it occurs often, so printing that can
be triggered by userspace should be rate limited. For this purpose, add
a Rust wrapper around `struct ratelimit_state` and use it in the new
macros.

The new files will fall under the catch-all RUST maintainers entry.

Tested-by: Alvin Sun &lt;alvin.sun@linux.dev&gt;
Reviewed-by: Carlos Llamas &lt;cmllamas@google.com&gt;
Link: https://github.com/Rust-for-Linux/linux/issues/122
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Signed-off-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Link: https://patch.msgid.link/20261007-pr-ratelimited-v6-3-f14accd4ea3b@google.com
[ Removed unused link reference definitions. On the `static`, allowed
  the `non_upper_case_globals` lint so that `kernel` users (and users
  providing their own name) do not warn. Reworded title for typo.
    - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
</feed>
