diff --git a/nixos/doc/manual/release-notes/rl-1703.xml b/nixos/doc/manual/release-notes/rl-1703.xml index 3697b69fcf50..cae46258b808 100644 --- a/nixos/doc/manual/release-notes/rl-1703.xml +++ b/nixos/doc/manual/release-notes/rl-1703.xml @@ -95,15 +95,6 @@ following incompatible changes:</para> </para> </listitem> - <listitem> - <para> - The Yama LSM is now enabled by default in the kernel, - which prevents ptracing non-child processes. - This means you will not be able to attach gdb to an existing process, - but will need to start that process from gdb (so it is a child). - </para> - </listitem> - <listitem> <para> The <literal>stripHash</literal> bash function in <literal>stdenv</literal> diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix index 61b02c5ffa6a..a3f7e8f722f0 100644 --- a/nixos/modules/config/sysctl.nix +++ b/nixos/modules/config/sysctl.nix @@ -64,5 +64,9 @@ in # Removed under grsecurity. boot.kernel.sysctl."kernel.kptr_restrict" = if (config.boot.kernelPackages.kernel.features.grsecurity or false) then null else 1; + + # Disable YAMA by default to allow easy debugging. + boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkDefault 0; + }; }