Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I meant disable at run time, not disabling via recompiling your own kernel.


That is also in there. You can either specify "pti off" or "nopti" as a boot parameter.

  +void __init pti_check_boottime_disable(void)
  ...
  +	ret = cmdline_find_option(boot_command_line, "pti", arg, sizeof(arg));
  +	if (ret > 0)  {
  +		if (ret == 3 && !strncmp(arg, "off", 3)) {
  +			pti_print_if_insecure("disabled on command line.");
  +			return;
  +		}
  +		if (ret == 2 && !strncmp(arg, "on", 2)) {
  +			pti_print_if_secure("force enabled on command line.");
  +			goto enable;
  +  		}
  +		if (ret == 4 && !strncmp(arg, "auto", 4))
  +			goto autosel;
  +	}
  +
  +	if (cmdline_find_option_bool(boot_command_line, "nopti")) {
  +		pti_print_if_insecure("disabled on command line.");
  +		return;
  +	}
  +
  +autosel:
  +	if (!boot_cpu_has_bug(X86_BUG_CPU_INSECURE))
  +		return;




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: