Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <fenghua.yu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20210419214958.4035512-5-fenghua.yu@intel.com

authored by

Fenghua Yu and committed by
Thomas Gleixner
d28397ea 9d839c28

+22
+22
Documentation/x86/buslock.rst
··· 63 63 | |When both features are | | 64 64 | |supported, fatal in #AC | | 65 65 +------------------+----------------------------+-----------------------+ 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 + +------------------+----------------------------+-----------------------+ 66 71 67 72 Usages 68 73 ====== ··· 107 102 ----- 108 103 109 104 In this case, the bus lock is not tolerated and the process is killed. 105 + 106 + ratelimit 107 + --------- 108 + 109 + A system wide bus lock rate limit N is specified where 0 < N <= 1000. This 110 + allows a bus lock rate up to N bus locks per second. When the bus lock rate 111 + is exceeded then any task which is caught via the buslock #DB exception is 112 + throttled by enforced sleeps until the rate goes under the limit again. 113 + 114 + This is an effective mitigation in cases where a minimal impact can be 115 + tolerated, but an eventual Denial of Service attack has to be prevented. It 116 + allows to identify the offending processes and analyze whether they are 117 + malicious or just badly written. 118 + 119 + Selecting a rate limit of 1000 allows the bus to be locked for up to about 120 + seven million cycles each second (assuming 7000 cycles for each bus 121 + lock). On a 2 GHz processor that would be about 0.35% system slowdown.