Hi Jann, On 12/9/21 00:44, Jann Horn wrote:
The manpage claims that kcmp() is now available unconditionally. That's not true; from kernel/Makefile: obj-$(CONFIG_KCMP) += kcmp.o This new Kconfig flag is forced on by CONFIG_CHECKPOINT_RESTORE as before, but also by CONFIG_DRM, which means that pretty much any kernel built to support desktop systems will implicitly have it available. But if you compiled some kind of server/embedded kernel without DRM and without CHECKPOINT_RESTORE, you'd have to flip on the expert config option to get KCMP. Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>
Thanks! Patch applied. I slightly modified the patch for the following reason: man-pages(7): Use semantic newlines In the source of a manual page, new sentences should be started on new lines, and long sentences should be split into lines at clause breaks (commas, semicolons, colons, and so on). This convention, sometimes known as "seman‐ tic newlines", makes it easier to see the effect of patches, which often operate at the level of individual sentences or sentence clauses. So, instead of this:
diff --git a/man2/kcmp.2 b/man2/kcmp.2 index 7acfa8ef8b47..2e4495539645 100644 --- a/man2/kcmp.2 +++ b/man2/kcmp.2 @@ -317,7 +317,9 @@ checkpoint/restore in user space (CRIU) feature. process information via the .BR proc (5) filesystem; this was deemed to be unsuitable for security reasons.) -Since Linux 5.12, this system call is made available unconditionally. +Since Linux 5.12, this system call is also available if the kernel is configured +with +.BR CONFIG_KCMP . .PP See .BR clone (2)
I applied this (only white-space source-code changes compared to yours): kcmp.2: still depends on kconfig The manpage claims that kcmp() is now available unconditionally. That's not true; from kernel/Makefile: obj-$(CONFIG_KCMP) += kcmp.o This new Kconfig flag is forced on by CONFIG_CHECKPOINT_RESTORE as before, but also by CONFIG_DRM, which means that pretty much any kernel built to support desktop systems will implicitly have it available. But if you compiled some kind of server/embedded kernel without DRM and without CHECKPOINT_RESTORE, you'd have to flip on the expert config option to get KCMP. Signed-off-by: Jann Horn <jannh@xxxxxxxxxx> [alx: semantic newlines] Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx> diff --git a/man2/kcmp.2 b/man2/kcmp.2 index 7acfa8ef8..278eafb02 100644 --- a/man2/kcmp.2 +++ b/man2/kcmp.2 @@ -317,7 +317,9 @@ checkpoint/restore in user space (CRIU) feature. process information via the .BR proc (5) filesystem; this was deemed to be unsuitable for security reasons.) -Since Linux 5.12, this system call is made available unconditionally. +Since Linux 5.12, +this system call is also available if the kernel is configured with +.BR CONFIG_KCMP . .PP See .BR clone (2) Cheers, Alex -- Alejandro Colomar Linux man-pages maintainer; https://www.kernel.org/doc/man-pages/