Skip to contentSkip to conversation

landlock: Add missing EINVAL case in the doc for landlock_add_rule

PATCH Applied Tingmao Wang 3 participants 3 messages Nov 16 – Nov 19

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 landlock: Add missing EINVAL case in the doc for landlock_add_rule

This is another way it can return EINVAL but is not documented. Documenting it is useful to help rule out errors.

---
 security/landlock/syscalls.c | 1 +
 1 file changed, 1 insertion(+)
security/landlock/syscalls.c +1 -0
index fb5af318b69b..29e9d5d7399d 100644
@@ -629,6 +629,7 @@ static int add_rule_capability(struct landlock_ruleset *const ruleset,
  * - %EAFNOSUPPORT: @rule_type is %LANDLOCK_RULE_NET_PORT but TCP/IP is not
  *   supported by the running kernel;
  * - %EINVAL: @flags is not valid;
+ * - %EINVAL: @rule_type is not valid;
  * - %EINVAL: The rule accesses are inconsistent (i.e.
  *   &landlock_path_beneath_attr.allowed_access or
  *   &landlock_net_port_attr.allowed_access is not a subset of the ruleset

base-commit: 57493c3b7f449a60d1c43322158671b98684f9b1

Signature · 1 line
2.56.1
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 4 lines

This is another way it can return EINVAL but is not documented. Documenting it is useful to help rule out errors.

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Tingmao Wang
Quoted 4 lines · Tingmao Wang

This is another way it can return EINVAL but is not documented. Documenting it is useful to help rule out errors.

Thanks, applied!

Quoted 22 lines
---
 security/landlock/syscalls.c | 1 +
 1 file changed, 1 insertion(+)
security/landlock/syscalls.c +1 -0
index fb5af318b69b..29e9d5d7399d 100644
@@ -629,6 +629,7 @@ static int add_rule_capability(struct landlock_ruleset *const ruleset,
  * - %EAFNOSUPPORT: @rule_type is %LANDLOCK_RULE_NET_PORT but TCP/IP is not
  *   supported by the running kernel;
  * - %EINVAL: @flags is not valid;
+ * - %EINVAL: @rule_type is not valid;
  * - %EINVAL: The rule accesses are inconsistent (i.e.
  *   &landlock_path_beneath_attr.allowed_access or
  *   &landlock_net_port_attr.allowed_access is not a subset of the ruleset

base-commit: 57493c3b7f449a60d1c43322158671b98684f9b1

Signature · 1 line
2.56.1