Lines Matching +full:buffer +full:- +full:enable
1 // SPDX-License-Identifier: MIT
41 return -ENOMEM; in mitigations_set()
44 bool enable = true; in mitigations_set() local
62 enable = !enable; in mitigations_set()
67 enable = !enable; in mitigations_set()
76 if (enable) in mitigations_set()
86 err = -EINVAL; in mitigations_set()
98 static int mitigations_get(char *buffer, const struct kernel_param *kp) in mitigations_get() argument
102 bool enable; in mitigations_get() local
105 return scnprintf(buffer, PAGE_SIZE, "%s\n", "off"); in mitigations_get()
107 if (local & BIT(BITS_PER_LONG - 1)) { in mitigations_get()
108 count = scnprintf(buffer, PAGE_SIZE, "%s,", "auto"); in mitigations_get()
109 enable = false; in mitigations_get()
111 enable = true; in mitigations_get()
116 if ((local & BIT(i)) != enable) in mitigations_get()
119 count += scnprintf(buffer + count, PAGE_SIZE - count, in mitigations_get()
120 "%s%s,", enable ? "" : "!", names[i]); in mitigations_get()
123 buffer[count - 1] = '\n'; in mitigations_get()
134 "Selectively enable security mitigations for all Intel® GPUs in the system.\n"
136 " auto -- enables all mitigations required for the platform [default]\n"
137 " off -- disables all mitigations\n"
139 "Individual mitigations can be enabled by passing a comma-separated string,\n"
140 "e.g. mitigations=residuals to enable only clearing residuals or\n"
146 " residuals -- clear all thread-local registers between contexts"