162306a36Sopenharmony_ci=================================== 262306a36Sopenharmony_ciDocumentation for /proc/sys/kernel/ 362306a36Sopenharmony_ci=================================== 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci.. See scripts/check-sysctl-docs to keep this up to date 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciCopyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciCopyright (c) 2009, Shen Feng<shen@cn.fujitsu.com> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciFor general info and legal blurb, please look in 1362306a36Sopenharmony_ciDocumentation/admin-guide/sysctl/index.rst. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci------------------------------------------------------------------------------ 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciThis file contains documentation for the sysctl files in 1862306a36Sopenharmony_ci``/proc/sys/kernel/``. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciThe files in this directory can be used to tune and monitor 2162306a36Sopenharmony_cimiscellaneous and general things in the operation of the Linux 2262306a36Sopenharmony_cikernel. Since some of the files *can* be used to screw up your 2362306a36Sopenharmony_cisystem, it is advisable to read both documentation and source 2462306a36Sopenharmony_cibefore actually making adjustments. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciCurrently, these files might (depending on your configuration) 2762306a36Sopenharmony_cishow up in ``/proc/sys/kernel``: 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci.. contents:: :local: 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciacct 3362306a36Sopenharmony_ci==== 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci:: 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci highwater lowwater frequency 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ciIf BSD-style process accounting is enabled these values control 4062306a36Sopenharmony_ciits behaviour. If free space on filesystem where the log lives 4162306a36Sopenharmony_cigoes below ``lowwater``\ % accounting suspends. If free space gets 4262306a36Sopenharmony_ciabove ``highwater``\ % accounting resumes. ``frequency`` determines 4362306a36Sopenharmony_cihow often do we check the amount of free space (value is in 4462306a36Sopenharmony_ciseconds). Default: 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci:: 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci 4 2 30 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ciThat is, suspend accounting if free space drops below 2%; resume it 5162306a36Sopenharmony_ciif it increases to at least 4%; consider information about amount of 5262306a36Sopenharmony_cifree space valid for 30 seconds. 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ciacpi_video_flags 5662306a36Sopenharmony_ci================ 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ciSee Documentation/power/video.rst. This allows the video resume mode to be set, 5962306a36Sopenharmony_ciin a similar fashion to the ``acpi_sleep`` kernel parameter, by 6062306a36Sopenharmony_cicombining the following values: 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci= ======= 6362306a36Sopenharmony_ci1 s3_bios 6462306a36Sopenharmony_ci2 s3_mode 6562306a36Sopenharmony_ci4 s3_beep 6662306a36Sopenharmony_ci= ======= 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ciarch 6962306a36Sopenharmony_ci==== 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ciThe machine hardware name, the same output as ``uname -m`` 7262306a36Sopenharmony_ci(e.g. ``x86_64`` or ``aarch64``). 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ciauto_msgmni 7562306a36Sopenharmony_ci=========== 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ciThis variable has no effect and may be removed in future kernel 7862306a36Sopenharmony_cireleases. Reading it always returns 0. 7962306a36Sopenharmony_ciUp to Linux 3.17, it enabled/disabled automatic recomputing of 8062306a36Sopenharmony_ci`msgmni`_ 8162306a36Sopenharmony_ciupon memory add/remove or upon IPC namespace creation/removal. 8262306a36Sopenharmony_ciEchoing "1" into this file enabled msgmni automatic recomputing. 8362306a36Sopenharmony_ciEchoing "0" turned it off. The default value was 1. 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_cibootloader_type (x86 only) 8762306a36Sopenharmony_ci========================== 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ciThis gives the bootloader type number as indicated by the bootloader, 9062306a36Sopenharmony_cishifted left by 4, and OR'd with the low four bits of the bootloader 9162306a36Sopenharmony_civersion. The reason for this encoding is that this used to match the 9262306a36Sopenharmony_ci``type_of_loader`` field in the kernel header; the encoding is kept for 9362306a36Sopenharmony_cibackwards compatibility. That is, if the full bootloader type number 9462306a36Sopenharmony_ciis 0x15 and the full version number is 0x234, this file will contain 9562306a36Sopenharmony_cithe value 340 = 0x154. 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ciSee the ``type_of_loader`` and ``ext_loader_type`` fields in 9862306a36Sopenharmony_ciDocumentation/arch/x86/boot.rst for additional information. 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_cibootloader_version (x86 only) 10262306a36Sopenharmony_ci============================= 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ciThe complete bootloader version number. In the example above, this 10562306a36Sopenharmony_cifile will contain the value 564 = 0x234. 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ciSee the ``type_of_loader`` and ``ext_loader_ver`` fields in 10862306a36Sopenharmony_ciDocumentation/arch/x86/boot.rst for additional information. 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_cibpf_stats_enabled 11262306a36Sopenharmony_ci================= 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ciControls whether the kernel should collect statistics on BPF programs 11562306a36Sopenharmony_ci(total time spent running, number of times run...). Enabling 11662306a36Sopenharmony_cistatistics causes a slight reduction in performance on each program 11762306a36Sopenharmony_cirun. The statistics can be seen using ``bpftool``. 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci= =================================== 12062306a36Sopenharmony_ci0 Don't collect statistics (default). 12162306a36Sopenharmony_ci1 Collect statistics. 12262306a36Sopenharmony_ci= =================================== 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_cicad_pid 12662306a36Sopenharmony_ci======= 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ciThis is the pid which will be signalled on reboot (notably, by 12962306a36Sopenharmony_ciCtrl-Alt-Delete). Writing a value to this file which doesn't 13062306a36Sopenharmony_cicorrespond to a running process will result in ``-ESRCH``. 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ciSee also `ctrl-alt-del`_. 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_cicap_last_cap 13662306a36Sopenharmony_ci============ 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ciHighest valid capability of the running kernel. Exports 13962306a36Sopenharmony_ci``CAP_LAST_CAP`` from the kernel. 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci.. _core_pattern: 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_cicore_pattern 14562306a36Sopenharmony_ci============ 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci``core_pattern`` is used to specify a core dumpfile pattern name. 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci* max length 127 characters; default value is "core" 15062306a36Sopenharmony_ci* ``core_pattern`` is used as a pattern template for the output 15162306a36Sopenharmony_ci filename; certain string patterns (beginning with '%') are 15262306a36Sopenharmony_ci substituted with their actual values. 15362306a36Sopenharmony_ci* backward compatibility with ``core_uses_pid``: 15462306a36Sopenharmony_ci 15562306a36Sopenharmony_ci If ``core_pattern`` does not include "%p" (default does not) 15662306a36Sopenharmony_ci and ``core_uses_pid`` is set, then .PID will be appended to 15762306a36Sopenharmony_ci the filename. 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_ci* corename format specifiers 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci ======== ========================================== 16262306a36Sopenharmony_ci %<NUL> '%' is dropped 16362306a36Sopenharmony_ci %% output one '%' 16462306a36Sopenharmony_ci %p pid 16562306a36Sopenharmony_ci %P global pid (init PID namespace) 16662306a36Sopenharmony_ci %i tid 16762306a36Sopenharmony_ci %I global tid (init PID namespace) 16862306a36Sopenharmony_ci %u uid (in initial user namespace) 16962306a36Sopenharmony_ci %g gid (in initial user namespace) 17062306a36Sopenharmony_ci %d dump mode, matches ``PR_SET_DUMPABLE`` and 17162306a36Sopenharmony_ci ``/proc/sys/fs/suid_dumpable`` 17262306a36Sopenharmony_ci %s signal number 17362306a36Sopenharmony_ci %t UNIX time of dump 17462306a36Sopenharmony_ci %h hostname 17562306a36Sopenharmony_ci %e executable filename (may be shortened, could be changed by prctl etc) 17662306a36Sopenharmony_ci %f executable filename 17762306a36Sopenharmony_ci %E executable path 17862306a36Sopenharmony_ci %c maximum size of core file by resource limit RLIMIT_CORE 17962306a36Sopenharmony_ci %C CPU the task ran on 18062306a36Sopenharmony_ci %<OTHER> both are dropped 18162306a36Sopenharmony_ci ======== ========================================== 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci* If the first character of the pattern is a '|', the kernel will treat 18462306a36Sopenharmony_ci the rest of the pattern as a command to run. The core dump will be 18562306a36Sopenharmony_ci written to the standard input of that program instead of to a file. 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_cicore_pipe_limit 18962306a36Sopenharmony_ci=============== 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ciThis sysctl is only applicable when `core_pattern`_ is configured to 19262306a36Sopenharmony_cipipe core files to a user space helper (when the first character of 19362306a36Sopenharmony_ci``core_pattern`` is a '|', see above). 19462306a36Sopenharmony_ciWhen collecting cores via a pipe to an application, it is occasionally 19562306a36Sopenharmony_ciuseful for the collecting application to gather data about the 19662306a36Sopenharmony_cicrashing process from its ``/proc/pid`` directory. 19762306a36Sopenharmony_ciIn order to do this safely, the kernel must wait for the collecting 19862306a36Sopenharmony_ciprocess to exit, so as not to remove the crashing processes proc files 19962306a36Sopenharmony_ciprematurely. 20062306a36Sopenharmony_ciThis in turn creates the possibility that a misbehaving userspace 20162306a36Sopenharmony_cicollecting process can block the reaping of a crashed process simply 20262306a36Sopenharmony_ciby never exiting. 20362306a36Sopenharmony_ciThis sysctl defends against that. 20462306a36Sopenharmony_ciIt defines how many concurrent crashing processes may be piped to user 20562306a36Sopenharmony_cispace applications in parallel. 20662306a36Sopenharmony_ciIf this value is exceeded, then those crashing processes above that 20762306a36Sopenharmony_civalue are noted via the kernel log and their cores are skipped. 20862306a36Sopenharmony_ci0 is a special value, indicating that unlimited processes may be 20962306a36Sopenharmony_cicaptured in parallel, but that no waiting will take place (i.e. the 21062306a36Sopenharmony_cicollecting process is not guaranteed access to ``/proc/<crashing 21162306a36Sopenharmony_cipid>/``). 21262306a36Sopenharmony_ciThis value defaults to 0. 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_cicore_uses_pid 21662306a36Sopenharmony_ci============= 21762306a36Sopenharmony_ci 21862306a36Sopenharmony_ciThe default coredump filename is "core". By setting 21962306a36Sopenharmony_ci``core_uses_pid`` to 1, the coredump filename becomes core.PID. 22062306a36Sopenharmony_ciIf `core_pattern`_ does not include "%p" (default does not) 22162306a36Sopenharmony_ciand ``core_uses_pid`` is set, then .PID will be appended to 22262306a36Sopenharmony_cithe filename. 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_cictrl-alt-del 22662306a36Sopenharmony_ci============ 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_ciWhen the value in this file is 0, ctrl-alt-del is trapped and 22962306a36Sopenharmony_cisent to the ``init(1)`` program to handle a graceful restart. 23062306a36Sopenharmony_ciWhen, however, the value is > 0, Linux's reaction to a Vulcan 23162306a36Sopenharmony_ciNerve Pinch (tm) will be an immediate reboot, without even 23262306a36Sopenharmony_cisyncing its dirty buffers. 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ciNote: 23562306a36Sopenharmony_ci when a program (like dosemu) has the keyboard in 'raw' 23662306a36Sopenharmony_ci mode, the ctrl-alt-del is intercepted by the program before it 23762306a36Sopenharmony_ci ever reaches the kernel tty layer, and it's up to the program 23862306a36Sopenharmony_ci to decide what to do with it. 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_cidmesg_restrict 24262306a36Sopenharmony_ci============== 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ciThis toggle indicates whether unprivileged users are prevented 24562306a36Sopenharmony_cifrom using ``dmesg(8)`` to view messages from the kernel's log 24662306a36Sopenharmony_cibuffer. 24762306a36Sopenharmony_ciWhen ``dmesg_restrict`` is set to 0 there are no restrictions. 24862306a36Sopenharmony_ciWhen ``dmesg_restrict`` is set to 1, users must have 24962306a36Sopenharmony_ci``CAP_SYSLOG`` to use ``dmesg(8)``. 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ciThe kernel config option ``CONFIG_SECURITY_DMESG_RESTRICT`` sets the 25262306a36Sopenharmony_cidefault value of ``dmesg_restrict``. 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_cidomainname & hostname 25662306a36Sopenharmony_ci===================== 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ciThese files can be used to set the NIS/YP domainname and the 25962306a36Sopenharmony_cihostname of your box in exactly the same way as the commands 26062306a36Sopenharmony_cidomainname and hostname, i.e.:: 26162306a36Sopenharmony_ci 26262306a36Sopenharmony_ci # echo "darkstar" > /proc/sys/kernel/hostname 26362306a36Sopenharmony_ci # echo "mydomain" > /proc/sys/kernel/domainname 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_cihas the same effect as:: 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci # hostname "darkstar" 26862306a36Sopenharmony_ci # domainname "mydomain" 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_ciNote, however, that the classic darkstar.frop.org has the 27162306a36Sopenharmony_cihostname "darkstar" and DNS (Internet Domain Name Server) 27262306a36Sopenharmony_cidomainname "frop.org", not to be confused with the NIS (Network 27362306a36Sopenharmony_ciInformation Service) or YP (Yellow Pages) domainname. These two 27462306a36Sopenharmony_cidomain names are in general different. For a detailed discussion 27562306a36Sopenharmony_cisee the ``hostname(1)`` man page. 27662306a36Sopenharmony_ci 27762306a36Sopenharmony_ci 27862306a36Sopenharmony_cifirmware_config 27962306a36Sopenharmony_ci=============== 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ciSee Documentation/driver-api/firmware/fallback-mechanisms.rst. 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_ciThe entries in this directory allow the firmware loader helper 28462306a36Sopenharmony_cifallback to be controlled: 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci* ``force_sysfs_fallback``, when set to 1, forces the use of the 28762306a36Sopenharmony_ci fallback; 28862306a36Sopenharmony_ci* ``ignore_sysfs_fallback``, when set to 1, ignores any fallback. 28962306a36Sopenharmony_ci 29062306a36Sopenharmony_ci 29162306a36Sopenharmony_ciftrace_dump_on_oops 29262306a36Sopenharmony_ci=================== 29362306a36Sopenharmony_ci 29462306a36Sopenharmony_ciDetermines whether ``ftrace_dump()`` should be called on an oops (or 29562306a36Sopenharmony_cikernel panic). This will output the contents of the ftrace buffers to 29662306a36Sopenharmony_cithe console. This is very useful for capturing traces that lead to 29762306a36Sopenharmony_cicrashes and outputting them to a serial console. 29862306a36Sopenharmony_ci 29962306a36Sopenharmony_ci= =================================================== 30062306a36Sopenharmony_ci0 Disabled (default). 30162306a36Sopenharmony_ci1 Dump buffers of all CPUs. 30262306a36Sopenharmony_ci2 Dump the buffer of the CPU that triggered the oops. 30362306a36Sopenharmony_ci= =================================================== 30462306a36Sopenharmony_ci 30562306a36Sopenharmony_ci 30662306a36Sopenharmony_ciftrace_enabled, stack_tracer_enabled 30762306a36Sopenharmony_ci==================================== 30862306a36Sopenharmony_ci 30962306a36Sopenharmony_ciSee Documentation/trace/ftrace.rst. 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_cihardlockup_all_cpu_backtrace 31362306a36Sopenharmony_ci============================ 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_ciThis value controls the hard lockup detector behavior when a hard 31662306a36Sopenharmony_cilockup condition is detected as to whether or not to gather further 31762306a36Sopenharmony_cidebug information. If enabled, arch-specific all-CPU stack dumping 31862306a36Sopenharmony_ciwill be initiated. 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ci= ============================================ 32162306a36Sopenharmony_ci0 Do nothing. This is the default behavior. 32262306a36Sopenharmony_ci1 On detection capture more debug information. 32362306a36Sopenharmony_ci= ============================================ 32462306a36Sopenharmony_ci 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_cihardlockup_panic 32762306a36Sopenharmony_ci================ 32862306a36Sopenharmony_ci 32962306a36Sopenharmony_ciThis parameter can be used to control whether the kernel panics 33062306a36Sopenharmony_ciwhen a hard lockup is detected. 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ci= =========================== 33362306a36Sopenharmony_ci0 Don't panic on hard lockup. 33462306a36Sopenharmony_ci1 Panic on hard lockup. 33562306a36Sopenharmony_ci= =========================== 33662306a36Sopenharmony_ci 33762306a36Sopenharmony_ciSee Documentation/admin-guide/lockup-watchdogs.rst for more information. 33862306a36Sopenharmony_ciThis can also be set using the nmi_watchdog kernel parameter. 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_cihotplug 34262306a36Sopenharmony_ci======= 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_ciPath for the hotplug policy agent. 34562306a36Sopenharmony_ciDefault value is ``CONFIG_UEVENT_HELPER_PATH``, which in turn defaults 34662306a36Sopenharmony_cito the empty string. 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_ciThis file only exists when ``CONFIG_UEVENT_HELPER`` is enabled. Most 34962306a36Sopenharmony_cimodern systems rely exclusively on the netlink-based uevent source and 35062306a36Sopenharmony_cidon't need this. 35162306a36Sopenharmony_ci 35262306a36Sopenharmony_ci 35362306a36Sopenharmony_cihung_task_all_cpu_backtrace 35462306a36Sopenharmony_ci=========================== 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ciIf this option is set, the kernel will send an NMI to all CPUs to dump 35762306a36Sopenharmony_citheir backtraces when a hung task is detected. This file shows up if 35862306a36Sopenharmony_ciCONFIG_DETECT_HUNG_TASK and CONFIG_SMP are enabled. 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_ci0: Won't show all CPUs backtraces when a hung task is detected. 36162306a36Sopenharmony_ciThis is the default behavior. 36262306a36Sopenharmony_ci 36362306a36Sopenharmony_ci1: Will non-maskably interrupt all CPUs and dump their backtraces when 36462306a36Sopenharmony_cia hung task is detected. 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_cihung_task_panic 36862306a36Sopenharmony_ci=============== 36962306a36Sopenharmony_ci 37062306a36Sopenharmony_ciControls the kernel's behavior when a hung task is detected. 37162306a36Sopenharmony_ciThis file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled. 37262306a36Sopenharmony_ci 37362306a36Sopenharmony_ci= ================================================= 37462306a36Sopenharmony_ci0 Continue operation. This is the default behavior. 37562306a36Sopenharmony_ci1 Panic immediately. 37662306a36Sopenharmony_ci= ================================================= 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci 37962306a36Sopenharmony_cihung_task_check_count 38062306a36Sopenharmony_ci===================== 38162306a36Sopenharmony_ci 38262306a36Sopenharmony_ciThe upper bound on the number of tasks that are checked. 38362306a36Sopenharmony_ciThis file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled. 38462306a36Sopenharmony_ci 38562306a36Sopenharmony_ci 38662306a36Sopenharmony_cihung_task_timeout_secs 38762306a36Sopenharmony_ci====================== 38862306a36Sopenharmony_ci 38962306a36Sopenharmony_ciWhen a task in D state did not get scheduled 39062306a36Sopenharmony_cifor more than this value report a warning. 39162306a36Sopenharmony_ciThis file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled. 39262306a36Sopenharmony_ci 39362306a36Sopenharmony_ci0 means infinite timeout, no checking is done. 39462306a36Sopenharmony_ci 39562306a36Sopenharmony_ciPossible values to set are in range {0:``LONG_MAX``/``HZ``}. 39662306a36Sopenharmony_ci 39762306a36Sopenharmony_ci 39862306a36Sopenharmony_cihung_task_check_interval_secs 39962306a36Sopenharmony_ci============================= 40062306a36Sopenharmony_ci 40162306a36Sopenharmony_ciHung task check interval. If hung task checking is enabled 40262306a36Sopenharmony_ci(see `hung_task_timeout_secs`_), the check is done every 40362306a36Sopenharmony_ci``hung_task_check_interval_secs`` seconds. 40462306a36Sopenharmony_ciThis file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled. 40562306a36Sopenharmony_ci 40662306a36Sopenharmony_ci0 (default) means use ``hung_task_timeout_secs`` as checking 40762306a36Sopenharmony_ciinterval. 40862306a36Sopenharmony_ci 40962306a36Sopenharmony_ciPossible values to set are in range {0:``LONG_MAX``/``HZ``}. 41062306a36Sopenharmony_ci 41162306a36Sopenharmony_ci 41262306a36Sopenharmony_cihung_task_warnings 41362306a36Sopenharmony_ci================== 41462306a36Sopenharmony_ci 41562306a36Sopenharmony_ciThe maximum number of warnings to report. During a check interval 41662306a36Sopenharmony_ciif a hung task is detected, this value is decreased by 1. 41762306a36Sopenharmony_ciWhen this value reaches 0, no more warnings will be reported. 41862306a36Sopenharmony_ciThis file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled. 41962306a36Sopenharmony_ci 42062306a36Sopenharmony_ci-1: report an infinite number of warnings. 42162306a36Sopenharmony_ci 42262306a36Sopenharmony_ci 42362306a36Sopenharmony_cihyperv_record_panic_msg 42462306a36Sopenharmony_ci======================= 42562306a36Sopenharmony_ci 42662306a36Sopenharmony_ciControls whether the panic kmsg data should be reported to Hyper-V. 42762306a36Sopenharmony_ci 42862306a36Sopenharmony_ci= ========================================================= 42962306a36Sopenharmony_ci0 Do not report panic kmsg data. 43062306a36Sopenharmony_ci1 Report the panic kmsg data. This is the default behavior. 43162306a36Sopenharmony_ci= ========================================================= 43262306a36Sopenharmony_ci 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_ciignore-unaligned-usertrap 43562306a36Sopenharmony_ci========================= 43662306a36Sopenharmony_ci 43762306a36Sopenharmony_ciOn architectures where unaligned accesses cause traps, and where this 43862306a36Sopenharmony_cifeature is supported (``CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN``; 43962306a36Sopenharmony_cicurrently, ``arc``, ``ia64`` and ``loongarch``), controls whether all 44062306a36Sopenharmony_ciunaligned traps are logged. 44162306a36Sopenharmony_ci 44262306a36Sopenharmony_ci= ============================================================= 44362306a36Sopenharmony_ci0 Log all unaligned accesses. 44462306a36Sopenharmony_ci1 Only warn the first time a process traps. This is the default 44562306a36Sopenharmony_ci setting. 44662306a36Sopenharmony_ci= ============================================================= 44762306a36Sopenharmony_ci 44862306a36Sopenharmony_ciSee also `unaligned-trap`_ and `unaligned-dump-stack`_. On ``ia64``, 44962306a36Sopenharmony_cithis allows system administrators to override the 45062306a36Sopenharmony_ci``IA64_THREAD_UAC_NOPRINT`` ``prctl`` and avoid logs being flooded. 45162306a36Sopenharmony_ci 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ciio_uring_disabled 45462306a36Sopenharmony_ci================= 45562306a36Sopenharmony_ci 45662306a36Sopenharmony_ciPrevents all processes from creating new io_uring instances. Enabling this 45762306a36Sopenharmony_cishrinks the kernel's attack surface. 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_ci= ====================================================================== 46062306a36Sopenharmony_ci0 All processes can create io_uring instances as normal. This is the 46162306a36Sopenharmony_ci default setting. 46262306a36Sopenharmony_ci1 io_uring creation is disabled (io_uring_setup() will fail with 46362306a36Sopenharmony_ci -EPERM) for unprivileged processes not in the io_uring_group group. 46462306a36Sopenharmony_ci Existing io_uring instances can still be used. See the 46562306a36Sopenharmony_ci documentation for io_uring_group for more information. 46662306a36Sopenharmony_ci2 io_uring creation is disabled for all processes. io_uring_setup() 46762306a36Sopenharmony_ci always fails with -EPERM. Existing io_uring instances can still be 46862306a36Sopenharmony_ci used. 46962306a36Sopenharmony_ci= ====================================================================== 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ci 47262306a36Sopenharmony_ciio_uring_group 47362306a36Sopenharmony_ci============== 47462306a36Sopenharmony_ci 47562306a36Sopenharmony_ciWhen io_uring_disabled is set to 1, a process must either be 47662306a36Sopenharmony_ciprivileged (CAP_SYS_ADMIN) or be in the io_uring_group group in order 47762306a36Sopenharmony_cito create an io_uring instance. If io_uring_group is set to -1 (the 47862306a36Sopenharmony_cidefault), only processes with the CAP_SYS_ADMIN capability may create 47962306a36Sopenharmony_ciio_uring instances. 48062306a36Sopenharmony_ci 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_cikexec_load_disabled 48362306a36Sopenharmony_ci=================== 48462306a36Sopenharmony_ci 48562306a36Sopenharmony_ciA toggle indicating if the syscalls ``kexec_load`` and 48662306a36Sopenharmony_ci``kexec_file_load`` have been disabled. 48762306a36Sopenharmony_ciThis value defaults to 0 (false: ``kexec_*load`` enabled), but can be 48862306a36Sopenharmony_ciset to 1 (true: ``kexec_*load`` disabled). 48962306a36Sopenharmony_ciOnce true, kexec can no longer be used, and the toggle cannot be set 49062306a36Sopenharmony_ciback to false. 49162306a36Sopenharmony_ciThis allows a kexec image to be loaded before disabling the syscall, 49262306a36Sopenharmony_ciallowing a system to set up (and later use) an image without it being 49362306a36Sopenharmony_cialtered. 49462306a36Sopenharmony_ciGenerally used together with the `modules_disabled`_ sysctl. 49562306a36Sopenharmony_ci 49662306a36Sopenharmony_cikexec_load_limit_panic 49762306a36Sopenharmony_ci====================== 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ciThis parameter specifies a limit to the number of times the syscalls 50062306a36Sopenharmony_ci``kexec_load`` and ``kexec_file_load`` can be called with a crash 50162306a36Sopenharmony_ciimage. It can only be set with a more restrictive value than the 50262306a36Sopenharmony_cicurrent one. 50362306a36Sopenharmony_ci 50462306a36Sopenharmony_ci== ====================================================== 50562306a36Sopenharmony_ci-1 Unlimited calls to kexec. This is the default setting. 50662306a36Sopenharmony_ciN Number of calls left. 50762306a36Sopenharmony_ci== ====================================================== 50862306a36Sopenharmony_ci 50962306a36Sopenharmony_cikexec_load_limit_reboot 51062306a36Sopenharmony_ci======================= 51162306a36Sopenharmony_ci 51262306a36Sopenharmony_ciSimilar functionality as ``kexec_load_limit_panic``, but for a normal 51362306a36Sopenharmony_ciimage. 51462306a36Sopenharmony_ci 51562306a36Sopenharmony_cikptr_restrict 51662306a36Sopenharmony_ci============= 51762306a36Sopenharmony_ci 51862306a36Sopenharmony_ciThis toggle indicates whether restrictions are placed on 51962306a36Sopenharmony_ciexposing kernel addresses via ``/proc`` and other interfaces. 52062306a36Sopenharmony_ci 52162306a36Sopenharmony_ciWhen ``kptr_restrict`` is set to 0 (the default) the address is hashed 52262306a36Sopenharmony_cibefore printing. 52362306a36Sopenharmony_ci(This is the equivalent to %p.) 52462306a36Sopenharmony_ci 52562306a36Sopenharmony_ciWhen ``kptr_restrict`` is set to 1, kernel pointers printed using the 52662306a36Sopenharmony_ci%pK format specifier will be replaced with 0s unless the user has 52762306a36Sopenharmony_ci``CAP_SYSLOG`` and effective user and group ids are equal to the real 52862306a36Sopenharmony_ciids. 52962306a36Sopenharmony_ciThis is because %pK checks are done at read() time rather than open() 53062306a36Sopenharmony_citime, so if permissions are elevated between the open() and the read() 53162306a36Sopenharmony_ci(e.g via a setuid binary) then %pK will not leak kernel pointers to 53262306a36Sopenharmony_ciunprivileged users. 53362306a36Sopenharmony_ciNote, this is a temporary solution only. 53462306a36Sopenharmony_ciThe correct long-term solution is to do the permission checks at 53562306a36Sopenharmony_ciopen() time. 53662306a36Sopenharmony_ciConsider removing world read permissions from files that use %pK, and 53762306a36Sopenharmony_ciusing `dmesg_restrict`_ to protect against uses of %pK in ``dmesg(8)`` 53862306a36Sopenharmony_ciif leaking kernel pointer values to unprivileged users is a concern. 53962306a36Sopenharmony_ci 54062306a36Sopenharmony_ciWhen ``kptr_restrict`` is set to 2, kernel pointers printed using 54162306a36Sopenharmony_ci%pK will be replaced with 0s regardless of privileges. 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci 54462306a36Sopenharmony_cimodprobe 54562306a36Sopenharmony_ci======== 54662306a36Sopenharmony_ci 54762306a36Sopenharmony_ciThe full path to the usermode helper for autoloading kernel modules, 54862306a36Sopenharmony_ciby default ``CONFIG_MODPROBE_PATH``, which in turn defaults to 54962306a36Sopenharmony_ci"/sbin/modprobe". This binary is executed when the kernel requests a 55062306a36Sopenharmony_cimodule. For example, if userspace passes an unknown filesystem type 55162306a36Sopenharmony_cito mount(), then the kernel will automatically request the 55262306a36Sopenharmony_cicorresponding filesystem module by executing this usermode helper. 55362306a36Sopenharmony_ciThis usermode helper should insert the needed module into the kernel. 55462306a36Sopenharmony_ci 55562306a36Sopenharmony_ciThis sysctl only affects module autoloading. It has no effect on the 55662306a36Sopenharmony_ciability to explicitly insert modules. 55762306a36Sopenharmony_ci 55862306a36Sopenharmony_ciThis sysctl can be used to debug module loading requests:: 55962306a36Sopenharmony_ci 56062306a36Sopenharmony_ci echo '#! /bin/sh' > /tmp/modprobe 56162306a36Sopenharmony_ci echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe 56262306a36Sopenharmony_ci echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe 56362306a36Sopenharmony_ci chmod a+x /tmp/modprobe 56462306a36Sopenharmony_ci echo /tmp/modprobe > /proc/sys/kernel/modprobe 56562306a36Sopenharmony_ci 56662306a36Sopenharmony_ciAlternatively, if this sysctl is set to the empty string, then module 56762306a36Sopenharmony_ciautoloading is completely disabled. The kernel will not try to 56862306a36Sopenharmony_ciexecute a usermode helper at all, nor will it call the 56962306a36Sopenharmony_cikernel_module_request LSM hook. 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_ciIf CONFIG_STATIC_USERMODEHELPER=y is set in the kernel configuration, 57262306a36Sopenharmony_cithen the configured static usermode helper overrides this sysctl, 57362306a36Sopenharmony_ciexcept that the empty string is still accepted to completely disable 57462306a36Sopenharmony_cimodule autoloading as described above. 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_cimodules_disabled 57762306a36Sopenharmony_ci================ 57862306a36Sopenharmony_ci 57962306a36Sopenharmony_ciA toggle value indicating if modules are allowed to be loaded 58062306a36Sopenharmony_ciin an otherwise modular kernel. This toggle defaults to off 58162306a36Sopenharmony_ci(0), but can be set true (1). Once true, modules can be 58262306a36Sopenharmony_cineither loaded nor unloaded, and the toggle cannot be set back 58362306a36Sopenharmony_cito false. Generally used with the `kexec_load_disabled`_ toggle. 58462306a36Sopenharmony_ci 58562306a36Sopenharmony_ci 58662306a36Sopenharmony_ci.. _msgmni: 58762306a36Sopenharmony_ci 58862306a36Sopenharmony_cimsgmax, msgmnb, and msgmni 58962306a36Sopenharmony_ci========================== 59062306a36Sopenharmony_ci 59162306a36Sopenharmony_ci``msgmax`` is the maximum size of an IPC message, in bytes. 8192 by 59262306a36Sopenharmony_cidefault (``MSGMAX``). 59362306a36Sopenharmony_ci 59462306a36Sopenharmony_ci``msgmnb`` is the maximum size of an IPC queue, in bytes. 16384 by 59562306a36Sopenharmony_cidefault (``MSGMNB``). 59662306a36Sopenharmony_ci 59762306a36Sopenharmony_ci``msgmni`` is the maximum number of IPC queues. 32000 by default 59862306a36Sopenharmony_ci(``MSGMNI``). 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_cimsg_next_id, sem_next_id, and shm_next_id (System V IPC) 60262306a36Sopenharmony_ci======================================================== 60362306a36Sopenharmony_ci 60462306a36Sopenharmony_ciThese three toggles allows to specify desired id for next allocated IPC 60562306a36Sopenharmony_ciobject: message, semaphore or shared memory respectively. 60662306a36Sopenharmony_ci 60762306a36Sopenharmony_ciBy default they are equal to -1, which means generic allocation logic. 60862306a36Sopenharmony_ciPossible values to set are in range {0:``INT_MAX``}. 60962306a36Sopenharmony_ci 61062306a36Sopenharmony_ciNotes: 61162306a36Sopenharmony_ci 1) kernel doesn't guarantee, that new object will have desired id. So, 61262306a36Sopenharmony_ci it's up to userspace, how to handle an object with "wrong" id. 61362306a36Sopenharmony_ci 2) Toggle with non-default value will be set back to -1 by kernel after 61462306a36Sopenharmony_ci successful IPC object allocation. If an IPC object allocation syscall 61562306a36Sopenharmony_ci fails, it is undefined if the value remains unmodified or is reset to -1. 61662306a36Sopenharmony_ci 61762306a36Sopenharmony_ci 61862306a36Sopenharmony_cingroups_max 61962306a36Sopenharmony_ci=========== 62062306a36Sopenharmony_ci 62162306a36Sopenharmony_ciMaximum number of supplementary groups, _i.e._ the maximum size which 62262306a36Sopenharmony_ci``setgroups`` will accept. Exports ``NGROUPS_MAX`` from the kernel. 62362306a36Sopenharmony_ci 62462306a36Sopenharmony_ci 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_cinmi_watchdog 62762306a36Sopenharmony_ci============ 62862306a36Sopenharmony_ci 62962306a36Sopenharmony_ciThis parameter can be used to control the NMI watchdog 63062306a36Sopenharmony_ci(i.e. the hard lockup detector) on x86 systems. 63162306a36Sopenharmony_ci 63262306a36Sopenharmony_ci= ================================= 63362306a36Sopenharmony_ci0 Disable the hard lockup detector. 63462306a36Sopenharmony_ci1 Enable the hard lockup detector. 63562306a36Sopenharmony_ci= ================================= 63662306a36Sopenharmony_ci 63762306a36Sopenharmony_ciThe hard lockup detector monitors each CPU for its ability to respond to 63862306a36Sopenharmony_citimer interrupts. The mechanism utilizes CPU performance counter registers 63962306a36Sopenharmony_cithat are programmed to generate Non-Maskable Interrupts (NMIs) periodically 64062306a36Sopenharmony_ciwhile a CPU is busy. Hence, the alternative name 'NMI watchdog'. 64162306a36Sopenharmony_ci 64262306a36Sopenharmony_ciThe NMI watchdog is disabled by default if the kernel is running as a guest 64362306a36Sopenharmony_ciin a KVM virtual machine. This default can be overridden by adding:: 64462306a36Sopenharmony_ci 64562306a36Sopenharmony_ci nmi_watchdog=1 64662306a36Sopenharmony_ci 64762306a36Sopenharmony_cito the guest kernel command line (see 64862306a36Sopenharmony_ciDocumentation/admin-guide/kernel-parameters.rst). 64962306a36Sopenharmony_ci 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_cinmi_wd_lpm_factor (PPC only) 65262306a36Sopenharmony_ci============================ 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_ciFactor to apply to the NMI watchdog timeout (only when ``nmi_watchdog`` is 65562306a36Sopenharmony_ciset to 1). This factor represents the percentage added to 65662306a36Sopenharmony_ci``watchdog_thresh`` when calculating the NMI watchdog timeout during an 65762306a36Sopenharmony_ciLPM. The soft lockup timeout is not impacted. 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_ciA value of 0 means no change. The default value is 200 meaning the NMI 66062306a36Sopenharmony_ciwatchdog is set to 30s (based on ``watchdog_thresh`` equal to 10). 66162306a36Sopenharmony_ci 66262306a36Sopenharmony_ci 66362306a36Sopenharmony_cinuma_balancing 66462306a36Sopenharmony_ci============== 66562306a36Sopenharmony_ci 66662306a36Sopenharmony_ciEnables/disables and configures automatic page fault based NUMA memory 66762306a36Sopenharmony_cibalancing. Memory is moved automatically to nodes that access it often. 66862306a36Sopenharmony_ciThe value to set can be the result of ORing the following: 66962306a36Sopenharmony_ci 67062306a36Sopenharmony_ci= ================================= 67162306a36Sopenharmony_ci0 NUMA_BALANCING_DISABLED 67262306a36Sopenharmony_ci1 NUMA_BALANCING_NORMAL 67362306a36Sopenharmony_ci2 NUMA_BALANCING_MEMORY_TIERING 67462306a36Sopenharmony_ci= ================================= 67562306a36Sopenharmony_ci 67662306a36Sopenharmony_ciOr NUMA_BALANCING_NORMAL to optimize page placement among different 67762306a36Sopenharmony_ciNUMA nodes to reduce remote accessing. On NUMA machines, there is a 67862306a36Sopenharmony_ciperformance penalty if remote memory is accessed by a CPU. When this 67962306a36Sopenharmony_cifeature is enabled the kernel samples what task thread is accessing 68062306a36Sopenharmony_cimemory by periodically unmapping pages and later trapping a page 68162306a36Sopenharmony_cifault. At the time of the page fault, it is determined if the data 68262306a36Sopenharmony_cibeing accessed should be migrated to a local memory node. 68362306a36Sopenharmony_ci 68462306a36Sopenharmony_ciThe unmapping of pages and trapping faults incur additional overhead that 68562306a36Sopenharmony_ciideally is offset by improved memory locality but there is no universal 68662306a36Sopenharmony_ciguarantee. If the target workload is already bound to NUMA nodes then this 68762306a36Sopenharmony_cifeature should be disabled. 68862306a36Sopenharmony_ci 68962306a36Sopenharmony_ciOr NUMA_BALANCING_MEMORY_TIERING to optimize page placement among 69062306a36Sopenharmony_cidifferent types of memory (represented as different NUMA nodes) to 69162306a36Sopenharmony_ciplace the hot pages in the fast memory. This is implemented based on 69262306a36Sopenharmony_ciunmapping and page fault too. 69362306a36Sopenharmony_ci 69462306a36Sopenharmony_cinuma_balancing_promote_rate_limit_MBps 69562306a36Sopenharmony_ci====================================== 69662306a36Sopenharmony_ci 69762306a36Sopenharmony_ciToo high promotion/demotion throughput between different memory types 69862306a36Sopenharmony_cimay hurt application latency. This can be used to rate limit the 69962306a36Sopenharmony_cipromotion throughput. The per-node max promotion throughput in MB/s 70062306a36Sopenharmony_ciwill be limited to be no more than the set value. 70162306a36Sopenharmony_ci 70262306a36Sopenharmony_ciA rule of thumb is to set this to less than 1/10 of the PMEM node 70362306a36Sopenharmony_ciwrite bandwidth. 70462306a36Sopenharmony_ci 70562306a36Sopenharmony_cioops_all_cpu_backtrace 70662306a36Sopenharmony_ci====================== 70762306a36Sopenharmony_ci 70862306a36Sopenharmony_ciIf this option is set, the kernel will send an NMI to all CPUs to dump 70962306a36Sopenharmony_citheir backtraces when an oops event occurs. It should be used as a last 71062306a36Sopenharmony_ciresort in case a panic cannot be triggered (to protect VMs running, for 71162306a36Sopenharmony_ciexample) or kdump can't be collected. This file shows up if CONFIG_SMP 71262306a36Sopenharmony_ciis enabled. 71362306a36Sopenharmony_ci 71462306a36Sopenharmony_ci0: Won't show all CPUs backtraces when an oops is detected. 71562306a36Sopenharmony_ciThis is the default behavior. 71662306a36Sopenharmony_ci 71762306a36Sopenharmony_ci1: Will non-maskably interrupt all CPUs and dump their backtraces when 71862306a36Sopenharmony_cian oops event is detected. 71962306a36Sopenharmony_ci 72062306a36Sopenharmony_ci 72162306a36Sopenharmony_cioops_limit 72262306a36Sopenharmony_ci========== 72362306a36Sopenharmony_ci 72462306a36Sopenharmony_ciNumber of kernel oopses after which the kernel should panic when 72562306a36Sopenharmony_ci``panic_on_oops`` is not set. Setting this to 0 disables checking 72662306a36Sopenharmony_cithe count. Setting this to 1 has the same effect as setting 72762306a36Sopenharmony_ci``panic_on_oops=1``. The default value is 10000. 72862306a36Sopenharmony_ci 72962306a36Sopenharmony_ci 73062306a36Sopenharmony_ciosrelease, ostype & version 73162306a36Sopenharmony_ci=========================== 73262306a36Sopenharmony_ci 73362306a36Sopenharmony_ci:: 73462306a36Sopenharmony_ci 73562306a36Sopenharmony_ci # cat osrelease 73662306a36Sopenharmony_ci 2.1.88 73762306a36Sopenharmony_ci # cat ostype 73862306a36Sopenharmony_ci Linux 73962306a36Sopenharmony_ci # cat version 74062306a36Sopenharmony_ci #5 Wed Feb 25 21:49:24 MET 1998 74162306a36Sopenharmony_ci 74262306a36Sopenharmony_ciThe files ``osrelease`` and ``ostype`` should be clear enough. 74362306a36Sopenharmony_ci``version`` 74462306a36Sopenharmony_cineeds a little more clarification however. The '#5' means that 74562306a36Sopenharmony_cithis is the fifth kernel built from this source base and the 74662306a36Sopenharmony_cidate behind it indicates the time the kernel was built. 74762306a36Sopenharmony_ciThe only way to tune these values is to rebuild the kernel :-) 74862306a36Sopenharmony_ci 74962306a36Sopenharmony_ci 75062306a36Sopenharmony_cioverflowgid & overflowuid 75162306a36Sopenharmony_ci========================= 75262306a36Sopenharmony_ci 75362306a36Sopenharmony_ciif your architecture did not always support 32-bit UIDs (i.e. arm, 75462306a36Sopenharmony_cii386, m68k, sh, and sparc32), a fixed UID and GID will be returned to 75562306a36Sopenharmony_ciapplications that use the old 16-bit UID/GID system calls, if the 75662306a36Sopenharmony_ciactual UID or GID would exceed 65535. 75762306a36Sopenharmony_ci 75862306a36Sopenharmony_ciThese sysctls allow you to change the value of the fixed UID and GID. 75962306a36Sopenharmony_ciThe default is 65534. 76062306a36Sopenharmony_ci 76162306a36Sopenharmony_ci 76262306a36Sopenharmony_cipanic 76362306a36Sopenharmony_ci===== 76462306a36Sopenharmony_ci 76562306a36Sopenharmony_ciThe value in this file determines the behaviour of the kernel on a 76662306a36Sopenharmony_cipanic: 76762306a36Sopenharmony_ci 76862306a36Sopenharmony_ci* if zero, the kernel will loop forever; 76962306a36Sopenharmony_ci* if negative, the kernel will reboot immediately; 77062306a36Sopenharmony_ci* if positive, the kernel will reboot after the corresponding number 77162306a36Sopenharmony_ci of seconds. 77262306a36Sopenharmony_ci 77362306a36Sopenharmony_ciWhen you use the software watchdog, the recommended setting is 60. 77462306a36Sopenharmony_ci 77562306a36Sopenharmony_ci 77662306a36Sopenharmony_cipanic_on_io_nmi 77762306a36Sopenharmony_ci=============== 77862306a36Sopenharmony_ci 77962306a36Sopenharmony_ciControls the kernel's behavior when a CPU receives an NMI caused by 78062306a36Sopenharmony_cian IO error. 78162306a36Sopenharmony_ci 78262306a36Sopenharmony_ci= ================================================================== 78362306a36Sopenharmony_ci0 Try to continue operation (default). 78462306a36Sopenharmony_ci1 Panic immediately. The IO error triggered an NMI. This indicates a 78562306a36Sopenharmony_ci serious system condition which could result in IO data corruption. 78662306a36Sopenharmony_ci Rather than continuing, panicking might be a better choice. Some 78762306a36Sopenharmony_ci servers issue this sort of NMI when the dump button is pushed, 78862306a36Sopenharmony_ci and you can use this option to take a crash dump. 78962306a36Sopenharmony_ci= ================================================================== 79062306a36Sopenharmony_ci 79162306a36Sopenharmony_ci 79262306a36Sopenharmony_cipanic_on_oops 79362306a36Sopenharmony_ci============= 79462306a36Sopenharmony_ci 79562306a36Sopenharmony_ciControls the kernel's behaviour when an oops or BUG is encountered. 79662306a36Sopenharmony_ci 79762306a36Sopenharmony_ci= =================================================================== 79862306a36Sopenharmony_ci0 Try to continue operation. 79962306a36Sopenharmony_ci1 Panic immediately. If the `panic` sysctl is also non-zero then the 80062306a36Sopenharmony_ci machine will be rebooted. 80162306a36Sopenharmony_ci= =================================================================== 80262306a36Sopenharmony_ci 80362306a36Sopenharmony_ci 80462306a36Sopenharmony_cipanic_on_stackoverflow 80562306a36Sopenharmony_ci====================== 80662306a36Sopenharmony_ci 80762306a36Sopenharmony_ciControls the kernel's behavior when detecting the overflows of 80862306a36Sopenharmony_cikernel, IRQ and exception stacks except a user stack. 80962306a36Sopenharmony_ciThis file shows up if ``CONFIG_DEBUG_STACKOVERFLOW`` is enabled. 81062306a36Sopenharmony_ci 81162306a36Sopenharmony_ci= ========================== 81262306a36Sopenharmony_ci0 Try to continue operation. 81362306a36Sopenharmony_ci1 Panic immediately. 81462306a36Sopenharmony_ci= ========================== 81562306a36Sopenharmony_ci 81662306a36Sopenharmony_ci 81762306a36Sopenharmony_cipanic_on_unrecovered_nmi 81862306a36Sopenharmony_ci======================== 81962306a36Sopenharmony_ci 82062306a36Sopenharmony_ciThe default Linux behaviour on an NMI of either memory or unknown is 82162306a36Sopenharmony_cito continue operation. For many environments such as scientific 82262306a36Sopenharmony_cicomputing it is preferable that the box is taken out and the error 82362306a36Sopenharmony_cidealt with than an uncorrected parity/ECC error get propagated. 82462306a36Sopenharmony_ci 82562306a36Sopenharmony_ciA small number of systems do generate NMIs for bizarre random reasons 82662306a36Sopenharmony_cisuch as power management so the default is off. That sysctl works like 82762306a36Sopenharmony_cithe existing panic controls already in that directory. 82862306a36Sopenharmony_ci 82962306a36Sopenharmony_ci 83062306a36Sopenharmony_cipanic_on_warn 83162306a36Sopenharmony_ci============= 83262306a36Sopenharmony_ci 83362306a36Sopenharmony_ciCalls panic() in the WARN() path when set to 1. This is useful to avoid 83462306a36Sopenharmony_cia kernel rebuild when attempting to kdump at the location of a WARN(). 83562306a36Sopenharmony_ci 83662306a36Sopenharmony_ci= ================================================ 83762306a36Sopenharmony_ci0 Only WARN(), default behaviour. 83862306a36Sopenharmony_ci1 Call panic() after printing out WARN() location. 83962306a36Sopenharmony_ci= ================================================ 84062306a36Sopenharmony_ci 84162306a36Sopenharmony_ci 84262306a36Sopenharmony_cipanic_print 84362306a36Sopenharmony_ci=========== 84462306a36Sopenharmony_ci 84562306a36Sopenharmony_ciBitmask for printing system info when panic happens. User can chose 84662306a36Sopenharmony_cicombination of the following bits: 84762306a36Sopenharmony_ci 84862306a36Sopenharmony_ci===== ============================================ 84962306a36Sopenharmony_cibit 0 print all tasks info 85062306a36Sopenharmony_cibit 1 print system memory info 85162306a36Sopenharmony_cibit 2 print timer info 85262306a36Sopenharmony_cibit 3 print locks info if ``CONFIG_LOCKDEP`` is on 85362306a36Sopenharmony_cibit 4 print ftrace buffer 85462306a36Sopenharmony_cibit 5 print all printk messages in buffer 85562306a36Sopenharmony_cibit 6 print all CPUs backtrace (if available in the arch) 85662306a36Sopenharmony_ci===== ============================================ 85762306a36Sopenharmony_ci 85862306a36Sopenharmony_ciSo for example to print tasks and memory info on panic, user can:: 85962306a36Sopenharmony_ci 86062306a36Sopenharmony_ci echo 3 > /proc/sys/kernel/panic_print 86162306a36Sopenharmony_ci 86262306a36Sopenharmony_ci 86362306a36Sopenharmony_cipanic_on_rcu_stall 86462306a36Sopenharmony_ci================== 86562306a36Sopenharmony_ci 86662306a36Sopenharmony_ciWhen set to 1, calls panic() after RCU stall detection messages. This 86762306a36Sopenharmony_ciis useful to define the root cause of RCU stalls using a vmcore. 86862306a36Sopenharmony_ci 86962306a36Sopenharmony_ci= ============================================================ 87062306a36Sopenharmony_ci0 Do not panic() when RCU stall takes place, default behavior. 87162306a36Sopenharmony_ci1 panic() after printing RCU stall messages. 87262306a36Sopenharmony_ci= ============================================================ 87362306a36Sopenharmony_ci 87462306a36Sopenharmony_cimax_rcu_stall_to_panic 87562306a36Sopenharmony_ci====================== 87662306a36Sopenharmony_ci 87762306a36Sopenharmony_ciWhen ``panic_on_rcu_stall`` is set to 1, this value determines the 87862306a36Sopenharmony_cinumber of times that RCU can stall before panic() is called. 87962306a36Sopenharmony_ci 88062306a36Sopenharmony_ciWhen ``panic_on_rcu_stall`` is set to 0, this value is has no effect. 88162306a36Sopenharmony_ci 88262306a36Sopenharmony_ciperf_cpu_time_max_percent 88362306a36Sopenharmony_ci========================= 88462306a36Sopenharmony_ci 88562306a36Sopenharmony_ciHints to the kernel how much CPU time it should be allowed to 88662306a36Sopenharmony_ciuse to handle perf sampling events. If the perf subsystem 88762306a36Sopenharmony_ciis informed that its samples are exceeding this limit, it 88862306a36Sopenharmony_ciwill drop its sampling frequency to attempt to reduce its CPU 88962306a36Sopenharmony_ciusage. 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ciSome perf sampling happens in NMIs. If these samples 89262306a36Sopenharmony_ciunexpectedly take too long to execute, the NMIs can become 89362306a36Sopenharmony_cistacked up next to each other so much that nothing else is 89462306a36Sopenharmony_ciallowed to execute. 89562306a36Sopenharmony_ci 89662306a36Sopenharmony_ci===== ======================================================== 89762306a36Sopenharmony_ci0 Disable the mechanism. Do not monitor or correct perf's 89862306a36Sopenharmony_ci sampling rate no matter how CPU time it takes. 89962306a36Sopenharmony_ci 90062306a36Sopenharmony_ci1-100 Attempt to throttle perf's sample rate to this 90162306a36Sopenharmony_ci percentage of CPU. Note: the kernel calculates an 90262306a36Sopenharmony_ci "expected" length of each sample event. 100 here means 90362306a36Sopenharmony_ci 100% of that expected length. Even if this is set to 90462306a36Sopenharmony_ci 100, you may still see sample throttling if this 90562306a36Sopenharmony_ci length is exceeded. Set to 0 if you truly do not care 90662306a36Sopenharmony_ci how much CPU is consumed. 90762306a36Sopenharmony_ci===== ======================================================== 90862306a36Sopenharmony_ci 90962306a36Sopenharmony_ci 91062306a36Sopenharmony_ciperf_event_paranoid 91162306a36Sopenharmony_ci=================== 91262306a36Sopenharmony_ci 91362306a36Sopenharmony_ciControls use of the performance events system by unprivileged 91462306a36Sopenharmony_ciusers (without CAP_PERFMON). The default value is 2. 91562306a36Sopenharmony_ci 91662306a36Sopenharmony_ciFor backward compatibility reasons access to system performance 91762306a36Sopenharmony_cimonitoring and observability remains open for CAP_SYS_ADMIN 91862306a36Sopenharmony_ciprivileged processes but CAP_SYS_ADMIN usage for secure system 91962306a36Sopenharmony_ciperformance monitoring and observability operations is discouraged 92062306a36Sopenharmony_ciwith respect to CAP_PERFMON use cases. 92162306a36Sopenharmony_ci 92262306a36Sopenharmony_ci=== ================================================================== 92362306a36Sopenharmony_ci -1 Allow use of (almost) all events by all users. 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_ci Ignore mlock limit after perf_event_mlock_kb without 92662306a36Sopenharmony_ci ``CAP_IPC_LOCK``. 92762306a36Sopenharmony_ci 92862306a36Sopenharmony_ci>=0 Disallow ftrace function tracepoint by users without 92962306a36Sopenharmony_ci ``CAP_PERFMON``. 93062306a36Sopenharmony_ci 93162306a36Sopenharmony_ci Disallow raw tracepoint access by users without ``CAP_PERFMON``. 93262306a36Sopenharmony_ci 93362306a36Sopenharmony_ci>=1 Disallow CPU event access by users without ``CAP_PERFMON``. 93462306a36Sopenharmony_ci 93562306a36Sopenharmony_ci>=2 Disallow kernel profiling by users without ``CAP_PERFMON``. 93662306a36Sopenharmony_ci=== ================================================================== 93762306a36Sopenharmony_ci 93862306a36Sopenharmony_ci 93962306a36Sopenharmony_ciperf_event_max_stack 94062306a36Sopenharmony_ci==================== 94162306a36Sopenharmony_ci 94262306a36Sopenharmony_ciControls maximum number of stack frames to copy for (``attr.sample_type & 94362306a36Sopenharmony_ciPERF_SAMPLE_CALLCHAIN``) configured events, for instance, when using 94462306a36Sopenharmony_ci'``perf record -g``' or '``perf trace --call-graph fp``'. 94562306a36Sopenharmony_ci 94662306a36Sopenharmony_ciThis can only be done when no events are in use that have callchains 94762306a36Sopenharmony_cienabled, otherwise writing to this file will return ``-EBUSY``. 94862306a36Sopenharmony_ci 94962306a36Sopenharmony_ciThe default value is 127. 95062306a36Sopenharmony_ci 95162306a36Sopenharmony_ci 95262306a36Sopenharmony_ciperf_event_mlock_kb 95362306a36Sopenharmony_ci=================== 95462306a36Sopenharmony_ci 95562306a36Sopenharmony_ciControl size of per-cpu ring buffer not counted against mlock limit. 95662306a36Sopenharmony_ci 95762306a36Sopenharmony_ciThe default value is 512 + 1 page 95862306a36Sopenharmony_ci 95962306a36Sopenharmony_ci 96062306a36Sopenharmony_ciperf_event_max_contexts_per_stack 96162306a36Sopenharmony_ci================================= 96262306a36Sopenharmony_ci 96362306a36Sopenharmony_ciControls maximum number of stack frame context entries for 96462306a36Sopenharmony_ci(``attr.sample_type & PERF_SAMPLE_CALLCHAIN``) configured events, for 96562306a36Sopenharmony_ciinstance, when using '``perf record -g``' or '``perf trace --call-graph fp``'. 96662306a36Sopenharmony_ci 96762306a36Sopenharmony_ciThis can only be done when no events are in use that have callchains 96862306a36Sopenharmony_cienabled, otherwise writing to this file will return ``-EBUSY``. 96962306a36Sopenharmony_ci 97062306a36Sopenharmony_ciThe default value is 8. 97162306a36Sopenharmony_ci 97262306a36Sopenharmony_ci 97362306a36Sopenharmony_ciperf_user_access (arm64 and riscv only) 97462306a36Sopenharmony_ci======================================= 97562306a36Sopenharmony_ci 97662306a36Sopenharmony_ciControls user space access for reading perf event counters. 97762306a36Sopenharmony_ci 97862306a36Sopenharmony_ciarm64 97962306a36Sopenharmony_ci===== 98062306a36Sopenharmony_ci 98162306a36Sopenharmony_ciThe default value is 0 (access disabled). 98262306a36Sopenharmony_ci 98362306a36Sopenharmony_ciWhen set to 1, user space can read performance monitor counter registers 98462306a36Sopenharmony_cidirectly. 98562306a36Sopenharmony_ci 98662306a36Sopenharmony_ciSee Documentation/arch/arm64/perf.rst for more information. 98762306a36Sopenharmony_ci 98862306a36Sopenharmony_ciriscv 98962306a36Sopenharmony_ci===== 99062306a36Sopenharmony_ci 99162306a36Sopenharmony_ciWhen set to 0, user space access is disabled. 99262306a36Sopenharmony_ci 99362306a36Sopenharmony_ciThe default value is 1, user space can read performance monitor counter 99462306a36Sopenharmony_ciregisters through perf, any direct access without perf intervention will trigger 99562306a36Sopenharmony_cian illegal instruction. 99662306a36Sopenharmony_ci 99762306a36Sopenharmony_ciWhen set to 2, which enables legacy mode (user space has direct access to cycle 99862306a36Sopenharmony_ciand insret CSRs only). Note that this legacy value is deprecated and will be 99962306a36Sopenharmony_ciremoved once all user space applications are fixed. 100062306a36Sopenharmony_ci 100162306a36Sopenharmony_ciNote that the time CSR is always directly accessible to all modes. 100262306a36Sopenharmony_ci 100362306a36Sopenharmony_cipid_max 100462306a36Sopenharmony_ci======= 100562306a36Sopenharmony_ci 100662306a36Sopenharmony_ciPID allocation wrap value. When the kernel's next PID value 100762306a36Sopenharmony_cireaches this value, it wraps back to a minimum PID value. 100862306a36Sopenharmony_ciPIDs of value ``pid_max`` or larger are not allocated. 100962306a36Sopenharmony_ci 101062306a36Sopenharmony_ci 101162306a36Sopenharmony_cins_last_pid 101262306a36Sopenharmony_ci=========== 101362306a36Sopenharmony_ci 101462306a36Sopenharmony_ciThe last pid allocated in the current (the one task using this sysctl 101562306a36Sopenharmony_cilives in) pid namespace. When selecting a pid for a next task on fork 101662306a36Sopenharmony_cikernel tries to allocate a number starting from this one. 101762306a36Sopenharmony_ci 101862306a36Sopenharmony_ci 101962306a36Sopenharmony_cipowersave-nap (PPC only) 102062306a36Sopenharmony_ci======================== 102162306a36Sopenharmony_ci 102262306a36Sopenharmony_ciIf set, Linux-PPC will use the 'nap' mode of powersaving, 102362306a36Sopenharmony_ciotherwise the 'doze' mode will be used. 102462306a36Sopenharmony_ci 102562306a36Sopenharmony_ci 102662306a36Sopenharmony_ci============================================================== 102762306a36Sopenharmony_ci 102862306a36Sopenharmony_ciprintk 102962306a36Sopenharmony_ci====== 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_ciThe four values in printk denote: ``console_loglevel``, 103262306a36Sopenharmony_ci``default_message_loglevel``, ``minimum_console_loglevel`` and 103362306a36Sopenharmony_ci``default_console_loglevel`` respectively. 103462306a36Sopenharmony_ci 103562306a36Sopenharmony_ciThese values influence printk() behavior when printing or 103662306a36Sopenharmony_cilogging error messages. See '``man 2 syslog``' for more info on 103762306a36Sopenharmony_cithe different loglevels. 103862306a36Sopenharmony_ci 103962306a36Sopenharmony_ci======================== ===================================== 104062306a36Sopenharmony_ciconsole_loglevel messages with a higher priority than 104162306a36Sopenharmony_ci this will be printed to the console 104262306a36Sopenharmony_cidefault_message_loglevel messages without an explicit priority 104362306a36Sopenharmony_ci will be printed with this priority 104462306a36Sopenharmony_ciminimum_console_loglevel minimum (highest) value to which 104562306a36Sopenharmony_ci console_loglevel can be set 104662306a36Sopenharmony_cidefault_console_loglevel default value for console_loglevel 104762306a36Sopenharmony_ci======================== ===================================== 104862306a36Sopenharmony_ci 104962306a36Sopenharmony_ci 105062306a36Sopenharmony_ciprintk_delay 105162306a36Sopenharmony_ci============ 105262306a36Sopenharmony_ci 105362306a36Sopenharmony_ciDelay each printk message in ``printk_delay`` milliseconds 105462306a36Sopenharmony_ci 105562306a36Sopenharmony_ciValue from 0 - 10000 is allowed. 105662306a36Sopenharmony_ci 105762306a36Sopenharmony_ci 105862306a36Sopenharmony_ciprintk_ratelimit 105962306a36Sopenharmony_ci================ 106062306a36Sopenharmony_ci 106162306a36Sopenharmony_ciSome warning messages are rate limited. ``printk_ratelimit`` specifies 106262306a36Sopenharmony_cithe minimum length of time between these messages (in seconds). 106362306a36Sopenharmony_ciThe default value is 5 seconds. 106462306a36Sopenharmony_ci 106562306a36Sopenharmony_ciA value of 0 will disable rate limiting. 106662306a36Sopenharmony_ci 106762306a36Sopenharmony_ci 106862306a36Sopenharmony_ciprintk_ratelimit_burst 106962306a36Sopenharmony_ci====================== 107062306a36Sopenharmony_ci 107162306a36Sopenharmony_ciWhile long term we enforce one message per `printk_ratelimit`_ 107262306a36Sopenharmony_ciseconds, we do allow a burst of messages to pass through. 107362306a36Sopenharmony_ci``printk_ratelimit_burst`` specifies the number of messages we can 107462306a36Sopenharmony_cisend before ratelimiting kicks in. 107562306a36Sopenharmony_ci 107662306a36Sopenharmony_ciThe default value is 10 messages. 107762306a36Sopenharmony_ci 107862306a36Sopenharmony_ci 107962306a36Sopenharmony_ciprintk_devkmsg 108062306a36Sopenharmony_ci============== 108162306a36Sopenharmony_ci 108262306a36Sopenharmony_ciControl the logging to ``/dev/kmsg`` from userspace: 108362306a36Sopenharmony_ci 108462306a36Sopenharmony_ci========= ============================================= 108562306a36Sopenharmony_ciratelimit default, ratelimited 108662306a36Sopenharmony_cion unlimited logging to /dev/kmsg from userspace 108762306a36Sopenharmony_cioff logging to /dev/kmsg disabled 108862306a36Sopenharmony_ci========= ============================================= 108962306a36Sopenharmony_ci 109062306a36Sopenharmony_ciThe kernel command line parameter ``printk.devkmsg=`` overrides this and is 109162306a36Sopenharmony_cia one-time setting until next reboot: once set, it cannot be changed by 109262306a36Sopenharmony_cithis sysctl interface anymore. 109362306a36Sopenharmony_ci 109462306a36Sopenharmony_ci============================================================== 109562306a36Sopenharmony_ci 109662306a36Sopenharmony_ci 109762306a36Sopenharmony_cipty 109862306a36Sopenharmony_ci=== 109962306a36Sopenharmony_ci 110062306a36Sopenharmony_ciSee Documentation/filesystems/devpts.rst. 110162306a36Sopenharmony_ci 110262306a36Sopenharmony_ci 110362306a36Sopenharmony_cirandom 110462306a36Sopenharmony_ci====== 110562306a36Sopenharmony_ci 110662306a36Sopenharmony_ciThis is a directory, with the following entries: 110762306a36Sopenharmony_ci 110862306a36Sopenharmony_ci* ``boot_id``: a UUID generated the first time this is retrieved, and 110962306a36Sopenharmony_ci unvarying after that; 111062306a36Sopenharmony_ci 111162306a36Sopenharmony_ci* ``uuid``: a UUID generated every time this is retrieved (this can 111262306a36Sopenharmony_ci thus be used to generate UUIDs at will); 111362306a36Sopenharmony_ci 111462306a36Sopenharmony_ci* ``entropy_avail``: the pool's entropy count, in bits; 111562306a36Sopenharmony_ci 111662306a36Sopenharmony_ci* ``poolsize``: the entropy pool size, in bits; 111762306a36Sopenharmony_ci 111862306a36Sopenharmony_ci* ``urandom_min_reseed_secs``: obsolete (used to determine the minimum 111962306a36Sopenharmony_ci number of seconds between urandom pool reseeding). This file is 112062306a36Sopenharmony_ci writable for compatibility purposes, but writing to it has no effect 112162306a36Sopenharmony_ci on any RNG behavior; 112262306a36Sopenharmony_ci 112362306a36Sopenharmony_ci* ``write_wakeup_threshold``: when the entropy count drops below this 112462306a36Sopenharmony_ci (as a number of bits), processes waiting to write to ``/dev/random`` 112562306a36Sopenharmony_ci are woken up. This file is writable for compatibility purposes, but 112662306a36Sopenharmony_ci writing to it has no effect on any RNG behavior. 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_ci 112962306a36Sopenharmony_cirandomize_va_space 113062306a36Sopenharmony_ci================== 113162306a36Sopenharmony_ci 113262306a36Sopenharmony_ciThis option can be used to select the type of process address 113362306a36Sopenharmony_cispace randomization that is used in the system, for architectures 113462306a36Sopenharmony_cithat support this feature. 113562306a36Sopenharmony_ci 113662306a36Sopenharmony_ci== =========================================================================== 113762306a36Sopenharmony_ci0 Turn the process address space randomization off. This is the 113862306a36Sopenharmony_ci default for architectures that do not support this feature anyways, 113962306a36Sopenharmony_ci and kernels that are booted with the "norandmaps" parameter. 114062306a36Sopenharmony_ci 114162306a36Sopenharmony_ci1 Make the addresses of mmap base, stack and VDSO page randomized. 114262306a36Sopenharmony_ci This, among other things, implies that shared libraries will be 114362306a36Sopenharmony_ci loaded to random addresses. Also for PIE-linked binaries, the 114462306a36Sopenharmony_ci location of code start is randomized. This is the default if the 114562306a36Sopenharmony_ci ``CONFIG_COMPAT_BRK`` option is enabled. 114662306a36Sopenharmony_ci 114762306a36Sopenharmony_ci2 Additionally enable heap randomization. This is the default if 114862306a36Sopenharmony_ci ``CONFIG_COMPAT_BRK`` is disabled. 114962306a36Sopenharmony_ci 115062306a36Sopenharmony_ci There are a few legacy applications out there (such as some ancient 115162306a36Sopenharmony_ci versions of libc.so.5 from 1996) that assume that brk area starts 115262306a36Sopenharmony_ci just after the end of the code+bss. These applications break when 115362306a36Sopenharmony_ci start of the brk area is randomized. There are however no known 115462306a36Sopenharmony_ci non-legacy applications that would be broken this way, so for most 115562306a36Sopenharmony_ci systems it is safe to choose full randomization. 115662306a36Sopenharmony_ci 115762306a36Sopenharmony_ci Systems with ancient and/or broken binaries should be configured 115862306a36Sopenharmony_ci with ``CONFIG_COMPAT_BRK`` enabled, which excludes the heap from process 115962306a36Sopenharmony_ci address space randomization. 116062306a36Sopenharmony_ci== =========================================================================== 116162306a36Sopenharmony_ci 116262306a36Sopenharmony_ci 116362306a36Sopenharmony_cireal-root-dev 116462306a36Sopenharmony_ci============= 116562306a36Sopenharmony_ci 116662306a36Sopenharmony_ciSee Documentation/admin-guide/initrd.rst. 116762306a36Sopenharmony_ci 116862306a36Sopenharmony_ci 116962306a36Sopenharmony_cireboot-cmd (SPARC only) 117062306a36Sopenharmony_ci======================= 117162306a36Sopenharmony_ci 117262306a36Sopenharmony_ci??? This seems to be a way to give an argument to the Sparc 117362306a36Sopenharmony_ciROM/Flash boot loader. Maybe to tell it what to do after 117462306a36Sopenharmony_cirebooting. ??? 117562306a36Sopenharmony_ci 117662306a36Sopenharmony_ci 117762306a36Sopenharmony_cisched_energy_aware 117862306a36Sopenharmony_ci================== 117962306a36Sopenharmony_ci 118062306a36Sopenharmony_ciEnables/disables Energy Aware Scheduling (EAS). EAS starts 118162306a36Sopenharmony_ciautomatically on platforms where it can run (that is, 118262306a36Sopenharmony_ciplatforms with asymmetric CPU topologies and having an Energy 118362306a36Sopenharmony_ciModel available). If your platform happens to meet the 118462306a36Sopenharmony_cirequirements for EAS but you do not want to use it, change 118562306a36Sopenharmony_cithis value to 0. 118662306a36Sopenharmony_ci 118762306a36Sopenharmony_citask_delayacct 118862306a36Sopenharmony_ci=============== 118962306a36Sopenharmony_ci 119062306a36Sopenharmony_ciEnables/disables task delay accounting (see 119162306a36Sopenharmony_ciDocumentation/accounting/delay-accounting.rst. Enabling this feature incurs 119262306a36Sopenharmony_cia small amount of overhead in the scheduler but is useful for debugging 119362306a36Sopenharmony_ciand performance tuning. It is required by some tools such as iotop. 119462306a36Sopenharmony_ci 119562306a36Sopenharmony_cisched_schedstats 119662306a36Sopenharmony_ci================ 119762306a36Sopenharmony_ci 119862306a36Sopenharmony_ciEnables/disables scheduler statistics. Enabling this feature 119962306a36Sopenharmony_ciincurs a small amount of overhead in the scheduler but is 120062306a36Sopenharmony_ciuseful for debugging and performance tuning. 120162306a36Sopenharmony_ci 120262306a36Sopenharmony_cisched_util_clamp_min 120362306a36Sopenharmony_ci==================== 120462306a36Sopenharmony_ci 120562306a36Sopenharmony_ciMax allowed *minimum* utilization. 120662306a36Sopenharmony_ci 120762306a36Sopenharmony_ciDefault value is 1024, which is the maximum possible value. 120862306a36Sopenharmony_ci 120962306a36Sopenharmony_ciIt means that any requested uclamp.min value cannot be greater than 121062306a36Sopenharmony_cisched_util_clamp_min, i.e., it is restricted to the range 121162306a36Sopenharmony_ci[0:sched_util_clamp_min]. 121262306a36Sopenharmony_ci 121362306a36Sopenharmony_cisched_util_clamp_max 121462306a36Sopenharmony_ci==================== 121562306a36Sopenharmony_ci 121662306a36Sopenharmony_ciMax allowed *maximum* utilization. 121762306a36Sopenharmony_ci 121862306a36Sopenharmony_ciDefault value is 1024, which is the maximum possible value. 121962306a36Sopenharmony_ci 122062306a36Sopenharmony_ciIt means that any requested uclamp.max value cannot be greater than 122162306a36Sopenharmony_cisched_util_clamp_max, i.e., it is restricted to the range 122262306a36Sopenharmony_ci[0:sched_util_clamp_max]. 122362306a36Sopenharmony_ci 122462306a36Sopenharmony_cisched_util_clamp_min_rt_default 122562306a36Sopenharmony_ci=============================== 122662306a36Sopenharmony_ci 122762306a36Sopenharmony_ciBy default Linux is tuned for performance. Which means that RT tasks always run 122862306a36Sopenharmony_ciat the highest frequency and most capable (highest capacity) CPU (in 122962306a36Sopenharmony_ciheterogeneous systems). 123062306a36Sopenharmony_ci 123162306a36Sopenharmony_ciUclamp achieves this by setting the requested uclamp.min of all RT tasks to 123262306a36Sopenharmony_ci1024 by default, which effectively boosts the tasks to run at the highest 123362306a36Sopenharmony_cifrequency and biases them to run on the biggest CPU. 123462306a36Sopenharmony_ci 123562306a36Sopenharmony_ciThis knob allows admins to change the default behavior when uclamp is being 123662306a36Sopenharmony_ciused. In battery powered devices particularly, running at the maximum 123762306a36Sopenharmony_cicapacity and frequency will increase energy consumption and shorten the battery 123862306a36Sopenharmony_cilife. 123962306a36Sopenharmony_ci 124062306a36Sopenharmony_ciThis knob is only effective for RT tasks which the user hasn't modified their 124162306a36Sopenharmony_cirequested uclamp.min value via sched_setattr() syscall. 124262306a36Sopenharmony_ci 124362306a36Sopenharmony_ciThis knob will not escape the range constraint imposed by sched_util_clamp_min 124462306a36Sopenharmony_cidefined above. 124562306a36Sopenharmony_ci 124662306a36Sopenharmony_ciFor example if 124762306a36Sopenharmony_ci 124862306a36Sopenharmony_ci sched_util_clamp_min_rt_default = 800 124962306a36Sopenharmony_ci sched_util_clamp_min = 600 125062306a36Sopenharmony_ci 125162306a36Sopenharmony_ciThen the boost will be clamped to 600 because 800 is outside of the permissible 125262306a36Sopenharmony_cirange of [0:600]. This could happen for instance if a powersave mode will 125362306a36Sopenharmony_cirestrict all boosts temporarily by modifying sched_util_clamp_min. As soon as 125462306a36Sopenharmony_cithis restriction is lifted, the requested sched_util_clamp_min_rt_default 125562306a36Sopenharmony_ciwill take effect. 125662306a36Sopenharmony_ci 125762306a36Sopenharmony_ciseccomp 125862306a36Sopenharmony_ci======= 125962306a36Sopenharmony_ci 126062306a36Sopenharmony_ciSee Documentation/userspace-api/seccomp_filter.rst. 126162306a36Sopenharmony_ci 126262306a36Sopenharmony_ci 126362306a36Sopenharmony_cisg-big-buff 126462306a36Sopenharmony_ci=========== 126562306a36Sopenharmony_ci 126662306a36Sopenharmony_ciThis file shows the size of the generic SCSI (sg) buffer. 126762306a36Sopenharmony_ciYou can't tune it just yet, but you could change it on 126862306a36Sopenharmony_cicompile time by editing ``include/scsi/sg.h`` and changing 126962306a36Sopenharmony_cithe value of ``SG_BIG_BUFF``. 127062306a36Sopenharmony_ci 127162306a36Sopenharmony_ciThere shouldn't be any reason to change this value. If 127262306a36Sopenharmony_ciyou can come up with one, you probably know what you 127362306a36Sopenharmony_ciare doing anyway :) 127462306a36Sopenharmony_ci 127562306a36Sopenharmony_ci 127662306a36Sopenharmony_cishmall 127762306a36Sopenharmony_ci====== 127862306a36Sopenharmony_ci 127962306a36Sopenharmony_ciThis parameter sets the total amount of shared memory pages that 128062306a36Sopenharmony_cican be used system wide. Hence, ``shmall`` should always be at least 128162306a36Sopenharmony_ci``ceil(shmmax/PAGE_SIZE)``. 128262306a36Sopenharmony_ci 128362306a36Sopenharmony_ciIf you are not sure what the default ``PAGE_SIZE`` is on your Linux 128462306a36Sopenharmony_cisystem, you can run the following command:: 128562306a36Sopenharmony_ci 128662306a36Sopenharmony_ci # getconf PAGE_SIZE 128762306a36Sopenharmony_ci 128862306a36Sopenharmony_ci 128962306a36Sopenharmony_cishmmax 129062306a36Sopenharmony_ci====== 129162306a36Sopenharmony_ci 129262306a36Sopenharmony_ciThis value can be used to query and set the run time limit 129362306a36Sopenharmony_cion the maximum shared memory segment size that can be created. 129462306a36Sopenharmony_ciShared memory segments up to 1Gb are now supported in the 129562306a36Sopenharmony_cikernel. This value defaults to ``SHMMAX``. 129662306a36Sopenharmony_ci 129762306a36Sopenharmony_ci 129862306a36Sopenharmony_cishmmni 129962306a36Sopenharmony_ci====== 130062306a36Sopenharmony_ci 130162306a36Sopenharmony_ciThis value determines the maximum number of shared memory segments. 130262306a36Sopenharmony_ci4096 by default (``SHMMNI``). 130362306a36Sopenharmony_ci 130462306a36Sopenharmony_ci 130562306a36Sopenharmony_cishm_rmid_forced 130662306a36Sopenharmony_ci=============== 130762306a36Sopenharmony_ci 130862306a36Sopenharmony_ciLinux lets you set resource limits, including how much memory one 130962306a36Sopenharmony_ciprocess can consume, via ``setrlimit(2)``. Unfortunately, shared memory 131062306a36Sopenharmony_cisegments are allowed to exist without association with any process, and 131162306a36Sopenharmony_cithus might not be counted against any resource limits. If enabled, 131262306a36Sopenharmony_cishared memory segments are automatically destroyed when their attach 131362306a36Sopenharmony_cicount becomes zero after a detach or a process termination. It will 131462306a36Sopenharmony_cialso destroy segments that were created, but never attached to, on exit 131562306a36Sopenharmony_cifrom the process. The only use left for ``IPC_RMID`` is to immediately 131662306a36Sopenharmony_cidestroy an unattached segment. Of course, this breaks the way things are 131762306a36Sopenharmony_cidefined, so some applications might stop working. Note that this 131862306a36Sopenharmony_cifeature will do you no good unless you also configure your resource 131962306a36Sopenharmony_cilimits (in particular, ``RLIMIT_AS`` and ``RLIMIT_NPROC``). Most systems don't 132062306a36Sopenharmony_cineed this. 132162306a36Sopenharmony_ci 132262306a36Sopenharmony_ciNote that if you change this from 0 to 1, already created segments 132362306a36Sopenharmony_ciwithout users and with a dead originative process will be destroyed. 132462306a36Sopenharmony_ci 132562306a36Sopenharmony_ci 132662306a36Sopenharmony_cisysctl_writes_strict 132762306a36Sopenharmony_ci==================== 132862306a36Sopenharmony_ci 132962306a36Sopenharmony_ciControl how file position affects the behavior of updating sysctl values 133062306a36Sopenharmony_civia the ``/proc/sys`` interface: 133162306a36Sopenharmony_ci 133262306a36Sopenharmony_ci == ====================================================================== 133362306a36Sopenharmony_ci -1 Legacy per-write sysctl value handling, with no printk warnings. 133462306a36Sopenharmony_ci Each write syscall must fully contain the sysctl value to be 133562306a36Sopenharmony_ci written, and multiple writes on the same sysctl file descriptor 133662306a36Sopenharmony_ci will rewrite the sysctl value, regardless of file position. 133762306a36Sopenharmony_ci 0 Same behavior as above, but warn about processes that perform writes 133862306a36Sopenharmony_ci to a sysctl file descriptor when the file position is not 0. 133962306a36Sopenharmony_ci 1 (default) Respect file position when writing sysctl strings. Multiple 134062306a36Sopenharmony_ci writes will append to the sysctl value buffer. Anything past the max 134162306a36Sopenharmony_ci length of the sysctl value buffer will be ignored. Writes to numeric 134262306a36Sopenharmony_ci sysctl entries must always be at file position 0 and the value must 134362306a36Sopenharmony_ci be fully contained in the buffer sent in the write syscall. 134462306a36Sopenharmony_ci == ====================================================================== 134562306a36Sopenharmony_ci 134662306a36Sopenharmony_ci 134762306a36Sopenharmony_cisoftlockup_all_cpu_backtrace 134862306a36Sopenharmony_ci============================ 134962306a36Sopenharmony_ci 135062306a36Sopenharmony_ciThis value controls the soft lockup detector thread's behavior 135162306a36Sopenharmony_ciwhen a soft lockup condition is detected as to whether or not 135262306a36Sopenharmony_cito gather further debug information. If enabled, each cpu will 135362306a36Sopenharmony_cibe issued an NMI and instructed to capture stack trace. 135462306a36Sopenharmony_ci 135562306a36Sopenharmony_ciThis feature is only applicable for architectures which support 135662306a36Sopenharmony_ciNMI. 135762306a36Sopenharmony_ci 135862306a36Sopenharmony_ci= ============================================ 135962306a36Sopenharmony_ci0 Do nothing. This is the default behavior. 136062306a36Sopenharmony_ci1 On detection capture more debug information. 136162306a36Sopenharmony_ci= ============================================ 136262306a36Sopenharmony_ci 136362306a36Sopenharmony_ci 136462306a36Sopenharmony_cisoftlockup_panic 136562306a36Sopenharmony_ci================= 136662306a36Sopenharmony_ci 136762306a36Sopenharmony_ciThis parameter can be used to control whether the kernel panics 136862306a36Sopenharmony_ciwhen a soft lockup is detected. 136962306a36Sopenharmony_ci 137062306a36Sopenharmony_ci= ============================================ 137162306a36Sopenharmony_ci0 Don't panic on soft lockup. 137262306a36Sopenharmony_ci1 Panic on soft lockup. 137362306a36Sopenharmony_ci= ============================================ 137462306a36Sopenharmony_ci 137562306a36Sopenharmony_ciThis can also be set using the softlockup_panic kernel parameter. 137662306a36Sopenharmony_ci 137762306a36Sopenharmony_ci 137862306a36Sopenharmony_cisoft_watchdog 137962306a36Sopenharmony_ci============= 138062306a36Sopenharmony_ci 138162306a36Sopenharmony_ciThis parameter can be used to control the soft lockup detector. 138262306a36Sopenharmony_ci 138362306a36Sopenharmony_ci= ================================= 138462306a36Sopenharmony_ci0 Disable the soft lockup detector. 138562306a36Sopenharmony_ci1 Enable the soft lockup detector. 138662306a36Sopenharmony_ci= ================================= 138762306a36Sopenharmony_ci 138862306a36Sopenharmony_ciThe soft lockup detector monitors CPUs for threads that are hogging the CPUs 138962306a36Sopenharmony_ciwithout rescheduling voluntarily, and thus prevent the 'migration/N' threads 139062306a36Sopenharmony_cifrom running, causing the watchdog work fail to execute. The mechanism depends 139162306a36Sopenharmony_cion the CPUs ability to respond to timer interrupts which are needed for the 139262306a36Sopenharmony_ciwatchdog work to be queued by the watchdog timer function, otherwise the NMI 139362306a36Sopenharmony_ciwatchdog — if enabled — can detect a hard lockup condition. 139462306a36Sopenharmony_ci 139562306a36Sopenharmony_ci 139662306a36Sopenharmony_cisplit_lock_mitigate (x86 only) 139762306a36Sopenharmony_ci============================== 139862306a36Sopenharmony_ci 139962306a36Sopenharmony_ciOn x86, each "split lock" imposes a system-wide performance penalty. On larger 140062306a36Sopenharmony_cisystems, large numbers of split locks from unprivileged users can result in 140162306a36Sopenharmony_cidenials of service to well-behaved and potentially more important users. 140262306a36Sopenharmony_ci 140362306a36Sopenharmony_ciThe kernel mitigates these bad users by detecting split locks and imposing 140462306a36Sopenharmony_cipenalties: forcing them to wait and only allowing one core to execute split 140562306a36Sopenharmony_cilocks at a time. 140662306a36Sopenharmony_ci 140762306a36Sopenharmony_ciThese mitigations can make those bad applications unbearably slow. Setting 140862306a36Sopenharmony_cisplit_lock_mitigate=0 may restore some application performance, but will also 140962306a36Sopenharmony_ciincrease system exposure to denial of service attacks from split lock users. 141062306a36Sopenharmony_ci 141162306a36Sopenharmony_ci= =================================================================== 141262306a36Sopenharmony_ci0 Disable the mitigation mode - just warns the split lock on kernel log 141362306a36Sopenharmony_ci and exposes the system to denials of service from the split lockers. 141462306a36Sopenharmony_ci1 Enable the mitigation mode (this is the default) - penalizes the split 141562306a36Sopenharmony_ci lockers with intentional performance degradation. 141662306a36Sopenharmony_ci= =================================================================== 141762306a36Sopenharmony_ci 141862306a36Sopenharmony_ci 141962306a36Sopenharmony_cistack_erasing 142062306a36Sopenharmony_ci============= 142162306a36Sopenharmony_ci 142262306a36Sopenharmony_ciThis parameter can be used to control kernel stack erasing at the end 142362306a36Sopenharmony_ciof syscalls for kernels built with ``CONFIG_GCC_PLUGIN_STACKLEAK``. 142462306a36Sopenharmony_ci 142562306a36Sopenharmony_ciThat erasing reduces the information which kernel stack leak bugs 142662306a36Sopenharmony_cican reveal and blocks some uninitialized stack variable attacks. 142762306a36Sopenharmony_ciThe tradeoff is the performance impact: on a single CPU system kernel 142862306a36Sopenharmony_cicompilation sees a 1% slowdown, other systems and workloads may vary. 142962306a36Sopenharmony_ci 143062306a36Sopenharmony_ci= ==================================================================== 143162306a36Sopenharmony_ci0 Kernel stack erasing is disabled, STACKLEAK_METRICS are not updated. 143262306a36Sopenharmony_ci1 Kernel stack erasing is enabled (default), it is performed before 143362306a36Sopenharmony_ci returning to the userspace at the end of syscalls. 143462306a36Sopenharmony_ci= ==================================================================== 143562306a36Sopenharmony_ci 143662306a36Sopenharmony_ci 143762306a36Sopenharmony_cistop-a (SPARC only) 143862306a36Sopenharmony_ci=================== 143962306a36Sopenharmony_ci 144062306a36Sopenharmony_ciControls Stop-A: 144162306a36Sopenharmony_ci 144262306a36Sopenharmony_ci= ==================================== 144362306a36Sopenharmony_ci0 Stop-A has no effect. 144462306a36Sopenharmony_ci1 Stop-A breaks to the PROM (default). 144562306a36Sopenharmony_ci= ==================================== 144662306a36Sopenharmony_ci 144762306a36Sopenharmony_ciStop-A is always enabled on a panic, so that the user can return to 144862306a36Sopenharmony_cithe boot PROM. 144962306a36Sopenharmony_ci 145062306a36Sopenharmony_ci 145162306a36Sopenharmony_cisysrq 145262306a36Sopenharmony_ci===== 145362306a36Sopenharmony_ci 145462306a36Sopenharmony_ciSee Documentation/admin-guide/sysrq.rst. 145562306a36Sopenharmony_ci 145662306a36Sopenharmony_ci 145762306a36Sopenharmony_citainted 145862306a36Sopenharmony_ci======= 145962306a36Sopenharmony_ci 146062306a36Sopenharmony_ciNon-zero if the kernel has been tainted. Numeric values, which can be 146162306a36Sopenharmony_ciORed together. The letters are seen in "Tainted" line of Oops reports. 146262306a36Sopenharmony_ci 146362306a36Sopenharmony_ci====== ===== ============================================================== 146462306a36Sopenharmony_ci 1 `(P)` proprietary module was loaded 146562306a36Sopenharmony_ci 2 `(F)` module was force loaded 146662306a36Sopenharmony_ci 4 `(S)` kernel running on an out of specification system 146762306a36Sopenharmony_ci 8 `(R)` module was force unloaded 146862306a36Sopenharmony_ci 16 `(M)` processor reported a Machine Check Exception (MCE) 146962306a36Sopenharmony_ci 32 `(B)` bad page referenced or some unexpected page flags 147062306a36Sopenharmony_ci 64 `(U)` taint requested by userspace application 147162306a36Sopenharmony_ci 128 `(D)` kernel died recently, i.e. there was an OOPS or BUG 147262306a36Sopenharmony_ci 256 `(A)` an ACPI table was overridden by user 147362306a36Sopenharmony_ci 512 `(W)` kernel issued warning 147462306a36Sopenharmony_ci 1024 `(C)` staging driver was loaded 147562306a36Sopenharmony_ci 2048 `(I)` workaround for bug in platform firmware applied 147662306a36Sopenharmony_ci 4096 `(O)` externally-built ("out-of-tree") module was loaded 147762306a36Sopenharmony_ci 8192 `(E)` unsigned module was loaded 147862306a36Sopenharmony_ci 16384 `(L)` soft lockup occurred 147962306a36Sopenharmony_ci 32768 `(K)` kernel has been live patched 148062306a36Sopenharmony_ci 65536 `(X)` Auxiliary taint, defined and used by for distros 148162306a36Sopenharmony_ci131072 `(T)` The kernel was built with the struct randomization plugin 148262306a36Sopenharmony_ci====== ===== ============================================================== 148362306a36Sopenharmony_ci 148462306a36Sopenharmony_ciSee Documentation/admin-guide/tainted-kernels.rst for more information. 148562306a36Sopenharmony_ci 148662306a36Sopenharmony_ciNote: 148762306a36Sopenharmony_ci writes to this sysctl interface will fail with ``EINVAL`` if the kernel is 148862306a36Sopenharmony_ci booted with the command line option ``panic_on_taint=<bitmask>,nousertaint`` 148962306a36Sopenharmony_ci and any of the ORed together values being written to ``tainted`` match with 149062306a36Sopenharmony_ci the bitmask declared on panic_on_taint. 149162306a36Sopenharmony_ci See Documentation/admin-guide/kernel-parameters.rst for more details on 149262306a36Sopenharmony_ci that particular kernel command line option and its optional 149362306a36Sopenharmony_ci ``nousertaint`` switch. 149462306a36Sopenharmony_ci 149562306a36Sopenharmony_cithreads-max 149662306a36Sopenharmony_ci=========== 149762306a36Sopenharmony_ci 149862306a36Sopenharmony_ciThis value controls the maximum number of threads that can be created 149962306a36Sopenharmony_ciusing ``fork()``. 150062306a36Sopenharmony_ci 150162306a36Sopenharmony_ciDuring initialization the kernel sets this value such that even if the 150262306a36Sopenharmony_cimaximum number of threads is created, the thread structures occupy only 150362306a36Sopenharmony_cia part (1/8th) of the available RAM pages. 150462306a36Sopenharmony_ci 150562306a36Sopenharmony_ciThe minimum value that can be written to ``threads-max`` is 1. 150662306a36Sopenharmony_ci 150762306a36Sopenharmony_ciThe maximum value that can be written to ``threads-max`` is given by the 150862306a36Sopenharmony_ciconstant ``FUTEX_TID_MASK`` (0x3fffffff). 150962306a36Sopenharmony_ci 151062306a36Sopenharmony_ciIf a value outside of this range is written to ``threads-max`` an 151162306a36Sopenharmony_ci``EINVAL`` error occurs. 151262306a36Sopenharmony_ci 151362306a36Sopenharmony_ci 151462306a36Sopenharmony_citraceoff_on_warning 151562306a36Sopenharmony_ci=================== 151662306a36Sopenharmony_ci 151762306a36Sopenharmony_ciWhen set, disables tracing (see Documentation/trace/ftrace.rst) when a 151862306a36Sopenharmony_ci``WARN()`` is hit. 151962306a36Sopenharmony_ci 152062306a36Sopenharmony_ci 152162306a36Sopenharmony_citracepoint_printk 152262306a36Sopenharmony_ci================= 152362306a36Sopenharmony_ci 152462306a36Sopenharmony_ciWhen tracepoints are sent to printk() (enabled by the ``tp_printk`` 152562306a36Sopenharmony_ciboot parameter), this entry provides runtime control:: 152662306a36Sopenharmony_ci 152762306a36Sopenharmony_ci echo 0 > /proc/sys/kernel/tracepoint_printk 152862306a36Sopenharmony_ci 152962306a36Sopenharmony_ciwill stop tracepoints from being sent to printk(), and:: 153062306a36Sopenharmony_ci 153162306a36Sopenharmony_ci echo 1 > /proc/sys/kernel/tracepoint_printk 153262306a36Sopenharmony_ci 153362306a36Sopenharmony_ciwill send them to printk() again. 153462306a36Sopenharmony_ci 153562306a36Sopenharmony_ciThis only works if the kernel was booted with ``tp_printk`` enabled. 153662306a36Sopenharmony_ci 153762306a36Sopenharmony_ciSee Documentation/admin-guide/kernel-parameters.rst and 153862306a36Sopenharmony_ciDocumentation/trace/boottime-trace.rst. 153962306a36Sopenharmony_ci 154062306a36Sopenharmony_ci 154162306a36Sopenharmony_ci.. _unaligned-dump-stack: 154262306a36Sopenharmony_ci 154362306a36Sopenharmony_ciunaligned-dump-stack (ia64) 154462306a36Sopenharmony_ci=========================== 154562306a36Sopenharmony_ci 154662306a36Sopenharmony_ciWhen logging unaligned accesses, controls whether the stack is 154762306a36Sopenharmony_cidumped. 154862306a36Sopenharmony_ci 154962306a36Sopenharmony_ci= =================================================== 155062306a36Sopenharmony_ci0 Do not dump the stack. This is the default setting. 155162306a36Sopenharmony_ci1 Dump the stack. 155262306a36Sopenharmony_ci= =================================================== 155362306a36Sopenharmony_ci 155462306a36Sopenharmony_ciSee also `ignore-unaligned-usertrap`_. 155562306a36Sopenharmony_ci 155662306a36Sopenharmony_ci 155762306a36Sopenharmony_ciunaligned-trap 155862306a36Sopenharmony_ci============== 155962306a36Sopenharmony_ci 156062306a36Sopenharmony_ciOn architectures where unaligned accesses cause traps, and where this 156162306a36Sopenharmony_cifeature is supported (``CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW``; currently, 156262306a36Sopenharmony_ci``arc``, ``parisc`` and ``loongarch``), controls whether unaligned traps 156362306a36Sopenharmony_ciare caught and emulated (instead of failing). 156462306a36Sopenharmony_ci 156562306a36Sopenharmony_ci= ======================================================== 156662306a36Sopenharmony_ci0 Do not emulate unaligned accesses. 156762306a36Sopenharmony_ci1 Emulate unaligned accesses. This is the default setting. 156862306a36Sopenharmony_ci= ======================================================== 156962306a36Sopenharmony_ci 157062306a36Sopenharmony_ciSee also `ignore-unaligned-usertrap`_. 157162306a36Sopenharmony_ci 157262306a36Sopenharmony_ci 157362306a36Sopenharmony_ciunknown_nmi_panic 157462306a36Sopenharmony_ci================= 157562306a36Sopenharmony_ci 157662306a36Sopenharmony_ciThe value in this file affects behavior of handling NMI. When the 157762306a36Sopenharmony_civalue is non-zero, unknown NMI is trapped and then panic occurs. At 157862306a36Sopenharmony_cithat time, kernel debugging information is displayed on console. 157962306a36Sopenharmony_ci 158062306a36Sopenharmony_ciNMI switch that most IA32 servers have fires unknown NMI up, for 158162306a36Sopenharmony_ciexample. If a system hangs up, try pressing the NMI switch. 158262306a36Sopenharmony_ci 158362306a36Sopenharmony_ci 158462306a36Sopenharmony_ciunprivileged_bpf_disabled 158562306a36Sopenharmony_ci========================= 158662306a36Sopenharmony_ci 158762306a36Sopenharmony_ciWriting 1 to this entry will disable unprivileged calls to ``bpf()``; 158862306a36Sopenharmony_cionce disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` or ``CAP_BPF`` 158962306a36Sopenharmony_ciwill return ``-EPERM``. Once set to 1, this can't be cleared from the 159062306a36Sopenharmony_cirunning kernel anymore. 159162306a36Sopenharmony_ci 159262306a36Sopenharmony_ciWriting 2 to this entry will also disable unprivileged calls to ``bpf()``, 159362306a36Sopenharmony_cihowever, an admin can still change this setting later on, if needed, by 159462306a36Sopenharmony_ciwriting 0 or 1 to this entry. 159562306a36Sopenharmony_ci 159662306a36Sopenharmony_ciIf ``BPF_UNPRIV_DEFAULT_OFF`` is enabled in the kernel config, then this 159762306a36Sopenharmony_cientry will default to 2 instead of 0. 159862306a36Sopenharmony_ci 159962306a36Sopenharmony_ci= ============================================================= 160062306a36Sopenharmony_ci0 Unprivileged calls to ``bpf()`` are enabled 160162306a36Sopenharmony_ci1 Unprivileged calls to ``bpf()`` are disabled without recovery 160262306a36Sopenharmony_ci2 Unprivileged calls to ``bpf()`` are disabled 160362306a36Sopenharmony_ci= ============================================================= 160462306a36Sopenharmony_ci 160562306a36Sopenharmony_ci 160662306a36Sopenharmony_ciwarn_limit 160762306a36Sopenharmony_ci========== 160862306a36Sopenharmony_ci 160962306a36Sopenharmony_ciNumber of kernel warnings after which the kernel should panic when 161062306a36Sopenharmony_ci``panic_on_warn`` is not set. Setting this to 0 disables checking 161162306a36Sopenharmony_cithe warning count. Setting this to 1 has the same effect as setting 161262306a36Sopenharmony_ci``panic_on_warn=1``. The default value is 0. 161362306a36Sopenharmony_ci 161462306a36Sopenharmony_ci 161562306a36Sopenharmony_ciwatchdog 161662306a36Sopenharmony_ci======== 161762306a36Sopenharmony_ci 161862306a36Sopenharmony_ciThis parameter can be used to disable or enable the soft lockup detector 161962306a36Sopenharmony_ci*and* the NMI watchdog (i.e. the hard lockup detector) at the same time. 162062306a36Sopenharmony_ci 162162306a36Sopenharmony_ci= ============================== 162262306a36Sopenharmony_ci0 Disable both lockup detectors. 162362306a36Sopenharmony_ci1 Enable both lockup detectors. 162462306a36Sopenharmony_ci= ============================== 162562306a36Sopenharmony_ci 162662306a36Sopenharmony_ciThe soft lockup detector and the NMI watchdog can also be disabled or 162762306a36Sopenharmony_cienabled individually, using the ``soft_watchdog`` and ``nmi_watchdog`` 162862306a36Sopenharmony_ciparameters. 162962306a36Sopenharmony_ciIf the ``watchdog`` parameter is read, for example by executing:: 163062306a36Sopenharmony_ci 163162306a36Sopenharmony_ci cat /proc/sys/kernel/watchdog 163262306a36Sopenharmony_ci 163362306a36Sopenharmony_cithe output of this command (0 or 1) shows the logical OR of 163462306a36Sopenharmony_ci``soft_watchdog`` and ``nmi_watchdog``. 163562306a36Sopenharmony_ci 163662306a36Sopenharmony_ci 163762306a36Sopenharmony_ciwatchdog_cpumask 163862306a36Sopenharmony_ci================ 163962306a36Sopenharmony_ci 164062306a36Sopenharmony_ciThis value can be used to control on which cpus the watchdog may run. 164162306a36Sopenharmony_ciThe default cpumask is all possible cores, but if ``NO_HZ_FULL`` is 164262306a36Sopenharmony_cienabled in the kernel config, and cores are specified with the 164362306a36Sopenharmony_ci``nohz_full=`` boot argument, those cores are excluded by default. 164462306a36Sopenharmony_ciOffline cores can be included in this mask, and if the core is later 164562306a36Sopenharmony_cibrought online, the watchdog will be started based on the mask value. 164662306a36Sopenharmony_ci 164762306a36Sopenharmony_ciTypically this value would only be touched in the ``nohz_full`` case 164862306a36Sopenharmony_cito re-enable cores that by default were not running the watchdog, 164962306a36Sopenharmony_ciif a kernel lockup was suspected on those cores. 165062306a36Sopenharmony_ci 165162306a36Sopenharmony_ciThe argument value is the standard cpulist format for cpumasks, 165262306a36Sopenharmony_ciso for example to enable the watchdog on cores 0, 2, 3, and 4 you 165362306a36Sopenharmony_cimight say:: 165462306a36Sopenharmony_ci 165562306a36Sopenharmony_ci echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask 165662306a36Sopenharmony_ci 165762306a36Sopenharmony_ci 165862306a36Sopenharmony_ciwatchdog_thresh 165962306a36Sopenharmony_ci=============== 166062306a36Sopenharmony_ci 166162306a36Sopenharmony_ciThis value can be used to control the frequency of hrtimer and NMI 166262306a36Sopenharmony_cievents and the soft and hard lockup thresholds. The default threshold 166362306a36Sopenharmony_ciis 10 seconds. 166462306a36Sopenharmony_ci 166562306a36Sopenharmony_ciThe softlockup threshold is (``2 * watchdog_thresh``). Setting this 166662306a36Sopenharmony_citunable to zero will disable lockup detection altogether. 1667