File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,22 @@ are enabled by XCR0 as well, but the first use of related instruction is
11
11
trapped by the kernel because by default the required large XSTATE buffers
12
12
are not allocated automatically.
13
13
14
+ The purpose for dynamic features
15
+ --------------------------------
16
+
17
+ Legacy userspace libraries often have hard-coded, static sizes for
18
+ alternate signal stacks, often using MINSIGSTKSZ which is typically 2KB.
19
+ That stack must be able to store at *least * the signal frame that the
20
+ kernel sets up before jumping into the signal handler. That signal frame
21
+ must include an XSAVE buffer defined by the CPU.
22
+
23
+ However, that means that the size of signal stacks is dynamic, not static,
24
+ because different CPUs have differently-sized XSAVE buffers. A compiled-in
25
+ size of 2KB with existing applications is too small for new CPU features
26
+ like AMX. Instead of universally requiring larger stack, with the dynamic
27
+ enabling, the kernel can enforce userspace applications to have
28
+ properly-sized altstacks.
29
+
14
30
Using dynamically enabled XSTATE features in user space applications
15
31
--------------------------------------------------------------------
16
32
You can’t perform that action at this time.
0 commit comments