Skip to content

Commit d28397e

Browse files
Fenghua YuKAGA-KOKO
authored andcommitted
Documentation/x86: Add ratelimit in buslock.rst
ratelimit is a new command line option for bus lock handling. Add proper documentation. [ tglx: Massaged documentation ] Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9d839c2 commit d28397e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Documentation/x86/buslock.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ parameter "split_lock_detect". Here is a summary of different options:
6363
| |When both features are | |
6464
| |supported, fatal in #AC | |
6565
+------------------+----------------------------+-----------------------+
66+
|ratelimit:N |Do nothing |Limit bus lock rate to |
67+
|(0 < N <= 1000) | |N bus locks per second |
68+
| | |system wide and warn on|
69+
| | |bus locks. |
70+
+------------------+----------------------------+-----------------------+
6671

6772
Usages
6873
======
@@ -102,3 +107,20 @@ fatal
102107
-----
103108

104109
In this case, the bus lock is not tolerated and the process is killed.
110+
111+
ratelimit
112+
---------
113+
114+
A system wide bus lock rate limit N is specified where 0 < N <= 1000. This
115+
allows a bus lock rate up to N bus locks per second. When the bus lock rate
116+
is exceeded then any task which is caught via the buslock #DB exception is
117+
throttled by enforced sleeps until the rate goes under the limit again.
118+
119+
This is an effective mitigation in cases where a minimal impact can be
120+
tolerated, but an eventual Denial of Service attack has to be prevented. It
121+
allows to identify the offending processes and analyze whether they are
122+
malicious or just badly written.
123+
124+
Selecting a rate limit of 1000 allows the bus to be locked for up to about
125+
seven million cycles each second (assuming 7000 cycles for each bus
126+
lock). On a 2 GHz processor that would be about 0.35% system slowdown.

0 commit comments

Comments
 (0)