Skip to contentSkip to conversation

kcmp.2: still depends on kconfig

PATCH Applied Jann Horn 2 participants 4 messages Dec 8, 2021 – Dec 9, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Jann Horn

author
#0 lore raw

PATCH 1/1 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.

---
 man2/kcmp.2 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
man2/kcmp.2 +3 -1
index 7acfa8ef8b47..2e4495539645 100644
@@ -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)

base-commit: ae6b221882ce71ba82fcdbe02419a225111502f0

Signature · 1 line
2.34.1.400.ga245620fadb-goog
#1 lore raw

Hi Jann,

Quoted 9 lines · Jann Horn

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.

Quoted 5 lines

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.

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:

Quoted 5 lines
man2/kcmp.2 +0 -0
index 7acfa8ef8b47..2e4495539645 100644

man2/kcmp.2 checkpoint/restore in user space (CRIU) feature. · line 325

Quoted 10 lines
man2/kcmp.2 +3 -1
@@ -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.

[alx: semantic newlines]
man2/kcmp.2 +3 -1
index 7acfa8ef8..278eafb02 100644
@@ -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

Signature · 2 lines
Alejandro Colomar
Linux man-pages maintainer; https://www.kernel.org/doc/man-pages/
author
#2 lore raw
Quoted 10 lines · Alejandro Colomar (man-pages)
Quoted 9 lines · Jann Horn

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.

Quoted 7 lines
Quoted 5 lines

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.

Thanks! Patch applied.

Oh, that was quick! Thanks.

Quoted 11 lines

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.

Ah, thanks for the pointer. I'll try to remember it for next time...

#3 lore raw
Quoted 3 lines · Jann Horn
Quoted 1 line

Thanks! Patch applied.

Oh, that was quick! Thanks.

Simple and very well explained patches get applied fast :)

Quoted 12 lines
Quoted 12 lines

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.

BTW, now I remember I should apply some minor patch to that paragraph (s/sentence clauses/clauses/).

Quoted 3 lines

Ah, thanks for the pointer. I'll try to remember it for next time...

Thanks!

Cheers,
Alex

Signature · 2 lines
Alejandro Colomar
Linux man-pages maintainer; https://www.kernel.org/doc/man-pages/