mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
binfmt_misc: turn the entry behavior flags into an enum
The MISC_FMT_* behavior flags are macros using unsigned long literals while the entry bit numbers right above them are now a proper enum. Move the flags into an enum as well so every flags word constant is declared in one form and shows up in debuginfo. (1U << N) keeps the enumerators within unsigned int range which is well-defined for enum constants and the values are unchanged when promoted to the unsigned long flags word. No functional change. Link: https://patch.msgid.link/20260710-work-binfmt_misc-locking-v3-8-a162f7cb58d6@kernel.org Reviewed-by: Jori Koolstra <jkoolstra@xs4all.nl> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
c9fa1f1ccf
commit
9eca1a625c
|
|
@ -47,10 +47,14 @@ enum binfmt_misc_entry_bits {
|
|||
MISC_FMT_ENABLED_BIT = 0,
|
||||
MISC_FMT_MAGIC_BIT = 1,
|
||||
};
|
||||
#define MISC_FMT_PRESERVE_ARGV0 (1UL << 31)
|
||||
#define MISC_FMT_OPEN_BINARY (1UL << 30)
|
||||
#define MISC_FMT_CREDENTIALS (1UL << 29)
|
||||
#define MISC_FMT_OPEN_FILE (1UL << 28)
|
||||
|
||||
/* Entry behavior flags, fixed at registration time. */
|
||||
enum binfmt_misc_entry_flags {
|
||||
MISC_FMT_PRESERVE_ARGV0 = (1U << 31),
|
||||
MISC_FMT_OPEN_BINARY = (1U << 30),
|
||||
MISC_FMT_CREDENTIALS = (1U << 29),
|
||||
MISC_FMT_OPEN_FILE = (1U << 28),
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct hlist_node node;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user