mirror of
https://github.com/systemd/systemd
synced 2025-10-03 02:34:45 +02:00
Compare commits
4 Commits
208ba34a43
...
5bd2538405
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5bd2538405 | ||
![]() |
59c26be53c | ||
![]() |
d5f65056ee | ||
![]() |
4dfadc90fd |
@ -251,7 +251,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnNitro*ANV*15-51:pvr*
|
|||||||
|
|
||||||
# Alienware/Dell reserves these keys; safe to apply on all their devices
|
# Alienware/Dell reserves these keys; safe to apply on all their devices
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pn*:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pn*:*
|
||||||
KEYBOARD_KEY_68=!prog3 # Fn+f1 Performance mode toggle
|
KEYBOARD_KEY_68=!performance # Fn+f1 Performance mode toggle
|
||||||
KEYBOARD_KEY_81=touchpad_toggle # Touchpad toggle
|
KEYBOARD_KEY_81=touchpad_toggle # Touchpad toggle
|
||||||
KEYBOARD_KEY_8a=ejectcd
|
KEYBOARD_KEY_8a=ejectcd
|
||||||
KEYBOARD_KEY_92=macro1 # Fn+f2
|
KEYBOARD_KEY_92=macro1 # Fn+f2
|
||||||
@ -396,7 +396,7 @@ evdev:name:gpio-keys:phys:gpio-keys/input0:ev:3:dmi:bvn*:bvr*:bd*:svncube:pni1-T
|
|||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*:*
|
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*:*
|
||||||
KEYBOARD_KEY_68=!prog2 # G-Mode (Dell-specific)
|
KEYBOARD_KEY_68=!performance # G-Mode (Dell-specific)
|
||||||
KEYBOARD_KEY_81=playpause # Play/Pause
|
KEYBOARD_KEY_81=playpause # Play/Pause
|
||||||
KEYBOARD_KEY_82=stopcd # Stop
|
KEYBOARD_KEY_82=stopcd # Stop
|
||||||
KEYBOARD_KEY_83=previoussong # Previous song
|
KEYBOARD_KEY_83=previoussong # Previous song
|
||||||
|
@ -450,6 +450,7 @@ union bpf_iter_link_info {
|
|||||||
* * **struct bpf_map_info**
|
* * **struct bpf_map_info**
|
||||||
* * **struct bpf_btf_info**
|
* * **struct bpf_btf_info**
|
||||||
* * **struct bpf_link_info**
|
* * **struct bpf_link_info**
|
||||||
|
* * **struct bpf_token_info**
|
||||||
*
|
*
|
||||||
* Return
|
* Return
|
||||||
* Returns zero on success. On error, -1 is returned and *errno*
|
* Returns zero on success. On error, -1 is returned and *errno*
|
||||||
@ -906,6 +907,17 @@ union bpf_iter_link_info {
|
|||||||
* A new file descriptor (a nonnegative integer), or -1 if an
|
* A new file descriptor (a nonnegative integer), or -1 if an
|
||||||
* error occurred (in which case, *errno* is set appropriately).
|
* error occurred (in which case, *errno* is set appropriately).
|
||||||
*
|
*
|
||||||
|
* BPF_PROG_STREAM_READ_BY_FD
|
||||||
|
* Description
|
||||||
|
* Read data of a program's BPF stream. The program is identified
|
||||||
|
* by *prog_fd*, and the stream is identified by the *stream_id*.
|
||||||
|
* The data is copied to a buffer pointed to by *stream_buf*, and
|
||||||
|
* filled less than or equal to *stream_buf_len* bytes.
|
||||||
|
*
|
||||||
|
* Return
|
||||||
|
* Number of bytes read from the stream on success, or -1 if an
|
||||||
|
* error occurred (in which case, *errno* is set appropriately).
|
||||||
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* eBPF objects (maps and programs) can be shared between processes.
|
* eBPF objects (maps and programs) can be shared between processes.
|
||||||
*
|
*
|
||||||
@ -961,6 +973,7 @@ enum bpf_cmd {
|
|||||||
BPF_LINK_DETACH,
|
BPF_LINK_DETACH,
|
||||||
BPF_PROG_BIND_MAP,
|
BPF_PROG_BIND_MAP,
|
||||||
BPF_TOKEN_CREATE,
|
BPF_TOKEN_CREATE,
|
||||||
|
BPF_PROG_STREAM_READ_BY_FD,
|
||||||
__MAX_BPF_CMD,
|
__MAX_BPF_CMD,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1463,6 +1476,11 @@ struct bpf_stack_build_id {
|
|||||||
|
|
||||||
#define BPF_OBJ_NAME_LEN 16U
|
#define BPF_OBJ_NAME_LEN 16U
|
||||||
|
|
||||||
|
enum {
|
||||||
|
BPF_STREAM_STDOUT = 1,
|
||||||
|
BPF_STREAM_STDERR = 2,
|
||||||
|
};
|
||||||
|
|
||||||
union bpf_attr {
|
union bpf_attr {
|
||||||
struct { /* anonymous struct used by BPF_MAP_CREATE command */
|
struct { /* anonymous struct used by BPF_MAP_CREATE command */
|
||||||
__u32 map_type; /* one of enum bpf_map_type */
|
__u32 map_type; /* one of enum bpf_map_type */
|
||||||
@ -1794,6 +1812,13 @@ union bpf_attr {
|
|||||||
};
|
};
|
||||||
__u64 expected_revision;
|
__u64 expected_revision;
|
||||||
} netkit;
|
} netkit;
|
||||||
|
struct {
|
||||||
|
union {
|
||||||
|
__u32 relative_fd;
|
||||||
|
__u32 relative_id;
|
||||||
|
};
|
||||||
|
__u64 expected_revision;
|
||||||
|
} cgroup;
|
||||||
};
|
};
|
||||||
} link_create;
|
} link_create;
|
||||||
|
|
||||||
@ -1842,6 +1867,13 @@ union bpf_attr {
|
|||||||
__u32 bpffs_fd;
|
__u32 bpffs_fd;
|
||||||
} token_create;
|
} token_create;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
__aligned_u64 stream_buf;
|
||||||
|
__u32 stream_buf_len;
|
||||||
|
__u32 stream_id;
|
||||||
|
__u32 prog_fd;
|
||||||
|
} prog_stream_read;
|
||||||
|
|
||||||
} __attribute__((aligned(8)));
|
} __attribute__((aligned(8)));
|
||||||
|
|
||||||
/* The description below is an attempt at providing documentation to eBPF
|
/* The description below is an attempt at providing documentation to eBPF
|
||||||
@ -2403,7 +2435,7 @@ union bpf_attr {
|
|||||||
* into it. An example is available in file
|
* into it. An example is available in file
|
||||||
* *samples/bpf/trace_output_user.c* in the Linux kernel source
|
* *samples/bpf/trace_output_user.c* in the Linux kernel source
|
||||||
* tree (the eBPF program counterpart is in
|
* tree (the eBPF program counterpart is in
|
||||||
* *samples/bpf/trace_output_kern.c*).
|
* *samples/bpf/trace_output.bpf.c*).
|
||||||
*
|
*
|
||||||
* **bpf_perf_event_output**\ () achieves better performance
|
* **bpf_perf_event_output**\ () achieves better performance
|
||||||
* than **bpf_trace_printk**\ () for sharing data with user
|
* than **bpf_trace_printk**\ () for sharing data with user
|
||||||
@ -6653,11 +6685,15 @@ struct bpf_link_info {
|
|||||||
struct {
|
struct {
|
||||||
__aligned_u64 tp_name; /* in/out: tp_name buffer ptr */
|
__aligned_u64 tp_name; /* in/out: tp_name buffer ptr */
|
||||||
__u32 tp_name_len; /* in/out: tp_name buffer len */
|
__u32 tp_name_len; /* in/out: tp_name buffer len */
|
||||||
|
__u32 :32;
|
||||||
|
__u64 cookie;
|
||||||
} raw_tracepoint;
|
} raw_tracepoint;
|
||||||
struct {
|
struct {
|
||||||
__u32 attach_type;
|
__u32 attach_type;
|
||||||
__u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */
|
__u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */
|
||||||
__u32 target_btf_id; /* BTF type id inside the object */
|
__u32 target_btf_id; /* BTF type id inside the object */
|
||||||
|
__u32 :32;
|
||||||
|
__u64 cookie;
|
||||||
} tracing;
|
} tracing;
|
||||||
struct {
|
struct {
|
||||||
__u64 cgroup_id;
|
__u64 cgroup_id;
|
||||||
@ -6768,6 +6804,13 @@ struct bpf_link_info {
|
|||||||
};
|
};
|
||||||
} __attribute__((aligned(8)));
|
} __attribute__((aligned(8)));
|
||||||
|
|
||||||
|
struct bpf_token_info {
|
||||||
|
__u64 allowed_cmds;
|
||||||
|
__u64 allowed_maps;
|
||||||
|
__u64 allowed_progs;
|
||||||
|
__u64 allowed_attachs;
|
||||||
|
} __attribute__((aligned(8)));
|
||||||
|
|
||||||
/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
|
/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
|
||||||
* by user and intended to be used by socket (e.g. to bind to, depends on
|
* by user and intended to be used by socket (e.g. to bind to, depends on
|
||||||
* attach type).
|
* attach type).
|
||||||
|
@ -614,8 +614,11 @@ struct btrfs_ioctl_clone_range_args {
|
|||||||
#define BTRFS_DEFRAG_RANGE_COMPRESS 1
|
#define BTRFS_DEFRAG_RANGE_COMPRESS 1
|
||||||
#define BTRFS_DEFRAG_RANGE_START_IO 2
|
#define BTRFS_DEFRAG_RANGE_START_IO 2
|
||||||
#define BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL 4
|
#define BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL 4
|
||||||
|
/* Request no compression on the range (uncompress if necessary). */
|
||||||
|
#define BTRFS_DEFRAG_RANGE_NOCOMPRESS 8
|
||||||
#define BTRFS_DEFRAG_RANGE_FLAGS_SUPP (BTRFS_DEFRAG_RANGE_COMPRESS | \
|
#define BTRFS_DEFRAG_RANGE_FLAGS_SUPP (BTRFS_DEFRAG_RANGE_COMPRESS | \
|
||||||
BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL | \
|
BTRFS_DEFRAG_RANGE_COMPRESS_LEVEL | \
|
||||||
|
BTRFS_DEFRAG_RANGE_NOCOMPRESS | \
|
||||||
BTRFS_DEFRAG_RANGE_START_IO)
|
BTRFS_DEFRAG_RANGE_START_IO)
|
||||||
|
|
||||||
struct btrfs_ioctl_defrag_range_args {
|
struct btrfs_ioctl_defrag_range_args {
|
||||||
|
@ -6,9 +6,10 @@
|
|||||||
* Alexander Kjeldaas <astor@guardian.no>
|
* Alexander Kjeldaas <astor@guardian.no>
|
||||||
* with help from Aleph1, Roland Buresund and Andrew Main.
|
* with help from Aleph1, Roland Buresund and Andrew Main.
|
||||||
*
|
*
|
||||||
* See here for the libcap library ("POSIX draft" compliance):
|
* See here for the libcap2 library (compliant with Section 25 of
|
||||||
|
* the withdrawn POSIX 1003.1e Draft 17):
|
||||||
*
|
*
|
||||||
* ftp://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/
|
* https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LINUX_CAPABILITY_H
|
#ifndef _LINUX_CAPABILITY_H
|
||||||
|
@ -2312,7 +2312,7 @@ enum {
|
|||||||
IPV6_USER_FLOW = 0x0e, /* spec only (usr_ip6_spec; nfc only) */
|
IPV6_USER_FLOW = 0x0e, /* spec only (usr_ip6_spec; nfc only) */
|
||||||
IPV4_FLOW = 0x10, /* hash only */
|
IPV4_FLOW = 0x10, /* hash only */
|
||||||
IPV6_FLOW = 0x11, /* hash only */
|
IPV6_FLOW = 0x11, /* hash only */
|
||||||
ETHER_FLOW = 0x12, /* spec only (ether_spec) */
|
ETHER_FLOW = 0x12, /* hash or spec (ether_spec) */
|
||||||
|
|
||||||
/* Used for GTP-U IPv4 and IPv6.
|
/* Used for GTP-U IPv4 and IPv6.
|
||||||
* The format of GTP packets only includes
|
* The format of GTP packets only includes
|
||||||
@ -2369,7 +2369,7 @@ enum {
|
|||||||
/* Flag to enable RSS spreading of traffic matching rule (nfc only) */
|
/* Flag to enable RSS spreading of traffic matching rule (nfc only) */
|
||||||
#define FLOW_RSS 0x20000000
|
#define FLOW_RSS 0x20000000
|
||||||
|
|
||||||
/* L3-L4 network traffic flow hash options */
|
/* L2-L4 network traffic flow hash options */
|
||||||
#define RXH_L2DA (1 << 1)
|
#define RXH_L2DA (1 << 1)
|
||||||
#define RXH_VLAN (1 << 2)
|
#define RXH_VLAN (1 << 2)
|
||||||
#define RXH_L3_PROTO (1 << 3)
|
#define RXH_L3_PROTO (1 << 3)
|
||||||
|
@ -56,6 +56,17 @@
|
|||||||
#define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */
|
#define RENAME_EXCHANGE (1 << 1) /* Exchange source and dest */
|
||||||
#define RENAME_WHITEOUT (1 << 2) /* Whiteout source */
|
#define RENAME_WHITEOUT (1 << 2) /* Whiteout source */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The root inode of procfs is guaranteed to always have the same inode number.
|
||||||
|
* For programs that make heavy use of procfs, verifying that the root is a
|
||||||
|
* real procfs root and using openat2(RESOLVE_{NO_{XDEV,MAGICLINKS},BENEATH})
|
||||||
|
* will allow you to make sure you are never tricked into operating on the
|
||||||
|
* wrong procfs file.
|
||||||
|
*/
|
||||||
|
enum procfs_ino {
|
||||||
|
PROCFS_ROOT_INO = 1,
|
||||||
|
};
|
||||||
|
|
||||||
struct file_clone_range {
|
struct file_clone_range {
|
||||||
__s64 src_fd;
|
__s64 src_fd;
|
||||||
__u64 src_offset;
|
__u64 src_offset;
|
||||||
@ -87,6 +98,63 @@ struct fs_sysfs_path {
|
|||||||
__u8 name[128];
|
__u8 name[128];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Protection info capability flags */
|
||||||
|
#define LBMD_PI_CAP_INTEGRITY (1 << 0)
|
||||||
|
#define LBMD_PI_CAP_REFTAG (1 << 1)
|
||||||
|
|
||||||
|
/* Checksum types for Protection Information */
|
||||||
|
#define LBMD_PI_CSUM_NONE 0
|
||||||
|
#define LBMD_PI_CSUM_IP 1
|
||||||
|
#define LBMD_PI_CSUM_CRC16_T10DIF 2
|
||||||
|
#define LBMD_PI_CSUM_CRC64_NVME 4
|
||||||
|
|
||||||
|
/* sizeof first published struct */
|
||||||
|
#define LBMD_SIZE_VER0 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logical block metadata capability descriptor
|
||||||
|
* If the device does not support metadata, all the fields will be zero.
|
||||||
|
* Applications must check lbmd_flags to determine whether metadata is
|
||||||
|
* supported or not.
|
||||||
|
*/
|
||||||
|
struct logical_block_metadata_cap {
|
||||||
|
/* Bitmask of logical block metadata capability flags */
|
||||||
|
__u32 lbmd_flags;
|
||||||
|
/*
|
||||||
|
* The amount of data described by each unit of logical block
|
||||||
|
* metadata
|
||||||
|
*/
|
||||||
|
__u16 lbmd_interval;
|
||||||
|
/*
|
||||||
|
* Size in bytes of the logical block metadata associated with each
|
||||||
|
* interval
|
||||||
|
*/
|
||||||
|
__u8 lbmd_size;
|
||||||
|
/*
|
||||||
|
* Size in bytes of the opaque block tag associated with each
|
||||||
|
* interval
|
||||||
|
*/
|
||||||
|
__u8 lbmd_opaque_size;
|
||||||
|
/*
|
||||||
|
* Offset in bytes of the opaque block tag within the logical block
|
||||||
|
* metadata
|
||||||
|
*/
|
||||||
|
__u8 lbmd_opaque_offset;
|
||||||
|
/* Size in bytes of the T10 PI tuple associated with each interval */
|
||||||
|
__u8 lbmd_pi_size;
|
||||||
|
/* Offset in bytes of T10 PI tuple within the logical block metadata */
|
||||||
|
__u8 lbmd_pi_offset;
|
||||||
|
/* T10 PI guard tag type */
|
||||||
|
__u8 lbmd_guard_tag_type;
|
||||||
|
/* Size in bytes of the T10 PI application tag */
|
||||||
|
__u8 lbmd_app_tag_size;
|
||||||
|
/* Size in bytes of the T10 PI reference tag */
|
||||||
|
__u8 lbmd_ref_tag_size;
|
||||||
|
/* Size in bytes of the T10 PI storage tag */
|
||||||
|
__u8 lbmd_storage_tag_size;
|
||||||
|
__u8 pad;
|
||||||
|
};
|
||||||
|
|
||||||
/* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */
|
/* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */
|
||||||
#define FILE_DEDUPE_RANGE_SAME 0
|
#define FILE_DEDUPE_RANGE_SAME 0
|
||||||
#define FILE_DEDUPE_RANGE_DIFFERS 1
|
#define FILE_DEDUPE_RANGE_DIFFERS 1
|
||||||
@ -144,6 +212,24 @@ struct fsxattr {
|
|||||||
unsigned char fsx_pad[8];
|
unsigned char fsx_pad[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Variable size structure for file_[sg]et_attr().
|
||||||
|
*
|
||||||
|
* Note. This is alternative to the structure 'struct file_kattr'/'struct fsxattr'.
|
||||||
|
* As this structure is passed to/from userspace with its size, this can
|
||||||
|
* be versioned based on the size.
|
||||||
|
*/
|
||||||
|
struct file_attr {
|
||||||
|
__u64 fa_xflags; /* xflags field value (get/set) */
|
||||||
|
__u32 fa_extsize; /* extsize field value (get/set)*/
|
||||||
|
__u32 fa_nextents; /* nextents field value (get) */
|
||||||
|
__u32 fa_projid; /* project identifier (get/set) */
|
||||||
|
__u32 fa_cowextsize; /* CoW extsize field value (get/set) */
|
||||||
|
};
|
||||||
|
|
||||||
|
#define FILE_ATTR_SIZE_VER0 24
|
||||||
|
#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flags for the fsx_xflags field
|
* Flags for the fsx_xflags field
|
||||||
*/
|
*/
|
||||||
@ -243,6 +329,8 @@ struct fsxattr {
|
|||||||
* also /sys/kernel/debug/ for filesystems with debugfs exports
|
* also /sys/kernel/debug/ for filesystems with debugfs exports
|
||||||
*/
|
*/
|
||||||
#define FS_IOC_GETFSSYSFSPATH _IOR(0x15, 1, struct fs_sysfs_path)
|
#define FS_IOC_GETFSSYSFSPATH _IOR(0x15, 1, struct fs_sysfs_path)
|
||||||
|
/* Get logical block metadata capability details */
|
||||||
|
#define FS_IOC_GETLBMD_CAP _IOWR(0x15, 2, struct logical_block_metadata_cap)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
|
* Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
|
||||||
|
@ -1396,6 +1396,7 @@ enum {
|
|||||||
IFLA_VXLAN_LOCALBYPASS,
|
IFLA_VXLAN_LOCALBYPASS,
|
||||||
IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */
|
IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */
|
||||||
IFLA_VXLAN_RESERVED_BITS,
|
IFLA_VXLAN_RESERVED_BITS,
|
||||||
|
IFLA_VXLAN_MC_ROUTE,
|
||||||
__IFLA_VXLAN_MAX
|
__IFLA_VXLAN_MAX
|
||||||
};
|
};
|
||||||
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
|
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
|
||||||
@ -1532,6 +1533,7 @@ enum {
|
|||||||
IFLA_BOND_MISSED_MAX,
|
IFLA_BOND_MISSED_MAX,
|
||||||
IFLA_BOND_NS_IP6_TARGET,
|
IFLA_BOND_NS_IP6_TARGET,
|
||||||
IFLA_BOND_COUPLED_CONTROL,
|
IFLA_BOND_COUPLED_CONTROL,
|
||||||
|
IFLA_BOND_BROADCAST_NEIGH,
|
||||||
__IFLA_BOND_MAX,
|
__IFLA_BOND_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -93,6 +93,15 @@
|
|||||||
#define TUN_F_USO4 0x20 /* I can handle USO for IPv4 packets */
|
#define TUN_F_USO4 0x20 /* I can handle USO for IPv4 packets */
|
||||||
#define TUN_F_USO6 0x40 /* I can handle USO for IPv6 packets */
|
#define TUN_F_USO6 0x40 /* I can handle USO for IPv6 packets */
|
||||||
|
|
||||||
|
/* I can handle TSO/USO for UDP tunneled packets */
|
||||||
|
#define TUN_F_UDP_TUNNEL_GSO 0x080
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I can handle TSO/USO for UDP tunneled packets requiring csum offload for
|
||||||
|
* the outer header
|
||||||
|
*/
|
||||||
|
#define TUN_F_UDP_TUNNEL_GSO_CSUM 0x100
|
||||||
|
|
||||||
/* Protocol info prepended to the packets (when IFF_NO_PI is not set) */
|
/* Protocol info prepended to the packets (when IFF_NO_PI is not set) */
|
||||||
#define TUN_PKT_STRIP 0x0001
|
#define TUN_PKT_STRIP 0x0001
|
||||||
struct tun_pi {
|
struct tun_pi {
|
||||||
|
@ -152,7 +152,6 @@ struct in6_flowlabel_req {
|
|||||||
/*
|
/*
|
||||||
* IPV6 socket options
|
* IPV6 socket options
|
||||||
*/
|
*/
|
||||||
#if __UAPI_DEF_IPV6_OPTIONS
|
|
||||||
#define IPV6_ADDRFORM 1
|
#define IPV6_ADDRFORM 1
|
||||||
#define IPV6_2292PKTINFO 2
|
#define IPV6_2292PKTINFO 2
|
||||||
#define IPV6_2292HOPOPTS 3
|
#define IPV6_2292HOPOPTS 3
|
||||||
@ -169,8 +168,10 @@ struct in6_flowlabel_req {
|
|||||||
#define IPV6_MULTICAST_IF 17
|
#define IPV6_MULTICAST_IF 17
|
||||||
#define IPV6_MULTICAST_HOPS 18
|
#define IPV6_MULTICAST_HOPS 18
|
||||||
#define IPV6_MULTICAST_LOOP 19
|
#define IPV6_MULTICAST_LOOP 19
|
||||||
|
#if __UAPI_DEF_IPV6_OPTIONS
|
||||||
#define IPV6_ADD_MEMBERSHIP 20
|
#define IPV6_ADD_MEMBERSHIP 20
|
||||||
#define IPV6_DROP_MEMBERSHIP 21
|
#define IPV6_DROP_MEMBERSHIP 21
|
||||||
|
#endif
|
||||||
#define IPV6_ROUTER_ALERT 22
|
#define IPV6_ROUTER_ALERT 22
|
||||||
#define IPV6_MTU_DISCOVER 23
|
#define IPV6_MTU_DISCOVER 23
|
||||||
#define IPV6_MTU 24
|
#define IPV6_MTU 24
|
||||||
@ -203,7 +204,6 @@ struct in6_flowlabel_req {
|
|||||||
#define IPV6_IPSEC_POLICY 34
|
#define IPV6_IPSEC_POLICY 34
|
||||||
#define IPV6_XFRM_POLICY 35
|
#define IPV6_XFRM_POLICY 35
|
||||||
#define IPV6_HDRINCL 36
|
#define IPV6_HDRINCL 36
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Multicast:
|
* Multicast:
|
||||||
|
@ -601,6 +601,11 @@
|
|||||||
#define BTN_DPAD_LEFT 0x222
|
#define BTN_DPAD_LEFT 0x222
|
||||||
#define BTN_DPAD_RIGHT 0x223
|
#define BTN_DPAD_RIGHT 0x223
|
||||||
|
|
||||||
|
#define BTN_GRIPL 0x224
|
||||||
|
#define BTN_GRIPR 0x225
|
||||||
|
#define BTN_GRIPL2 0x226
|
||||||
|
#define BTN_GRIPR2 0x227
|
||||||
|
|
||||||
#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
|
#define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */
|
||||||
#define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */
|
#define KEY_ROTATE_LOCK_TOGGLE 0x231 /* Display rotation lock */
|
||||||
#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */
|
#define KEY_REFRESH_RATE_TOGGLE 0x232 /* Display refresh rate toggle */
|
||||||
@ -765,6 +770,9 @@
|
|||||||
#define KEY_KBD_LCD_MENU4 0x2bb
|
#define KEY_KBD_LCD_MENU4 0x2bb
|
||||||
#define KEY_KBD_LCD_MENU5 0x2bc
|
#define KEY_KBD_LCD_MENU5 0x2bc
|
||||||
|
|
||||||
|
/* Performance Boost key (Alienware)/G-Mode key (Dell) */
|
||||||
|
#define KEY_PERFORMANCE 0x2bd
|
||||||
|
|
||||||
#define BTN_TRIGGER_HAPPY 0x2c0
|
#define BTN_TRIGGER_HAPPY 0x2c0
|
||||||
#define BTN_TRIGGER_HAPPY1 0x2c0
|
#define BTN_TRIGGER_HAPPY1 0x2c0
|
||||||
#define BTN_TRIGGER_HAPPY2 0x2c1
|
#define BTN_TRIGGER_HAPPY2 0x2c1
|
||||||
|
@ -273,6 +273,7 @@ struct input_mask {
|
|||||||
#define BUS_CEC 0x1E
|
#define BUS_CEC 0x1E
|
||||||
#define BUS_INTEL_ISHTP 0x1F
|
#define BUS_INTEL_ISHTP 0x1F
|
||||||
#define BUS_AMD_SFH 0x20
|
#define BUS_AMD_SFH 0x20
|
||||||
|
#define BUS_SDW 0x21
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MT_TOOL types
|
* MT_TOOL types
|
||||||
|
@ -199,6 +199,7 @@ enum {
|
|||||||
DEVCONF_NDISC_EVICT_NOCARRIER,
|
DEVCONF_NDISC_EVICT_NOCARRIER,
|
||||||
DEVCONF_ACCEPT_UNTRACKED_NA,
|
DEVCONF_ACCEPT_UNTRACKED_NA,
|
||||||
DEVCONF_ACCEPT_RA_MIN_LFT,
|
DEVCONF_ACCEPT_RA_MIN_LFT,
|
||||||
|
DEVCONF_FORCE_FORWARDING,
|
||||||
DEVCONF_MAX
|
DEVCONF_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ enum {
|
|||||||
/* Extended flags under NDA_FLAGS_EXT: */
|
/* Extended flags under NDA_FLAGS_EXT: */
|
||||||
#define NTF_EXT_MANAGED (1 << 0)
|
#define NTF_EXT_MANAGED (1 << 0)
|
||||||
#define NTF_EXT_LOCKED (1 << 1)
|
#define NTF_EXT_LOCKED (1 << 1)
|
||||||
|
#define NTF_EXT_EXT_VALIDATED (1 << 2)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Neighbor Cache Entry States.
|
* Neighbor Cache Entry States.
|
||||||
@ -92,6 +93,10 @@ enum {
|
|||||||
* bridge in response to a host trying to communicate via a locked bridge port
|
* bridge in response to a host trying to communicate via a locked bridge port
|
||||||
* with MAB enabled. Their purpose is to notify user space that a host requires
|
* with MAB enabled. Their purpose is to notify user space that a host requires
|
||||||
* authentication.
|
* authentication.
|
||||||
|
*
|
||||||
|
* NTF_EXT_EXT_VALIDATED flagged neighbor entries were externally validated by
|
||||||
|
* a user space control plane. The kernel will not remove or invalidate them,
|
||||||
|
* but it can probe them and notify user space when they become reachable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct nda_cacheinfo {
|
struct nda_cacheinfo {
|
||||||
|
@ -1330,7 +1330,15 @@
|
|||||||
* TID to Link mapping for downlink/uplink traffic.
|
* TID to Link mapping for downlink/uplink traffic.
|
||||||
*
|
*
|
||||||
* @NL80211_CMD_ASSOC_MLO_RECONF: For a non-AP MLD station, request to
|
* @NL80211_CMD_ASSOC_MLO_RECONF: For a non-AP MLD station, request to
|
||||||
* add/remove links to/from the association.
|
* add/remove links to/from the association. To indicate link
|
||||||
|
* reconfiguration request results from the driver, this command is also
|
||||||
|
* used as an event to notify userspace about the added links information.
|
||||||
|
* For notifying the removed links information, the existing
|
||||||
|
* %NL80211_CMD_LINKS_REMOVED command is used. This command is also used to
|
||||||
|
* notify userspace about newly added links for the current connection in
|
||||||
|
* case of AP-initiated link recommendation requests, received via
|
||||||
|
* a BTM (BSS Transition Management) request or a link reconfig notify
|
||||||
|
* frame, where the driver handles the link recommendation offload.
|
||||||
*
|
*
|
||||||
* @NL80211_CMD_EPCS_CFG: EPCS configuration for a station. Used by userland to
|
* @NL80211_CMD_EPCS_CFG: EPCS configuration for a station. Used by userland to
|
||||||
* control EPCS configuration. Used to notify userland on the current state
|
* control EPCS configuration. Used to notify userland on the current state
|
||||||
@ -2899,6 +2907,27 @@ enum nl80211_commands {
|
|||||||
* APs Support". Drivers may set additional flags that they support
|
* APs Support". Drivers may set additional flags that they support
|
||||||
* in the kernel or device.
|
* in the kernel or device.
|
||||||
*
|
*
|
||||||
|
* @NL80211_ATTR_WIPHY_RADIO_INDEX: (int) Integer attribute denoting the index
|
||||||
|
* of the radio in interest. Internally a value of -1 is used to
|
||||||
|
* indicate that the radio id is not given in user-space. This means
|
||||||
|
* that all the attributes are applicable to all the radios. If there is
|
||||||
|
* a radio index provided in user-space, the attributes will be
|
||||||
|
* applicable to that specific radio only. If the radio id is greater
|
||||||
|
* thank the number of radios, error denoting invalid value is returned.
|
||||||
|
*
|
||||||
|
* @NL80211_ATTR_S1G_LONG_BEACON_PERIOD: (u8) Integer attribute that represents
|
||||||
|
* the number of beacon intervals between each long beacon transmission
|
||||||
|
* for an S1G BSS with short beaconing enabled. This is a required
|
||||||
|
* attribute for initialising an S1G short beaconing BSS. When updating
|
||||||
|
* the short beacon data, this is not required. It has a minimum value of
|
||||||
|
* 2 (i.e 2 beacon intervals).
|
||||||
|
*
|
||||||
|
* @NL80211_ATTR_S1G_SHORT_BEACON: Nested attribute containing the short beacon
|
||||||
|
* head and tail used to set or update the short beacon templates. When
|
||||||
|
* bringing up a new interface, %NL80211_ATTR_S1G_LONG_BEACON_PERIOD is
|
||||||
|
* required alongside this attribute. Refer to
|
||||||
|
* @enum nl80211_s1g_short_beacon_attrs for the attribute definitions.
|
||||||
|
*
|
||||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||||
@ -3456,6 +3485,11 @@ enum nl80211_attrs {
|
|||||||
|
|
||||||
NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
|
NL80211_ATTR_ASSOC_MLD_EXT_CAPA_OPS,
|
||||||
|
|
||||||
|
NL80211_ATTR_WIPHY_RADIO_INDEX,
|
||||||
|
|
||||||
|
NL80211_ATTR_S1G_LONG_BEACON_PERIOD,
|
||||||
|
NL80211_ATTR_S1G_SHORT_BEACON,
|
||||||
|
|
||||||
/* add attributes here, update the policy in nl80211.c */
|
/* add attributes here, update the policy in nl80211.c */
|
||||||
|
|
||||||
__NL80211_ATTR_AFTER_LAST,
|
__NL80211_ATTR_AFTER_LAST,
|
||||||
@ -8088,6 +8122,7 @@ enum nl80211_ap_settings_flags {
|
|||||||
* and contains attributes defined in &enum nl80211_if_combination_attrs.
|
* and contains attributes defined in &enum nl80211_if_combination_attrs.
|
||||||
* @NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK: bitmask (u32) of antennas
|
* @NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK: bitmask (u32) of antennas
|
||||||
* connected to this radio.
|
* connected to this radio.
|
||||||
|
* @NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD: RTS threshold (u32) of this radio.
|
||||||
*
|
*
|
||||||
* @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal
|
* @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal
|
||||||
* @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute
|
* @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute
|
||||||
@ -8099,6 +8134,7 @@ enum nl80211_wiphy_radio_attrs {
|
|||||||
NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE,
|
NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE,
|
||||||
NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION,
|
NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION,
|
||||||
NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK,
|
NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK,
|
||||||
|
NL80211_WIPHY_RADIO_ATTR_RTS_THRESHOLD,
|
||||||
|
|
||||||
/* keep last */
|
/* keep last */
|
||||||
__NL80211_WIPHY_RADIO_ATTR_LAST,
|
__NL80211_WIPHY_RADIO_ATTR_LAST,
|
||||||
@ -8128,4 +8164,27 @@ enum nl80211_wiphy_radio_freq_range {
|
|||||||
NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1,
|
NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum nl80211_s1g_short_beacon_attrs - S1G short beacon data
|
||||||
|
*
|
||||||
|
* @__NL80211_S1G_SHORT_BEACON_ATTR_INVALID: Invalid
|
||||||
|
*
|
||||||
|
* @NL80211_S1G_SHORT_BEACON_ATTR_HEAD: Short beacon head (binary).
|
||||||
|
* @NL80211_S1G_SHORT_BEACON_ATTR_TAIL: Short beacon tail (binary).
|
||||||
|
*
|
||||||
|
* @__NL80211_S1G_SHORT_BEACON_ATTR_LAST: Internal
|
||||||
|
* @NL80211_S1G_SHORT_BEACON_ATTR_MAX: Highest attribute
|
||||||
|
*/
|
||||||
|
enum nl80211_s1g_short_beacon_attrs {
|
||||||
|
__NL80211_S1G_SHORT_BEACON_ATTR_INVALID,
|
||||||
|
|
||||||
|
NL80211_S1G_SHORT_BEACON_ATTR_HEAD,
|
||||||
|
NL80211_S1G_SHORT_BEACON_ATTR_TAIL,
|
||||||
|
|
||||||
|
/* keep last */
|
||||||
|
__NL80211_S1G_SHORT_BEACON_ATTR_LAST,
|
||||||
|
NL80211_S1G_SHORT_BEACON_ATTR_MAX =
|
||||||
|
__NL80211_S1G_SHORT_BEACON_ATTR_LAST - 1
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* __LINUX_NL80211_H */
|
#endif /* __LINUX_NL80211_H */
|
||||||
|
@ -1211,4 +1211,72 @@ enum {
|
|||||||
|
|
||||||
#define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
|
#define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
|
||||||
|
|
||||||
|
/* DUALPI2 */
|
||||||
|
enum tc_dualpi2_drop_overload {
|
||||||
|
TC_DUALPI2_DROP_OVERLOAD_OVERFLOW = 0,
|
||||||
|
TC_DUALPI2_DROP_OVERLOAD_DROP = 1,
|
||||||
|
__TCA_DUALPI2_DROP_OVERLOAD_MAX,
|
||||||
|
};
|
||||||
|
#define TCA_DUALPI2_DROP_OVERLOAD_MAX (__TCA_DUALPI2_DROP_OVERLOAD_MAX - 1)
|
||||||
|
|
||||||
|
enum tc_dualpi2_drop_early {
|
||||||
|
TC_DUALPI2_DROP_EARLY_DROP_DEQUEUE = 0,
|
||||||
|
TC_DUALPI2_DROP_EARLY_DROP_ENQUEUE = 1,
|
||||||
|
__TCA_DUALPI2_DROP_EARLY_MAX,
|
||||||
|
};
|
||||||
|
#define TCA_DUALPI2_DROP_EARLY_MAX (__TCA_DUALPI2_DROP_EARLY_MAX - 1)
|
||||||
|
|
||||||
|
enum tc_dualpi2_ecn_mask {
|
||||||
|
TC_DUALPI2_ECN_MASK_L4S_ECT = 1,
|
||||||
|
TC_DUALPI2_ECN_MASK_CLA_ECT = 2,
|
||||||
|
TC_DUALPI2_ECN_MASK_ANY_ECT = 3,
|
||||||
|
__TCA_DUALPI2_ECN_MASK_MAX,
|
||||||
|
};
|
||||||
|
#define TCA_DUALPI2_ECN_MASK_MAX (__TCA_DUALPI2_ECN_MASK_MAX - 1)
|
||||||
|
|
||||||
|
enum tc_dualpi2_split_gso {
|
||||||
|
TC_DUALPI2_SPLIT_GSO_NO_SPLIT_GSO = 0,
|
||||||
|
TC_DUALPI2_SPLIT_GSO_SPLIT_GSO = 1,
|
||||||
|
__TCA_DUALPI2_SPLIT_GSO_MAX,
|
||||||
|
};
|
||||||
|
#define TCA_DUALPI2_SPLIT_GSO_MAX (__TCA_DUALPI2_SPLIT_GSO_MAX - 1)
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TCA_DUALPI2_UNSPEC,
|
||||||
|
TCA_DUALPI2_LIMIT, /* Packets */
|
||||||
|
TCA_DUALPI2_MEMORY_LIMIT, /* Bytes */
|
||||||
|
TCA_DUALPI2_TARGET, /* us */
|
||||||
|
TCA_DUALPI2_TUPDATE, /* us */
|
||||||
|
TCA_DUALPI2_ALPHA, /* Hz scaled up by 256 */
|
||||||
|
TCA_DUALPI2_BETA, /* Hz scaled up by 256 */
|
||||||
|
TCA_DUALPI2_STEP_THRESH_PKTS, /* Step threshold in packets */
|
||||||
|
TCA_DUALPI2_STEP_THRESH_US, /* Step threshold in microseconds */
|
||||||
|
TCA_DUALPI2_MIN_QLEN_STEP, /* Minimum qlen to apply STEP_THRESH */
|
||||||
|
TCA_DUALPI2_COUPLING, /* Coupling factor between queues */
|
||||||
|
TCA_DUALPI2_DROP_OVERLOAD, /* Whether to drop on overload */
|
||||||
|
TCA_DUALPI2_DROP_EARLY, /* Whether to drop on enqueue */
|
||||||
|
TCA_DUALPI2_C_PROTECTION, /* Percentage */
|
||||||
|
TCA_DUALPI2_ECN_MASK, /* L4S queue classification mask */
|
||||||
|
TCA_DUALPI2_SPLIT_GSO, /* Split GSO packets at enqueue */
|
||||||
|
TCA_DUALPI2_PAD,
|
||||||
|
__TCA_DUALPI2_MAX
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TCA_DUALPI2_MAX (__TCA_DUALPI2_MAX - 1)
|
||||||
|
|
||||||
|
struct tc_dualpi2_xstats {
|
||||||
|
__u32 prob; /* current probability */
|
||||||
|
__u32 delay_c; /* current delay in C queue */
|
||||||
|
__u32 delay_l; /* current delay in L queue */
|
||||||
|
__u32 packets_in_c; /* number of packets enqueued in C queue */
|
||||||
|
__u32 packets_in_l; /* number of packets enqueued in L queue */
|
||||||
|
__u32 maxq; /* maximum queue size */
|
||||||
|
__u32 ecn_mark; /* packets marked with ecn*/
|
||||||
|
__u32 step_marks; /* ECN marks due to the step AQM */
|
||||||
|
__s32 credit; /* current c_protection credit */
|
||||||
|
__u32 memory_used; /* Memory used by both queues */
|
||||||
|
__u32 max_memory_used; /* Maximum used memory */
|
||||||
|
__u32 memory_limit; /* Memory limit of both queues */
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -244,6 +244,8 @@ struct prctl_mm_map {
|
|||||||
# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
|
# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
|
||||||
/* Unused; kept only for source compatibility */
|
/* Unused; kept only for source compatibility */
|
||||||
# define PR_MTE_TCF_SHIFT 1
|
# define PR_MTE_TCF_SHIFT 1
|
||||||
|
/* MTE tag check store only */
|
||||||
|
# define PR_MTE_STORE_ONLY (1UL << 19)
|
||||||
/* RISC-V pointer masking tag length */
|
/* RISC-V pointer masking tag length */
|
||||||
# define PR_PMLEN_SHIFT 24
|
# define PR_PMLEN_SHIFT 24
|
||||||
# define PR_PMLEN_MASK (0x7fUL << PR_PMLEN_SHIFT)
|
# define PR_PMLEN_MASK (0x7fUL << PR_PMLEN_SHIFT)
|
||||||
@ -255,7 +257,12 @@ struct prctl_mm_map {
|
|||||||
/* Dispatch syscalls to a userspace handler */
|
/* Dispatch syscalls to a userspace handler */
|
||||||
#define PR_SET_SYSCALL_USER_DISPATCH 59
|
#define PR_SET_SYSCALL_USER_DISPATCH 59
|
||||||
# define PR_SYS_DISPATCH_OFF 0
|
# define PR_SYS_DISPATCH_OFF 0
|
||||||
# define PR_SYS_DISPATCH_ON 1
|
/* Enable dispatch except for the specified range */
|
||||||
|
# define PR_SYS_DISPATCH_EXCLUSIVE_ON 1
|
||||||
|
/* Enable dispatch for the specified range */
|
||||||
|
# define PR_SYS_DISPATCH_INCLUSIVE_ON 2
|
||||||
|
/* Legacy name for backwards compatibility */
|
||||||
|
# define PR_SYS_DISPATCH_ON PR_SYS_DISPATCH_EXCLUSIVE_ON
|
||||||
/* The control values for the user space selector when dispatch is enabled */
|
/* The control values for the user space selector when dispatch is enabled */
|
||||||
# define SYSCALL_DISPATCH_FILTER_ALLOW 0
|
# define SYSCALL_DISPATCH_FILTER_ALLOW 0
|
||||||
# define SYSCALL_DISPATCH_FILTER_BLOCK 1
|
# define SYSCALL_DISPATCH_FILTER_BLOCK 1
|
||||||
@ -367,8 +374,6 @@ struct prctl_mm_map {
|
|||||||
/* FUTEX hash management */
|
/* FUTEX hash management */
|
||||||
#define PR_FUTEX_HASH 78
|
#define PR_FUTEX_HASH 78
|
||||||
# define PR_FUTEX_HASH_SET_SLOTS 1
|
# define PR_FUTEX_HASH_SET_SLOTS 1
|
||||||
# define FH_FLAG_IMMUTABLE (1ULL << 0)
|
|
||||||
# define PR_FUTEX_HASH_GET_SLOTS 2
|
# define PR_FUTEX_HASH_GET_SLOTS 2
|
||||||
# define PR_FUTEX_HASH_GET_IMMUTABLE 3
|
|
||||||
|
|
||||||
#endif /* _LINUX_PRCTL_H */
|
#endif /* _LINUX_PRCTL_H */
|
||||||
|
@ -4480,9 +4480,18 @@ static int make_policy(bool force, RecoveryPinMode recovery_pin_mode) {
|
|||||||
if (DEBUG_LOGGING)
|
if (DEBUG_LOGGING)
|
||||||
(void) sd_json_variant_dump(new_prediction_json, SD_JSON_FORMAT_PRETTY_AUTO|SD_JSON_FORMAT_COLOR_AUTO, stderr, NULL);
|
(void) sd_json_variant_dump(new_prediction_json, SD_JSON_FORMAT_PRETTY_AUTO|SD_JSON_FORMAT_COLOR_AUTO, stderr, NULL);
|
||||||
|
|
||||||
_cleanup_(tpm2_pcrlock_policy_done) Tpm2PCRLockPolicy old_policy = {};
|
/* v257 and older mistakenly used --pcrlock= for the path. To keep backward compatibility, let's fallback to it when
|
||||||
|
* --policy= is unspecified but --pcrlock is specified. */
|
||||||
|
if (!arg_policy_path && arg_pcrlock_path) {
|
||||||
|
log_notice("Specified --pcrlock= option for make-policy command. Please use --policy= instead.");
|
||||||
|
|
||||||
r = tpm2_pcrlock_policy_load(arg_pcrlock_path, &old_policy);
|
arg_policy_path = strdup(arg_pcrlock_path);
|
||||||
|
if (!arg_policy_path)
|
||||||
|
return log_oom();
|
||||||
|
}
|
||||||
|
|
||||||
|
_cleanup_(tpm2_pcrlock_policy_done) Tpm2PCRLockPolicy old_policy = {};
|
||||||
|
r = tpm2_pcrlock_policy_load(arg_policy_path, &old_policy);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
@ -4825,12 +4834,12 @@ static int make_policy(bool force, RecoveryPinMode recovery_pin_mode) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to format new configuration to JSON: %m");
|
return log_error_errno(r, "Failed to format new configuration to JSON: %m");
|
||||||
|
|
||||||
const char *path = arg_pcrlock_path ?: (in_initrd() ? "/run/systemd/pcrlock.json" : "/var/lib/systemd/pcrlock.json");
|
const char *path = arg_policy_path ?: (in_initrd() ? "/run/systemd/pcrlock.json" : "/var/lib/systemd/pcrlock.json");
|
||||||
r = write_string_file(path, text, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC|WRITE_STRING_FILE_SYNC|WRITE_STRING_FILE_MKDIR_0755);
|
r = write_string_file(path, text, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC|WRITE_STRING_FILE_SYNC|WRITE_STRING_FILE_MKDIR_0755);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to write new configuration to '%s': %m", path);
|
return log_error_errno(r, "Failed to write new configuration to '%s': %m", path);
|
||||||
|
|
||||||
if (!arg_pcrlock_path && !in_initrd()) {
|
if (!arg_policy_path && !in_initrd()) {
|
||||||
r = remove_policy_file("/run/systemd/pcrlock.json");
|
r = remove_policy_file("/run/systemd/pcrlock.json");
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user