str = kstrdup(val, GFP_KERNEL); if (!str) return -ENOMEM;
for (sep = str; (tok = strsep(&sep, ","));) { bool enable = true; int i;
/* Be tolerant of leading/trailing whitespace */
tok = strim(tok);
if (first) {
first = false;
if (!strcmp(tok, "auto")) continue;
new = 0; if (!strcmp(tok, "off")) continue;
}
if (*tok == '!') {
enable = !enable;
tok++;
}
if (!strncmp(tok, "no", 2)) {
enable = !enable;
tok += 2;
}
if (*tok == '\0') continue;
for (i = 0; i < ARRAY_SIZE(names); i++) { if (!strcmp(tok, names[i])) { if (enable) new |= BIT(i); else new &= ~BIT(i); break;
}
} if (i == ARRAY_SIZE(names)) {
pr_err("Bad \"%s.mitigations=%s\", '%s' is unknown\n",
DRIVER_NAME, val, tok);
err = -EINVAL; break;
}
}
kfree(str); if (err) return err;
WRITE_ONCE(mitigations, new); return 0;
}
staticint mitigations_get(char *buffer, conststruct kernel_param *kp)
{ unsignedlong local = READ_ONCE(mitigations); int count, i; bool enable;
if (!local) return scnprintf(buffer, PAGE_SIZE, "%s\n", "off");
module_param_cb_unsafe(mitigations, &ops, NULL, 0600);
MODULE_PARM_DESC(mitigations, "Selectively enable security mitigations for all Intel® GPUs in the system.\n" "\n" " auto -- enables all mitigations required for the platform [default]\n" " off -- disables all mitigations\n" "\n" "Individual mitigations can be enabled by passing a comma-separated string,\n" "e.g. mitigations=residuals to enable only clearing residuals or\n" "mitigations=auto,noresiduals to disable only the clear residual mitigation.\n" "Either '!' or 'no' may be used to switch from enabling the mitigation to\n" "disabling it.\n" "\n" "Active mitigations for Ivybridge, Baytrail, Haswell:\n" " residuals -- clear all thread-local registers between contexts"
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.