]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
samples/landlock: Bump ABI version to 8
authorGünther Noack <gnoack3000@gmail.com>
Fri, 20 Feb 2026 16:06:27 +0000 (17:06 +0100)
committerMickaël Salaün <mic@digikod.net>
Wed, 4 Mar 2026 17:28:11 +0000 (18:28 +0100)
The sample tool should print a warning if it is not running on a
kernel that provides the newest Landlock ABI version.

Link: https://lore.kernel.org/all/20260218.ufao5Vaefa2u@digikod.net/
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260220160627.53913-1-gnoack3000@gmail.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
samples/landlock/sandboxer.c

index e7af02f98208baa9f6f889b8a5cf794829cb7824..9f21088c0855c8d37fd63cf70fd1104e92d7a94e 100644 (file)
@@ -299,7 +299,7 @@ out_unset:
 
 /* clang-format on */
 
-#define LANDLOCK_ABI_LAST 7
+#define LANDLOCK_ABI_LAST 8
 
 #define XSTR(s) #s
 #define STR(s) XSTR(s)
@@ -436,7 +436,8 @@ int main(const int argc, char *const argv[], char *const *const envp)
                /* Removes LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON for ABI < 7 */
                supported_restrict_flags &=
                        ~LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON;
-
+               __attribute__((fallthrough));
+       case 7:
                /* Must be printed for any ABI < LANDLOCK_ABI_LAST. */
                fprintf(stderr,
                        "Hint: You should update the running kernel "