Skip to contentSkip to conversation

security/loadpin: Update the changing interface in the source code.

PATCH In review Jiele zhao 3 participants 4 messages Mar 8, 2021 – Mar 15, 2021

Subsystems (2)
lore
Share & tools
lore

Jiele zhao

author
#0 lore raw

PATCH 1/1 security/loadpin: Update the changing interface in the source code.

Loadpin cmdline interface "enabled" has been renamed to "enforce" for a long time, but the User Description Document was not updated. (Meaning unchanged)

And kernel_read_file* were moved from linux/fs.h to its own linux/kernel_read_file.h include file. So update that change here.

---
 Documentation/admin-guide/LSM/LoadPin.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/admin-guide/LSM/LoadPin.rst +3 -3
index 716ad9b23c9a..dd3ca68b5df1 100644
@@ -11,8 +11,8 @@ restrictions without needing to sign the files individually.
 
 The LSM is selectable at build-time with ``CONFIG_SECURITY_LOADPIN``, and
 can be controlled at boot-time with the kernel command line option
-"``loadpin.enabled``". By default, it is enabled, but can be disabled at
-boot ("``loadpin.enabled=0``").
+"``loadpin.enforce``". By default, it is enabled, but can be disabled at
+boot ("``loadpin.enforce=0``").
 
 LoadPin starts pinning when it sees the first file loaded. If the
 block device backing the filesystem is not read-only, a sysctl is
@@ -28,4 +28,4 @@ different mechanisms such as ``CONFIG_MODULE_SIG`` and
 ``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
 still use LoadPin to protect the integrity of other files kernel loads. The
 full list of valid file types can be found in ``kernel_read_file_str``
-defined in ``include/linux/fs.h``.
+defined in ``include/linux/kernel_read_file.h``.
Signature · 1 line
2.25.1
author
#1 lore raw
Quoted 28 lines · Jiele zhao

Loadpin cmdline interface "enabled" has been renamed to "enforce" for a long time, but the User Description Document was not updated. (Meaning unchanged)

And kernel_read_file* were moved from linux/fs.h to its own linux/kernel_read_file.h include file. So update that change here.

---
  Documentation/admin-guide/LSM/LoadPin.rst | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/admin-guide/LSM/LoadPin.rst +2 -2
index 716ad9b23c9a..dd3ca68b5df1 100644
@@ -11,8 +11,8 @@ restrictions without needing to sign the files individually.
 
  The LSM is selectable at build-time with ``CONFIG_SECURITY_LOADPIN``, and
  can be controlled at boot-time with the kernel command line option
-"``loadpin.enabled``". By default, it is enabled, but can be disabled at
-boot ("``loadpin.enabled=0``").
+"``loadpin.enforce``". By default, it is enabled, but can be disabled at
+boot ("``loadpin.enforce=0``").
 
  LoadPin starts pinning when it sees the first file loaded. If the
  block device backing the filesystem is not read-only, a sysctl is

Documentation/admin-guide/LSM/LoadPin.rst different mechanisms such as ``CONFIG_MODULE_SIG`` and · line 31

Quoted 5 lines
Documentation/admin-guide/LSM/LoadPin.rst +1 -1
@@ -28,4 +28,4 @@ different mechanisms such as ``CONFIG_MODULE_SIG`` and
  ``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
  still use LoadPin to protect the integrity of other files kernel loads. The
  full list of valid file types can be found in ``kernel_read_file_str``
-defined in ``include/linux/fs.h``.
+defined in ``include/linux/kernel_read_file.h``.

Ping. It's been almost one week now, can someone respond this patch? Kees? Jonathan?

maintainer
#2 lore raw
In reply to Jiele zhao
Quoted 11 lines · Jiele zhao

Loadpin cmdline interface "enabled" has been renamed to "enforce" for a long time, but the User Description Document was not updated. (Meaning unchanged)

And kernel_read_file* were moved from linux/fs.h to its own linux/kernel_read_file.h include file. So update that change here.

---
 Documentation/admin-guide/LSM/LoadPin.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

This all looks correct as far as I can tell, so I've applied the patch.

Thanks,

jon

Acked-by on v1 1/1
#3 lore raw
In reply to Jiele zhao
Quoted 8 lines · Jiele zhao

Loadpin cmdline interface "enabled" has been renamed to "enforce" for a long time, but the User Description Document was not updated. (Meaning unchanged)

And kernel_read_file* were moved from linux/fs.h to its own linux/kernel_read_file.h include file. So update that change here.

Thanks for the catch!

-Kees

Quoted 28 lines
---
 Documentation/admin-guide/LSM/LoadPin.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/admin-guide/LSM/LoadPin.rst +3 -3
index 716ad9b23c9a..dd3ca68b5df1 100644
@@ -11,8 +11,8 @@ restrictions without needing to sign the files individually.
 
 The LSM is selectable at build-time with ``CONFIG_SECURITY_LOADPIN``, and
 can be controlled at boot-time with the kernel command line option
-"``loadpin.enabled``". By default, it is enabled, but can be disabled at
-boot ("``loadpin.enabled=0``").
+"``loadpin.enforce``". By default, it is enabled, but can be disabled at
+boot ("``loadpin.enforce=0``").
 
 LoadPin starts pinning when it sees the first file loaded. If the
 block device backing the filesystem is not read-only, a sysctl is
@@ -28,4 +28,4 @@ different mechanisms such as ``CONFIG_MODULE_SIG`` and
 ``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
 still use LoadPin to protect the integrity of other files kernel loads. The
 full list of valid file types can be found in ``kernel_read_file_str``
-defined in ``include/linux/fs.h``.
+defined in ``include/linux/kernel_read_file.h``.
Signature · 1 line
2.25.1
Signature · 1 line
Kees Cook