Exposing kernel pointers (through procfs or "seq_printf()") exposes kernel writeable structures, which may contain functions pointers. If a write vulnerability occurs in the kernel, allowing write access to any of this structure, the kernel can be compromised.
This option disallows any program without the CAP_SYSLOG capability to get the addresses of kernel pointers by replacing them with "0".
Check
Verify the runtime status of the kernel.kptr_restrict kernel parameter with the following command:
$ sysctl kernel.kptr_restrict
kernel.kptr_restrict = 1
Verify the configuration of the kernel.kptr_restrict kernel parameter with the following command: