aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-08-20 12:05:17 -0400
committerJiri Kosina <jkosina@suse.cz>2018-08-20 12:05:17 -0400
commit415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch)
tree47492d2386a0e7f00ef645313cb44ae4960b7e7e /include/uapi/linux
parent4f65245f2d178b9cba48350620d76faa4a098841 (diff)
parentb8e759b8f6dab1c473c30ac12709095d0b81078e (diff)
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/aio_abi.h8
-rw-r--r--include/uapi/linux/bpf.h28
-rw-r--r--include/uapi/linux/if_xdp.h4
-rw-r--r--include/uapi/linux/kvm.h5
-rw-r--r--include/uapi/linux/nbd.h3
-rw-r--r--include/uapi/linux/ncp.h202
-rw-r--r--include/uapi/linux/ncp_fs.h147
-rw-r--r--include/uapi/linux/ncp_mount.h72
-rw-r--r--include/uapi/linux/ncp_no.h20
-rw-r--r--include/uapi/linux/netfilter/nf_conntrack_common.h2
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h30
-rw-r--r--include/uapi/linux/nl80211.h28
-rw-r--r--include/uapi/linux/prctl.h2
-rw-r--r--include/uapi/linux/rpmsg.h9
-rw-r--r--include/uapi/linux/rseq.h133
-rw-r--r--include/uapi/linux/target_core_user.h15
-rw-r--r--include/uapi/linux/types_32_64.h50
-rw-r--r--include/uapi/linux/usb/audio.h8
-rw-r--r--include/uapi/linux/virtio_config.h16
19 files changed, 290 insertions, 492 deletions
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
index 75846164290e..3c5038b587ba 100644
--- a/include/uapi/linux/aio_abi.h
+++ b/include/uapi/linux/aio_abi.h
@@ -39,8 +39,10 @@ enum {
39 IOCB_CMD_PWRITE = 1, 39 IOCB_CMD_PWRITE = 1,
40 IOCB_CMD_FSYNC = 2, 40 IOCB_CMD_FSYNC = 2,
41 IOCB_CMD_FDSYNC = 3, 41 IOCB_CMD_FDSYNC = 3,
42 /* 4 was the experimental IOCB_CMD_PREADX */ 42 /* These two are experimental.
43 IOCB_CMD_POLL = 5, 43 * IOCB_CMD_PREADX = 4,
44 * IOCB_CMD_POLL = 5,
45 */
44 IOCB_CMD_NOOP = 6, 46 IOCB_CMD_NOOP = 6,
45 IOCB_CMD_PREADV = 7, 47 IOCB_CMD_PREADV = 7,
46 IOCB_CMD_PWRITEV = 8, 48 IOCB_CMD_PWRITEV = 8,
@@ -109,7 +111,7 @@ struct iocb {
109#undef IFLITTLE 111#undef IFLITTLE
110 112
111struct __aio_sigset { 113struct __aio_sigset {
112 sigset_t __user *sigmask; 114 const sigset_t __user *sigmask;
113 size_t sigsetsize; 115 size_t sigsetsize;
114}; 116};
115 117
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 59b19b6a40d7..b7db3261c62d 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1857,7 +1857,8 @@ union bpf_attr {
1857 * is resolved), the nexthop address is returned in ipv4_dst 1857 * is resolved), the nexthop address is returned in ipv4_dst
1858 * or ipv6_dst based on family, smac is set to mac address of 1858 * or ipv6_dst based on family, smac is set to mac address of
1859 * egress device, dmac is set to nexthop mac address, rt_metric 1859 * egress device, dmac is set to nexthop mac address, rt_metric
1860 * is set to metric from route (IPv4/IPv6 only). 1860 * is set to metric from route (IPv4/IPv6 only), and ifindex
1861 * is set to the device index of the nexthop from the FIB lookup.
1861 * 1862 *
1862 * *plen* argument is the size of the passed in struct. 1863 * *plen* argument is the size of the passed in struct.
1863 * *flags* argument can be a combination of one or more of the 1864 * *flags* argument can be a combination of one or more of the
@@ -1873,9 +1874,10 @@ union bpf_attr {
1873 * *ctx* is either **struct xdp_md** for XDP programs or 1874 * *ctx* is either **struct xdp_md** for XDP programs or
1874 * **struct sk_buff** tc cls_act programs. 1875 * **struct sk_buff** tc cls_act programs.
1875 * Return 1876 * Return
1876 * Egress device index on success, 0 if packet needs to continue 1877 * * < 0 if any input argument is invalid
1877 * up the stack for further processing or a negative error in case 1878 * * 0 on success (packet is forwarded, nexthop neighbor exists)
1878 * of failure. 1879 * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
1880 * * packet is not forwarded or needs assist from full stack
1879 * 1881 *
1880 * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) 1882 * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags)
1881 * Description 1883 * Description
@@ -2612,6 +2614,18 @@ struct bpf_raw_tracepoint_args {
2612#define BPF_FIB_LOOKUP_DIRECT BIT(0) 2614#define BPF_FIB_LOOKUP_DIRECT BIT(0)
2613#define BPF_FIB_LOOKUP_OUTPUT BIT(1) 2615#define BPF_FIB_LOOKUP_OUTPUT BIT(1)
2614 2616
2617enum {
2618 BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */
2619 BPF_FIB_LKUP_RET_BLACKHOLE, /* dest is blackholed; can be dropped */
2620 BPF_FIB_LKUP_RET_UNREACHABLE, /* dest is unreachable; can be dropped */
2621 BPF_FIB_LKUP_RET_PROHIBIT, /* dest not allowed; can be dropped */
2622 BPF_FIB_LKUP_RET_NOT_FWDED, /* packet is not forwarded */
2623 BPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */
2624 BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */
2625 BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */
2626 BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */
2627};
2628
2615struct bpf_fib_lookup { 2629struct bpf_fib_lookup {
2616 /* input: network family for lookup (AF_INET, AF_INET6) 2630 /* input: network family for lookup (AF_INET, AF_INET6)
2617 * output: network family of egress nexthop 2631 * output: network family of egress nexthop
@@ -2625,7 +2639,11 @@ struct bpf_fib_lookup {
2625 2639
2626 /* total length of packet from network header - used for MTU check */ 2640 /* total length of packet from network header - used for MTU check */
2627 __u16 tot_len; 2641 __u16 tot_len;
2628 __u32 ifindex; /* L3 device index for lookup */ 2642
2643 /* input: L3 device index for lookup
2644 * output: device index from FIB lookup
2645 */
2646 __u32 ifindex;
2629 2647
2630 union { 2648 union {
2631 /* inputs to lookup */ 2649 /* inputs to lookup */
diff --git a/include/uapi/linux/if_xdp.h b/include/uapi/linux/if_xdp.h
index 1fa0e977ea8d..caed8b1614ff 100644
--- a/include/uapi/linux/if_xdp.h
+++ b/include/uapi/linux/if_xdp.h
@@ -63,8 +63,8 @@ struct xdp_statistics {
63/* Pgoff for mmaping the rings */ 63/* Pgoff for mmaping the rings */
64#define XDP_PGOFF_RX_RING 0 64#define XDP_PGOFF_RX_RING 0
65#define XDP_PGOFF_TX_RING 0x80000000 65#define XDP_PGOFF_TX_RING 0x80000000
66#define XDP_UMEM_PGOFF_FILL_RING 0x100000000 66#define XDP_UMEM_PGOFF_FILL_RING 0x100000000ULL
67#define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000 67#define XDP_UMEM_PGOFF_COMPLETION_RING 0x180000000ULL
68 68
69/* Rx/Tx descriptor */ 69/* Rx/Tx descriptor */
70struct xdp_desc { 70struct xdp_desc {
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index b02c41e53d56..b6270a3b38e9 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -677,10 +677,10 @@ struct kvm_ioeventfd {
677}; 677};
678 678
679#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) 679#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
680#define KVM_X86_DISABLE_EXITS_HTL (1 << 1) 680#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
681#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) 681#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
682#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ 682#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
683 KVM_X86_DISABLE_EXITS_HTL | \ 683 KVM_X86_DISABLE_EXITS_HLT | \
684 KVM_X86_DISABLE_EXITS_PAUSE) 684 KVM_X86_DISABLE_EXITS_PAUSE)
685 685
686/* for KVM_ENABLE_CAP */ 686/* for KVM_ENABLE_CAP */
@@ -948,6 +948,7 @@ struct kvm_ppc_resize_hpt {
948#define KVM_CAP_S390_BPB 152 948#define KVM_CAP_S390_BPB 152
949#define KVM_CAP_GET_MSR_FEATURES 153 949#define KVM_CAP_GET_MSR_FEATURES 153
950#define KVM_CAP_HYPERV_EVENTFD 154 950#define KVM_CAP_HYPERV_EVENTFD 154
951#define KVM_CAP_HYPERV_TLBFLUSH 155
951 952
952#ifdef KVM_CAP_IRQ_ROUTING 953#ifdef KVM_CAP_IRQ_ROUTING
953 954
diff --git a/include/uapi/linux/nbd.h b/include/uapi/linux/nbd.h
index 85a3fb65e40a..20d6cc91435d 100644
--- a/include/uapi/linux/nbd.h
+++ b/include/uapi/linux/nbd.h
@@ -53,6 +53,9 @@ enum {
53/* These are client behavior specific flags. */ 53/* These are client behavior specific flags. */
54#define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on 54#define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on
55 disconnect. */ 55 disconnect. */
56#define NBD_CFLAG_DISCONNECT_ON_CLOSE (1 << 1) /* disconnect the nbd device on
57 * close by last opener.
58 */
56 59
57/* userspace doesn't need the nbd_device structure */ 60/* userspace doesn't need the nbd_device structure */
58 61
diff --git a/include/uapi/linux/ncp.h b/include/uapi/linux/ncp.h
deleted file mode 100644
index ca6f3d42c88f..000000000000
--- a/include/uapi/linux/ncp.h
+++ /dev/null
@@ -1,202 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * ncp.h
4 *
5 * Copyright (C) 1995 by Volker Lendecke
6 * Modified for sparc by J.F. Chadima
7 * Modified for __constant_ntoh by Frank A. Vorstenbosch
8 *
9 */
10
11#ifndef _LINUX_NCP_H
12#define _LINUX_NCP_H
13
14#include <linux/types.h>
15
16#define NCP_PTYPE (0x11)
17#define NCP_PORT (0x0451)
18
19#define NCP_ALLOC_SLOT_REQUEST (0x1111)
20#define NCP_REQUEST (0x2222)
21#define NCP_DEALLOC_SLOT_REQUEST (0x5555)
22
23struct ncp_request_header {
24 __u16 type;
25 __u8 sequence;
26 __u8 conn_low;
27 __u8 task;
28 __u8 conn_high;
29 __u8 function;
30 __u8 data[0];
31} __attribute__((packed));
32
33#define NCP_REPLY (0x3333)
34#define NCP_WATCHDOG (0x3E3E)
35#define NCP_POSITIVE_ACK (0x9999)
36
37struct ncp_reply_header {
38 __u16 type;
39 __u8 sequence;
40 __u8 conn_low;
41 __u8 task;
42 __u8 conn_high;
43 __u8 completion_code;
44 __u8 connection_state;
45 __u8 data[0];
46} __attribute__((packed));
47
48#define NCP_VOLNAME_LEN (16)
49#define NCP_NUMBER_OF_VOLUMES (256)
50struct ncp_volume_info {
51 __u32 total_blocks;
52 __u32 free_blocks;
53 __u32 purgeable_blocks;
54 __u32 not_yet_purgeable_blocks;
55 __u32 total_dir_entries;
56 __u32 available_dir_entries;
57 __u8 sectors_per_block;
58 char volume_name[NCP_VOLNAME_LEN + 1];
59};
60
61#define AR_READ (cpu_to_le16(1))
62#define AR_WRITE (cpu_to_le16(2))
63#define AR_EXCLUSIVE (cpu_to_le16(0x20))
64
65#define NCP_FILE_ID_LEN 6
66
67/* Defines for Name Spaces */
68#define NW_NS_DOS 0
69#define NW_NS_MAC 1
70#define NW_NS_NFS 2
71#define NW_NS_FTAM 3
72#define NW_NS_OS2 4
73
74/* Defines for ReturnInformationMask */
75#define RIM_NAME (cpu_to_le32(1))
76#define RIM_SPACE_ALLOCATED (cpu_to_le32(2))
77#define RIM_ATTRIBUTES (cpu_to_le32(4))
78#define RIM_DATA_SIZE (cpu_to_le32(8))
79#define RIM_TOTAL_SIZE (cpu_to_le32(0x10))
80#define RIM_EXT_ATTR_INFO (cpu_to_le32(0x20))
81#define RIM_ARCHIVE (cpu_to_le32(0x40))
82#define RIM_MODIFY (cpu_to_le32(0x80))
83#define RIM_CREATION (cpu_to_le32(0x100))
84#define RIM_OWNING_NAMESPACE (cpu_to_le32(0x200))
85#define RIM_DIRECTORY (cpu_to_le32(0x400))
86#define RIM_RIGHTS (cpu_to_le32(0x800))
87#define RIM_ALL (cpu_to_le32(0xFFF))
88#define RIM_COMPRESSED_INFO (cpu_to_le32(0x80000000))
89
90/* Defines for NSInfoBitMask */
91#define NSIBM_NFS_NAME 0x0001
92#define NSIBM_NFS_MODE 0x0002
93#define NSIBM_NFS_GID 0x0004
94#define NSIBM_NFS_NLINKS 0x0008
95#define NSIBM_NFS_RDEV 0x0010
96#define NSIBM_NFS_LINK 0x0020
97#define NSIBM_NFS_CREATED 0x0040
98#define NSIBM_NFS_UID 0x0080
99#define NSIBM_NFS_ACSFLAG 0x0100
100#define NSIBM_NFS_MYFLAG 0x0200
101
102/* open/create modes */
103#define OC_MODE_OPEN 0x01
104#define OC_MODE_TRUNCATE 0x02
105#define OC_MODE_REPLACE 0x02
106#define OC_MODE_CREATE 0x08
107
108/* open/create results */
109#define OC_ACTION_NONE 0x00
110#define OC_ACTION_OPEN 0x01
111#define OC_ACTION_CREATE 0x02
112#define OC_ACTION_TRUNCATE 0x04
113#define OC_ACTION_REPLACE 0x04
114
115/* access rights attributes */
116#ifndef AR_READ_ONLY
117#define AR_READ_ONLY 0x0001
118#define AR_WRITE_ONLY 0x0002
119#define AR_DENY_READ 0x0004
120#define AR_DENY_WRITE 0x0008
121#define AR_COMPATIBILITY 0x0010
122#define AR_WRITE_THROUGH 0x0040
123#define AR_OPEN_COMPRESSED 0x0100
124#endif
125
126struct nw_nfs_info {
127 __u32 mode;
128 __u32 rdev;
129};
130
131struct nw_info_struct {
132 __u32 spaceAlloc;
133 __le32 attributes;
134 __u16 flags;
135 __le32 dataStreamSize;
136 __le32 totalStreamSize;
137 __u16 numberOfStreams;
138 __le16 creationTime;
139 __le16 creationDate;
140 __u32 creatorID;
141 __le16 modifyTime;
142 __le16 modifyDate;
143 __u32 modifierID;
144 __le16 lastAccessDate;
145 __u16 archiveTime;
146 __u16 archiveDate;
147 __u32 archiverID;
148 __u16 inheritedRightsMask;
149 __le32 dirEntNum;
150 __le32 DosDirNum;
151 __u32 volNumber;
152 __u32 EADataSize;
153 __u32 EAKeyCount;
154 __u32 EAKeySize;
155 __u32 NSCreator;
156 __u8 nameLen;
157 __u8 entryName[256];
158 /* libncp may depend on there being nothing after entryName */
159#ifdef __KERNEL__
160 struct nw_nfs_info nfs;
161#endif
162} __attribute__((packed));
163
164/* modify mask - use with MODIFY_DOS_INFO structure */
165#define DM_ATTRIBUTES (cpu_to_le32(0x02))
166#define DM_CREATE_DATE (cpu_to_le32(0x04))
167#define DM_CREATE_TIME (cpu_to_le32(0x08))
168#define DM_CREATOR_ID (cpu_to_le32(0x10))
169#define DM_ARCHIVE_DATE (cpu_to_le32(0x20))
170#define DM_ARCHIVE_TIME (cpu_to_le32(0x40))
171#define DM_ARCHIVER_ID (cpu_to_le32(0x80))
172#define DM_MODIFY_DATE (cpu_to_le32(0x0100))
173#define DM_MODIFY_TIME (cpu_to_le32(0x0200))
174#define DM_MODIFIER_ID (cpu_to_le32(0x0400))
175#define DM_LAST_ACCESS_DATE (cpu_to_le32(0x0800))
176#define DM_INHERITED_RIGHTS_MASK (cpu_to_le32(0x1000))
177#define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000))
178
179struct nw_modify_dos_info {
180 __le32 attributes;
181 __le16 creationDate;
182 __le16 creationTime;
183 __u32 creatorID;
184 __le16 modifyDate;
185 __le16 modifyTime;
186 __u32 modifierID;
187 __u16 archiveDate;
188 __u16 archiveTime;
189 __u32 archiverID;
190 __le16 lastAccessDate;
191 __u16 inheritanceGrantMask;
192 __u16 inheritanceRevokeMask;
193 __u32 maximumSpace;
194} __attribute__((packed));
195
196struct nw_search_sequence {
197 __u8 volNumber;
198 __u32 dirBase;
199 __u32 sequence;
200} __attribute__((packed));
201
202#endif /* _LINUX_NCP_H */
diff --git a/include/uapi/linux/ncp_fs.h b/include/uapi/linux/ncp_fs.h
deleted file mode 100644
index e76a44229d2f..000000000000
--- a/include/uapi/linux/ncp_fs.h
+++ /dev/null
@@ -1,147 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * ncp_fs.h
4 *
5 * Copyright (C) 1995, 1996 by Volker Lendecke
6 *
7 */
8
9#ifndef _LINUX_NCP_FS_H
10#define _LINUX_NCP_FS_H
11
12#include <linux/fs.h>
13#include <linux/in.h>
14#include <linux/types.h>
15#include <linux/magic.h>
16
17#include <linux/ipx.h>
18#include <linux/ncp_no.h>
19
20/*
21 * ioctl commands
22 */
23
24struct ncp_ioctl_request {
25 unsigned int function;
26 unsigned int size;
27 char __user *data;
28};
29
30struct ncp_fs_info {
31 int version;
32 struct sockaddr_ipx addr;
33 __kernel_uid_t mounted_uid;
34 int connection; /* Connection number the server assigned us */
35 int buffer_size; /* The negotiated buffer size, to be
36 used for read/write requests! */
37
38 int volume_number;
39 __le32 directory_id;
40};
41
42struct ncp_fs_info_v2 {
43 int version;
44 unsigned long mounted_uid;
45 unsigned int connection;
46 unsigned int buffer_size;
47
48 unsigned int volume_number;
49 __le32 directory_id;
50
51 __u32 dummy1;
52 __u32 dummy2;
53 __u32 dummy3;
54};
55
56struct ncp_sign_init
57{
58 char sign_root[8];
59 char sign_last[16];
60};
61
62struct ncp_lock_ioctl
63{
64#define NCP_LOCK_LOG 0
65#define NCP_LOCK_SH 1
66#define NCP_LOCK_EX 2
67#define NCP_LOCK_CLEAR 256
68 int cmd;
69 int origin;
70 unsigned int offset;
71 unsigned int length;
72#define NCP_LOCK_DEFAULT_TIMEOUT 18
73#define NCP_LOCK_MAX_TIMEOUT 180
74 int timeout;
75};
76
77struct ncp_setroot_ioctl
78{
79 int volNumber;
80 int namespace;
81 __le32 dirEntNum;
82};
83
84struct ncp_objectname_ioctl
85{
86#define NCP_AUTH_NONE 0x00
87#define NCP_AUTH_BIND 0x31
88#define NCP_AUTH_NDS 0x32
89 int auth_type;
90 size_t object_name_len;
91 void __user * object_name; /* a userspace data, in most cases user name */
92};
93
94struct ncp_privatedata_ioctl
95{
96 size_t len;
97 void __user * data; /* ~1000 for NDS */
98};
99
100/* NLS charsets by ioctl */
101#define NCP_IOCSNAME_LEN 20
102struct ncp_nls_ioctl
103{
104 unsigned char codepage[NCP_IOCSNAME_LEN+1];
105 unsigned char iocharset[NCP_IOCSNAME_LEN+1];
106};
107
108#define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request)
109#define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t)
110#define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long)
111
112#define NCP_IOC_CONN_LOGGED_IN _IO('n', 3)
113
114#define NCP_GET_FS_INFO_VERSION (1)
115#define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info)
116#define NCP_GET_FS_INFO_VERSION_V2 (2)
117#define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2)
118
119#define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init)
120#define NCP_IOC_SIGN_WANTED _IOR('n', 6, int)
121#define NCP_IOC_SET_SIGN_WANTED _IOW('n', 6, int)
122
123#define NCP_IOC_LOCKUNLOCK _IOR('n', 7, struct ncp_lock_ioctl)
124
125#define NCP_IOC_GETROOT _IOW('n', 8, struct ncp_setroot_ioctl)
126#define NCP_IOC_SETROOT _IOR('n', 8, struct ncp_setroot_ioctl)
127
128#define NCP_IOC_GETOBJECTNAME _IOWR('n', 9, struct ncp_objectname_ioctl)
129#define NCP_IOC_SETOBJECTNAME _IOR('n', 9, struct ncp_objectname_ioctl)
130#define NCP_IOC_GETPRIVATEDATA _IOWR('n', 10, struct ncp_privatedata_ioctl)
131#define NCP_IOC_SETPRIVATEDATA _IOR('n', 10, struct ncp_privatedata_ioctl)
132
133#define NCP_IOC_GETCHARSETS _IOWR('n', 11, struct ncp_nls_ioctl)
134#define NCP_IOC_SETCHARSETS _IOR('n', 11, struct ncp_nls_ioctl)
135
136#define NCP_IOC_GETDENTRYTTL _IOW('n', 12, __u32)
137#define NCP_IOC_SETDENTRYTTL _IOR('n', 12, __u32)
138
139/*
140 * The packet size to allocate. One page should be enough.
141 */
142#define NCP_PACKET_SIZE 4070
143
144#define NCP_MAXPATHLEN 255
145#define NCP_MAXNAMELEN 14
146
147#endif /* _LINUX_NCP_FS_H */
diff --git a/include/uapi/linux/ncp_mount.h b/include/uapi/linux/ncp_mount.h
deleted file mode 100644
index 9bdbcd68c329..000000000000
--- a/include/uapi/linux/ncp_mount.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * ncp_mount.h
4 *
5 * Copyright (C) 1995, 1996 by Volker Lendecke
6 *
7 */
8
9#ifndef _LINUX_NCP_MOUNT_H
10#define _LINUX_NCP_MOUNT_H
11
12#include <linux/types.h>
13#include <linux/ncp.h>
14
15#define NCP_MOUNT_VERSION 3 /* Binary */
16
17/* Values for flags */
18#define NCP_MOUNT_SOFT 0x0001
19#define NCP_MOUNT_INTR 0x0002
20#define NCP_MOUNT_STRONG 0x0004 /* enable delete/rename of r/o files */
21#define NCP_MOUNT_NO_OS2 0x0008 /* do not use OS/2 (LONG) namespace */
22#define NCP_MOUNT_NO_NFS 0x0010 /* do not use NFS namespace */
23#define NCP_MOUNT_EXTRAS 0x0020
24#define NCP_MOUNT_SYMLINKS 0x0040 /* enable symlinks */
25#define NCP_MOUNT_NFS_EXTRAS 0x0080 /* Enable use of NFS NS meta-info */
26
27struct ncp_mount_data {
28 int version;
29 unsigned int ncp_fd; /* The socket to the ncp port */
30 __kernel_uid_t mounted_uid; /* Who may umount() this filesystem? */
31 __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */
32
33 unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
34 unsigned int time_out; /* How long should I wait after
35 sending a NCP request? */
36 unsigned int retry_count; /* And how often should I retry? */
37 unsigned int flags;
38
39 __kernel_uid_t uid;
40 __kernel_gid_t gid;
41 __kernel_mode_t file_mode;
42 __kernel_mode_t dir_mode;
43};
44
45#define NCP_MOUNT_VERSION_V4 (4) /* Binary or text */
46
47struct ncp_mount_data_v4 {
48 int version;
49 unsigned long flags; /* NCP_MOUNT_* flags */
50 /* MIPS uses long __kernel_uid_t, but... */
51 /* we neever pass -1, so it is safe */
52 unsigned long mounted_uid; /* Who may umount() this filesystem? */
53 /* MIPS uses long __kernel_pid_t */
54 long wdog_pid; /* Who cares for our watchdog packets? */
55
56 unsigned int ncp_fd; /* The socket to the ncp port */
57 unsigned int time_out; /* How long should I wait after
58 sending a NCP request? */
59 unsigned int retry_count; /* And how often should I retry? */
60
61 /* MIPS uses long __kernel_uid_t... */
62 /* we never pass -1, so it is safe */
63 unsigned long uid;
64 unsigned long gid;
65 /* MIPS uses unsigned long __kernel_mode_t */
66 unsigned long file_mode;
67 unsigned long dir_mode;
68};
69
70#define NCP_MOUNT_VERSION_V5 (5) /* Text only */
71
72#endif
diff --git a/include/uapi/linux/ncp_no.h b/include/uapi/linux/ncp_no.h
deleted file mode 100644
index 654d7c7f5d92..000000000000
--- a/include/uapi/linux/ncp_no.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _NCP_NO
3#define _NCP_NO
4
5/* these define the attribute byte as seen by NCP */
6#define aRONLY (__cpu_to_le32(1))
7#define aHIDDEN (__cpu_to_le32(2))
8#define aSYSTEM (__cpu_to_le32(4))
9#define aEXECUTE (__cpu_to_le32(8))
10#define aDIR (__cpu_to_le32(0x10))
11#define aARCH (__cpu_to_le32(0x20))
12#define aSHARED (__cpu_to_le32(0x80))
13#define aDONTSUBALLOCATE (__cpu_to_le32(1L<<11))
14#define aTRANSACTIONAL (__cpu_to_le32(1L<<12))
15#define aPURGE (__cpu_to_le32(1L<<16))
16#define aRENAMEINHIBIT (__cpu_to_le32(1L<<17))
17#define aDELETEINHIBIT (__cpu_to_le32(1L<<18))
18#define aDONTCOMPRESS (__cpu_to_le32(1L<<27))
19
20#endif /* _NCP_NO */
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h
index c712eb6879f1..336014bf8868 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_common.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_common.h
@@ -112,7 +112,7 @@ enum ip_conntrack_status {
112 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | 112 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |
113 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD), 113 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD),
114 114
115 __IPS_MAX_BIT = 14, 115 __IPS_MAX_BIT = 15,
116}; 116};
117 117
118/* Connection tracking event types */ 118/* Connection tracking event types */
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index ae00a3c49b8a..89438e68dc03 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -266,7 +266,7 @@ enum nft_rule_compat_attributes {
266 * @NFT_SET_INTERVAL: set contains intervals 266 * @NFT_SET_INTERVAL: set contains intervals
267 * @NFT_SET_MAP: set is used as a dictionary 267 * @NFT_SET_MAP: set is used as a dictionary
268 * @NFT_SET_TIMEOUT: set uses timeouts 268 * @NFT_SET_TIMEOUT: set uses timeouts
269 * @NFT_SET_EVAL: set contains expressions for evaluation 269 * @NFT_SET_EVAL: set can be updated from the evaluation path
270 * @NFT_SET_OBJECT: set contains stateful objects 270 * @NFT_SET_OBJECT: set contains stateful objects
271 */ 271 */
272enum nft_set_flags { 272enum nft_set_flags {
@@ -1099,9 +1099,31 @@ enum nft_log_attributes {
1099#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) 1099#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1)
1100 1100
1101/** 1101/**
1102 * LOGLEVEL_AUDIT - a pseudo log level enabling audit logging 1102 * enum nft_log_level - nf_tables log levels
1103 */ 1103 *
1104#define LOGLEVEL_AUDIT 8 1104 * @NFT_LOGLEVEL_EMERG: system is unusable
1105 * @NFT_LOGLEVEL_ALERT: action must be taken immediately
1106 * @NFT_LOGLEVEL_CRIT: critical conditions
1107 * @NFT_LOGLEVEL_ERR: error conditions
1108 * @NFT_LOGLEVEL_WARNING: warning conditions
1109 * @NFT_LOGLEVEL_NOTICE: normal but significant condition
1110 * @NFT_LOGLEVEL_INFO: informational
1111 * @NFT_LOGLEVEL_DEBUG: debug-level messages
1112 * @NFT_LOGLEVEL_AUDIT: enabling audit logging
1113 */
1114enum nft_log_level {
1115 NFT_LOGLEVEL_EMERG,
1116 NFT_LOGLEVEL_ALERT,
1117 NFT_LOGLEVEL_CRIT,
1118 NFT_LOGLEVEL_ERR,
1119 NFT_LOGLEVEL_WARNING,
1120 NFT_LOGLEVEL_NOTICE,
1121 NFT_LOGLEVEL_INFO,
1122 NFT_LOGLEVEL_DEBUG,
1123 NFT_LOGLEVEL_AUDIT,
1124 __NFT_LOGLEVEL_MAX
1125};
1126#define NFT_LOGLEVEL_MAX (__NFT_LOGLEVEL_MAX + 1)
1105 1127
1106/** 1128/**
1107 * enum nft_queue_attributes - nf_tables queue expression netlink attributes 1129 * enum nft_queue_attributes - nf_tables queue expression netlink attributes
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 28b36545de24..27e4e441caac 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -981,18 +981,18 @@
981 * only the %NL80211_ATTR_IE data is used and updated with this command. 981 * only the %NL80211_ATTR_IE data is used and updated with this command.
982 * 982 *
983 * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0 983 * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0
984 * for the given authenticator address (specified with &NL80211_ATTR_MAC). 984 * for the given authenticator address (specified with %NL80211_ATTR_MAC).
985 * When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the 985 * When %NL80211_ATTR_PMKR0_NAME is set, %NL80211_ATTR_PMK specifies the
986 * PMK-R0, otherwise it specifies the PMK. 986 * PMK-R0, otherwise it specifies the PMK.
987 * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously 987 * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
988 * configured PMK for the authenticator address identified by 988 * configured PMK for the authenticator address identified by
989 * &NL80211_ATTR_MAC. 989 * %NL80211_ATTR_MAC.
990 * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way 990 * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way
991 * handshake was completed successfully by the driver. The BSSID is 991 * handshake was completed successfully by the driver. The BSSID is
992 * specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake 992 * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake
993 * offload should send this event after indicating 802.11 association with 993 * offload should send this event after indicating 802.11 association with
994 * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed 994 * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed
995 * &NL80211_CMD_DISCONNECT should be indicated instead. 995 * %NL80211_CMD_DISCONNECT should be indicated instead.
996 * 996 *
997 * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request 997 * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
998 * and RX notification. This command is used both as a request to transmit 998 * and RX notification. This command is used both as a request to transmit
@@ -1029,9 +1029,9 @@
1029 * initiated the connection through the connect request. 1029 * initiated the connection through the connect request.
1030 * 1030 *
1031 * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's 1031 * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's
1032 * ht opmode or vht opmode changes using any of &NL80211_ATTR_SMPS_MODE, 1032 * ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE,
1033 * &NL80211_ATTR_CHANNEL_WIDTH,&NL80211_ATTR_NSS attributes with its 1033 * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its
1034 * address(specified in &NL80211_ATTR_MAC). 1034 * address(specified in %NL80211_ATTR_MAC).
1035 * 1035 *
1036 * @NL80211_CMD_MAX: highest used command number 1036 * @NL80211_CMD_MAX: highest used command number
1037 * @__NL80211_CMD_AFTER_LAST: internal use 1037 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -2218,7 +2218,7 @@ enum nl80211_commands {
2218 * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external 2218 * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external
2219 * authentication operation (u32 attribute with an 2219 * authentication operation (u32 attribute with an
2220 * &enum nl80211_external_auth_action value). This is used with the 2220 * &enum nl80211_external_auth_action value). This is used with the
2221 * &NL80211_CMD_EXTERNAL_AUTH request event. 2221 * %NL80211_CMD_EXTERNAL_AUTH request event.
2222 * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user 2222 * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user
2223 * space supports external authentication. This attribute shall be used 2223 * space supports external authentication. This attribute shall be used
2224 * only with %NL80211_CMD_CONNECT request. The driver may offload 2224 * only with %NL80211_CMD_CONNECT request. The driver may offload
@@ -3491,7 +3491,7 @@ enum nl80211_sched_scan_match_attr {
3491 * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated 3491 * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
3492 * base on contiguous rules and wider channels will be allowed to cross 3492 * base on contiguous rules and wider channels will be allowed to cross
3493 * multiple contiguous/overlapping frequency ranges. 3493 * multiple contiguous/overlapping frequency ranges.
3494 * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT 3494 * @NL80211_RRF_IR_CONCURRENT: See %NL80211_FREQUENCY_ATTR_IR_CONCURRENT
3495 * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation 3495 * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation
3496 * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation 3496 * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation
3497 * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed 3497 * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
@@ -5643,11 +5643,11 @@ enum nl80211_nan_func_attributes {
5643 * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set. 5643 * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set.
5644 * This is a flag. 5644 * This is a flag.
5645 * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if 5645 * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if
5646 * &NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary. 5646 * %NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary.
5647 * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if 5647 * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if
5648 * &NL80211_NAN_SRF_BF is present. This is a u8. 5648 * %NL80211_NAN_SRF_BF is present. This is a u8.
5649 * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if 5649 * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if
5650 * and only if &NL80211_NAN_SRF_BF isn't present. This is a nested 5650 * and only if %NL80211_NAN_SRF_BF isn't present. This is a nested
5651 * attribute. Each nested attribute is a MAC address. 5651 * attribute. Each nested attribute is a MAC address.
5652 * @NUM_NL80211_NAN_SRF_ATTR: internal 5652 * @NUM_NL80211_NAN_SRF_ATTR: internal
5653 * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute 5653 * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h
index db9f15f5db04..c0d7ea0bf5b6 100644
--- a/include/uapi/linux/prctl.h
+++ b/include/uapi/linux/prctl.h
@@ -170,7 +170,7 @@ struct prctl_mm_map {
170 * asking selinux for a specific new context (e.g. with runcon) will result 170 * asking selinux for a specific new context (e.g. with runcon) will result
171 * in execve returning -EPERM. 171 * in execve returning -EPERM.
172 * 172 *
173 * See Documentation/prctl/no_new_privs.txt for more details. 173 * See Documentation/userspace-api/no_new_privs.rst for more details.
174 */ 174 */
175#define PR_SET_NO_NEW_PRIVS 38 175#define PR_SET_NO_NEW_PRIVS 38
176#define PR_GET_NO_NEW_PRIVS 39 176#define PR_GET_NO_NEW_PRIVS 39
diff --git a/include/uapi/linux/rpmsg.h b/include/uapi/linux/rpmsg.h
index 225eb38705dc..e14c6dab4223 100644
--- a/include/uapi/linux/rpmsg.h
+++ b/include/uapi/linux/rpmsg.h
@@ -1,15 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* 2/*
3 * Copyright (c) 2016, Linaro Ltd. 3 * Copyright (c) 2016, Linaro Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 and
7 * only version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */ 4 */
14 5
15#ifndef _UAPI_RPMSG_H_ 6#ifndef _UAPI_RPMSG_H_
diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h
new file mode 100644
index 000000000000..d620fa43756c
--- /dev/null
+++ b/include/uapi/linux/rseq.h
@@ -0,0 +1,133 @@
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2#ifndef _UAPI_LINUX_RSEQ_H
3#define _UAPI_LINUX_RSEQ_H
4
5/*
6 * linux/rseq.h
7 *
8 * Restartable sequences system call API
9 *
10 * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 */
12
13#ifdef __KERNEL__
14# include <linux/types.h>
15#else
16# include <stdint.h>
17#endif
18
19#include <linux/types_32_64.h>
20
21enum rseq_cpu_id_state {
22 RSEQ_CPU_ID_UNINITIALIZED = -1,
23 RSEQ_CPU_ID_REGISTRATION_FAILED = -2,
24};
25
26enum rseq_flags {
27 RSEQ_FLAG_UNREGISTER = (1 << 0),
28};
29
30enum rseq_cs_flags_bit {
31 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0,
32 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1,
33 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2,
34};
35
36enum rseq_cs_flags {
37 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT =
38 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT),
39 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL =
40 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT),
41 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE =
42 (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT),
43};
44
45/*
46 * struct rseq_cs is aligned on 4 * 8 bytes to ensure it is always
47 * contained within a single cache-line. It is usually declared as
48 * link-time constant data.
49 */
50struct rseq_cs {
51 /* Version of this structure. */
52 __u32 version;
53 /* enum rseq_cs_flags */
54 __u32 flags;
55 LINUX_FIELD_u32_u64(start_ip);
56 /* Offset from start_ip. */
57 LINUX_FIELD_u32_u64(post_commit_offset);
58 LINUX_FIELD_u32_u64(abort_ip);
59} __attribute__((aligned(4 * sizeof(__u64))));
60
61/*
62 * struct rseq is aligned on 4 * 8 bytes to ensure it is always
63 * contained within a single cache-line.
64 *
65 * A single struct rseq per thread is allowed.
66 */
67struct rseq {
68 /*
69 * Restartable sequences cpu_id_start field. Updated by the
70 * kernel, and read by user-space with single-copy atomicity
71 * semantics. Aligned on 32-bit. Always contains a value in the
72 * range of possible CPUs, although the value may not be the
73 * actual current CPU (e.g. if rseq is not initialized). This
74 * CPU number value should always be compared against the value
75 * of the cpu_id field before performing a rseq commit or
76 * returning a value read from a data structure indexed using
77 * the cpu_id_start value.
78 */
79 __u32 cpu_id_start;
80 /*
81 * Restartable sequences cpu_id field. Updated by the kernel,
82 * and read by user-space with single-copy atomicity semantics.
83 * Aligned on 32-bit. Values RSEQ_CPU_ID_UNINITIALIZED and
84 * RSEQ_CPU_ID_REGISTRATION_FAILED have a special semantic: the
85 * former means "rseq uninitialized", and latter means "rseq
86 * initialization failed". This value is meant to be read within
87 * rseq critical sections and compared with the cpu_id_start
88 * value previously read, before performing the commit instruction,
89 * or read and compared with the cpu_id_start value before returning
90 * a value loaded from a data structure indexed using the
91 * cpu_id_start value.
92 */
93 __u32 cpu_id;
94 /*
95 * Restartable sequences rseq_cs field.
96 *
97 * Contains NULL when no critical section is active for the current
98 * thread, or holds a pointer to the currently active struct rseq_cs.
99 *
100 * Updated by user-space, which sets the address of the currently
101 * active rseq_cs at the beginning of assembly instruction sequence
102 * block, and set to NULL by the kernel when it restarts an assembly
103 * instruction sequence block, as well as when the kernel detects that
104 * it is preempting or delivering a signal outside of the range
105 * targeted by the rseq_cs. Also needs to be set to NULL by user-space
106 * before reclaiming memory that contains the targeted struct rseq_cs.
107 *
108 * Read and set by the kernel with single-copy atomicity semantics.
109 * Set by user-space with single-copy atomicity semantics. Aligned
110 * on 64-bit.
111 */
112 LINUX_FIELD_u32_u64(rseq_cs);
113 /*
114 * - RSEQ_DISABLE flag:
115 *
116 * Fallback fast-track flag for single-stepping.
117 * Set by user-space if lack of progress is detected.
118 * Cleared by user-space after rseq finish.
119 * Read by the kernel.
120 * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT
121 * Inhibit instruction sequence block restart and event
122 * counter increment on preemption for this thread.
123 * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
124 * Inhibit instruction sequence block restart and event
125 * counter increment on signal delivery for this thread.
126 * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
127 * Inhibit instruction sequence block restart and event
128 * counter increment on migration for this thread.
129 */
130 __u32 flags;
131} __attribute__((aligned(4 * sizeof(__u64))));
132
133#endif /* _UAPI_LINUX_RSEQ_H */
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h
index 0be80f72646b..b7b57967d90f 100644
--- a/include/uapi/linux/target_core_user.h
+++ b/include/uapi/linux/target_core_user.h
@@ -9,21 +9,22 @@
9 9
10#define TCMU_VERSION "2.0" 10#define TCMU_VERSION "2.0"
11 11
12/* 12/**
13 * DOC: Ring Design
13 * Ring Design 14 * Ring Design
14 * ----------- 15 * -----------
15 * 16 *
16 * The mmaped area is divided into three parts: 17 * The mmaped area is divided into three parts:
17 * 1) The mailbox (struct tcmu_mailbox, below) 18 * 1) The mailbox (struct tcmu_mailbox, below);
18 * 2) The command ring 19 * 2) The command ring;
19 * 3) Everything beyond the command ring (data) 20 * 3) Everything beyond the command ring (data).
20 * 21 *
21 * The mailbox tells userspace the offset of the command ring from the 22 * The mailbox tells userspace the offset of the command ring from the
22 * start of the shared memory region, and how big the command ring is. 23 * start of the shared memory region, and how big the command ring is.
23 * 24 *
24 * The kernel passes SCSI commands to userspace by putting a struct 25 * The kernel passes SCSI commands to userspace by putting a struct
25 * tcmu_cmd_entry in the ring, updating mailbox->cmd_head, and poking 26 * tcmu_cmd_entry in the ring, updating mailbox->cmd_head, and poking
26 * userspace via uio's interrupt mechanism. 27 * userspace via UIO's interrupt mechanism.
27 * 28 *
28 * tcmu_cmd_entry contains a header. If the header type is PAD, 29 * tcmu_cmd_entry contains a header. If the header type is PAD,
29 * userspace should skip hdr->length bytes (mod cmdr_size) to find the 30 * userspace should skip hdr->length bytes (mod cmdr_size) to find the
@@ -43,6 +44,7 @@
43#define TCMU_MAILBOX_VERSION 2 44#define TCMU_MAILBOX_VERSION 2
44#define ALIGN_SIZE 64 /* Should be enough for most CPUs */ 45#define ALIGN_SIZE 64 /* Should be enough for most CPUs */
45#define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */ 46#define TCMU_MAILBOX_FLAG_CAP_OOOC (1 << 0) /* Out-of-order completions */
47#define TCMU_MAILBOX_FLAG_CAP_READ_LEN (1 << 1) /* Read data length */
46 48
47struct tcmu_mailbox { 49struct tcmu_mailbox {
48 __u16 version; 50 __u16 version;
@@ -70,6 +72,7 @@ struct tcmu_cmd_entry_hdr {
70 __u16 cmd_id; 72 __u16 cmd_id;
71 __u8 kflags; 73 __u8 kflags;
72#define TCMU_UFLAG_UNKNOWN_OP 0x1 74#define TCMU_UFLAG_UNKNOWN_OP 0x1
75#define TCMU_UFLAG_READ_LEN 0x2
73 __u8 uflags; 76 __u8 uflags;
74 77
75} __packed; 78} __packed;
@@ -118,7 +121,7 @@ struct tcmu_cmd_entry {
118 __u8 scsi_status; 121 __u8 scsi_status;
119 __u8 __pad1; 122 __u8 __pad1;
120 __u16 __pad2; 123 __u16 __pad2;
121 __u32 __pad3; 124 __u32 read_len;
122 char sense_buffer[TCMU_SENSE_BUFFERSIZE]; 125 char sense_buffer[TCMU_SENSE_BUFFERSIZE];
123 } rsp; 126 } rsp;
124 }; 127 };
diff --git a/include/uapi/linux/types_32_64.h b/include/uapi/linux/types_32_64.h
new file mode 100644
index 000000000000..0a87ace34a57
--- /dev/null
+++ b/include/uapi/linux/types_32_64.h
@@ -0,0 +1,50 @@
1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2#ifndef _UAPI_LINUX_TYPES_32_64_H
3#define _UAPI_LINUX_TYPES_32_64_H
4
5/*
6 * linux/types_32_64.h
7 *
8 * Integer type declaration for pointers across 32-bit and 64-bit systems.
9 *
10 * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 */
12
13#ifdef __KERNEL__
14# include <linux/types.h>
15#else
16# include <stdint.h>
17#endif
18
19#include <asm/byteorder.h>
20
21#ifdef __BYTE_ORDER
22# if (__BYTE_ORDER == __BIG_ENDIAN)
23# define LINUX_BYTE_ORDER_BIG_ENDIAN
24# else
25# define LINUX_BYTE_ORDER_LITTLE_ENDIAN
26# endif
27#else
28# ifdef __BIG_ENDIAN
29# define LINUX_BYTE_ORDER_BIG_ENDIAN
30# else
31# define LINUX_BYTE_ORDER_LITTLE_ENDIAN
32# endif
33#endif
34
35#ifdef __LP64__
36# define LINUX_FIELD_u32_u64(field) __u64 field
37# define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) field = (intptr_t)v
38#else
39# ifdef LINUX_BYTE_ORDER_BIG_ENDIAN
40# define LINUX_FIELD_u32_u64(field) __u32 field ## _padding, field
41# define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \
42 field ## _padding = 0, field = (intptr_t)v
43# else
44# define LINUX_FIELD_u32_u64(field) __u32 field, field ## _padding
45# define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \
46 field = (intptr_t)v, field ## _padding = 0
47# endif
48#endif
49
50#endif /* _UAPI_LINUX_TYPES_32_64_H */
diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h
index 13d98e6e0db1..74e520fb944f 100644
--- a/include/uapi/linux/usb/audio.h
+++ b/include/uapi/linux/usb/audio.h
@@ -230,6 +230,14 @@ struct uac1_output_terminal_descriptor {
230#define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306 230#define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306
231#define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 231#define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307
232 232
233/* Terminals - 2.4 Bi-directional Terminal Types */
234#define UAC_BIDIR_TERMINAL_UNDEFINED 0x400
235#define UAC_BIDIR_TERMINAL_HANDSET 0x401
236#define UAC_BIDIR_TERMINAL_HEADSET 0x402
237#define UAC_BIDIR_TERMINAL_SPEAKER_PHONE 0x403
238#define UAC_BIDIR_TERMINAL_ECHO_SUPPRESSING 0x404
239#define UAC_BIDIR_TERMINAL_ECHO_CANCELING 0x405
240
233/* Set bControlSize = 2 as default setting */ 241/* Set bControlSize = 2 as default setting */
234#define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2) 242#define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2)
235 243
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index 308e2096291f..449132c76b1c 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -45,11 +45,14 @@
45/* We've given up on this device. */ 45/* We've given up on this device. */
46#define VIRTIO_CONFIG_S_FAILED 0x80 46#define VIRTIO_CONFIG_S_FAILED 0x80
47 47
48/* Some virtio feature bits (currently bits 28 through 32) are reserved for the 48/*
49 * transport being used (eg. virtio_ring), the rest are per-device feature 49 * Virtio feature bits VIRTIO_TRANSPORT_F_START through
50 * bits. */ 50 * VIRTIO_TRANSPORT_F_END are reserved for the transport
51 * being used (e.g. virtio_ring, virtio_pci etc.), the
52 * rest are per-device feature bits.
53 */
51#define VIRTIO_TRANSPORT_F_START 28 54#define VIRTIO_TRANSPORT_F_START 28
52#define VIRTIO_TRANSPORT_F_END 34 55#define VIRTIO_TRANSPORT_F_END 38
53 56
54#ifndef VIRTIO_CONFIG_NO_LEGACY 57#ifndef VIRTIO_CONFIG_NO_LEGACY
55/* Do we get callbacks when the ring is completely used, even if we've 58/* Do we get callbacks when the ring is completely used, even if we've
@@ -71,4 +74,9 @@
71 * this is for compatibility with legacy systems. 74 * this is for compatibility with legacy systems.
72 */ 75 */
73#define VIRTIO_F_IOMMU_PLATFORM 33 76#define VIRTIO_F_IOMMU_PLATFORM 33
77
78/*
79 * Does the device support Single Root I/O Virtualization?
80 */
81#define VIRTIO_F_SR_IOV 37
74#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ 82#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */