diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/bpf_verifier.h | 3 | ||||
| -rw-r--r-- | include/linux/cpu.h | 2 | ||||
| -rw-r--r-- | include/linux/dcache.h | 1 | ||||
| -rw-r--r-- | include/linux/gfp.h | 2 | ||||
| -rw-r--r-- | include/linux/memory_hotplug.h | 3 | ||||
| -rw-r--r-- | include/linux/mlx5/driver.h | 12 | ||||
| -rw-r--r-- | include/linux/mm.h | 1 | ||||
| -rw-r--r-- | include/linux/node.h | 8 | ||||
| -rw-r--r-- | include/linux/nospec.h | 10 | ||||
| -rw-r--r-- | include/linux/sched.h | 10 | ||||
| -rw-r--r-- | include/linux/seccomp.h | 5 | ||||
| -rw-r--r-- | include/net/netfilter/nf_tables.h | 5 | ||||
| -rw-r--r-- | include/net/sctp/sctp.h | 2 | ||||
| -rw-r--r-- | include/net/tls.h | 3 | ||||
| -rw-r--r-- | include/rdma/ib_umem.h | 1 | ||||
| -rw-r--r-- | include/rdma/uverbs_ioctl.h | 10 | ||||
| -rw-r--r-- | include/trace/events/sched.h | 4 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter/nf_conntrack_tcp.h | 3 | ||||
| -rw-r--r-- | include/uapi/linux/nl80211.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/ppp-ioctl.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/prctl.h | 12 | ||||
| -rw-r--r-- | include/uapi/linux/seccomp.h | 5 | 
22 files changed, 75 insertions, 31 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h index 7e61c395fddf..df36b1b08af0 100644 --- a/include/linux/bpf_verifier.h +++ b/include/linux/bpf_verifier.h @@ -142,10 +142,11 @@ struct bpf_verifier_state_list {  struct bpf_insn_aux_data {  	union {  		enum bpf_reg_type ptr_type;	/* pointer type for load/store insns */ -		struct bpf_map *map_ptr;	/* pointer for call insn into lookup_elem */ +		unsigned long map_state;	/* pointer/poison value for maps */  		s32 call_imm;			/* saved imm field of call insn */  	};  	int ctx_field_size; /* the ctx field size for load insn, maybe 0 */ +	int sanitize_stack_off; /* stack slot to be cleared */  	bool seen; /* this insn was processed by the verifier */  }; diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 7b01bc11c692..a97a63eef59f 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -53,6 +53,8 @@ extern ssize_t cpu_show_spectre_v1(struct device *dev,  				   struct device_attribute *attr, char *buf);  extern ssize_t cpu_show_spectre_v2(struct device *dev,  				   struct device_attribute *attr, char *buf); +extern ssize_t cpu_show_spec_store_bypass(struct device *dev, +					  struct device_attribute *attr, char *buf);  extern __printf(4, 5)  struct device *cpu_device_create(struct device *parent, void *drvdata, diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 94acbde17bb1..66c6e17e61e5 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -224,6 +224,7 @@ extern seqlock_t rename_lock;   * These are the low-level FS interfaces to the dcache..   */  extern void d_instantiate(struct dentry *, struct inode *); +extern void d_instantiate_new(struct dentry *, struct inode *);  extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *);  extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *);  extern int d_instantiate_no_diralias(struct dentry *, struct inode *); diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 1a4582b44d32..fc5ab85278d5 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -464,7 +464,7 @@ static inline struct page *  __alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order)  {  	VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); -	VM_WARN_ON(!node_online(nid)); +	VM_WARN_ON((gfp_mask & __GFP_THISNODE) && !node_online(nid));  	return __alloc_pages(gfp_mask, order, nid);  } diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index e0e49b5b1ee1..2b0265265c28 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -216,6 +216,9 @@ void put_online_mems(void);  void mem_hotplug_begin(void);  void mem_hotplug_done(void); +extern void set_zone_contiguous(struct zone *zone); +extern void clear_zone_contiguous(struct zone *zone); +  #else /* ! CONFIG_MEMORY_HOTPLUG */  #define pfn_to_online_page(pfn)			\  ({						\ diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 2a156c5dfadd..d703774982ca 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -1286,17 +1286,7 @@ enum {  static inline const struct cpumask *  mlx5_get_vector_affinity_hint(struct mlx5_core_dev *dev, int vector)  { -	struct irq_desc *desc; -	unsigned int irq; -	int eqn; -	int err; - -	err = mlx5_vector2eqn(dev, vector, &eqn, &irq); -	if (err) -		return NULL; - -	desc = irq_to_desc(irq); -	return desc->affinity_hint; +	return dev->priv.irq_info[vector].mask;  }  #endif /* MLX5_DRIVER_H */ diff --git a/include/linux/mm.h b/include/linux/mm.h index c6fa9a255dbf..02a616e2f17d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2109,7 +2109,6 @@ extern void setup_per_cpu_pageset(void);  extern void zone_pcp_update(struct zone *zone);  extern void zone_pcp_reset(struct zone *zone); -extern void setup_zone_pageset(struct zone *zone);  /* page_alloc.c */  extern int min_free_kbytes; diff --git a/include/linux/node.h b/include/linux/node.h index 41f171861dcc..6d336e38d155 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -32,9 +32,11 @@ extern struct node *node_devices[];  typedef  void (*node_registration_func_t)(struct node *);  #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_NUMA) -extern int link_mem_sections(int nid, unsigned long start_pfn, unsigned long nr_pages); +extern int link_mem_sections(int nid, unsigned long start_pfn, +			     unsigned long nr_pages, bool check_nid);  #else -static inline int link_mem_sections(int nid, unsigned long start_pfn, unsigned long nr_pages) +static inline int link_mem_sections(int nid, unsigned long start_pfn, +				    unsigned long nr_pages, bool check_nid)  {  	return 0;  } @@ -57,7 +59,7 @@ static inline int register_one_node(int nid)  		if (error)  			return error;  		/* link memory sections under this node */ -		error = link_mem_sections(nid, pgdat->node_start_pfn, pgdat->node_spanned_pages); +		error = link_mem_sections(nid, pgdat->node_start_pfn, pgdat->node_spanned_pages, true);  	}  	return error; diff --git a/include/linux/nospec.h b/include/linux/nospec.h index e791ebc65c9c..0c5ef54fd416 100644 --- a/include/linux/nospec.h +++ b/include/linux/nospec.h @@ -7,6 +7,8 @@  #define _LINUX_NOSPEC_H  #include <asm/barrier.h> +struct task_struct; +  /**   * array_index_mask_nospec() - generate a ~0 mask when index < size, 0 otherwise   * @index: array element index @@ -55,4 +57,12 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,  									\  	(typeof(_i)) (_i & _mask);					\  }) + +/* Speculation control prctl */ +int arch_prctl_spec_ctrl_get(struct task_struct *task, unsigned long which); +int arch_prctl_spec_ctrl_set(struct task_struct *task, unsigned long which, +			     unsigned long ctrl); +/* Speculation control for seccomp enforced mitigation */ +void arch_seccomp_spec_mitigate(struct task_struct *task); +  #endif /* _LINUX_NOSPEC_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index c2413703f45d..ca3f3eae8980 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1433,7 +1433,8 @@ static inline bool is_percpu_thread(void)  #define PFA_NO_NEW_PRIVS		0	/* May not gain new privileges. */  #define PFA_SPREAD_PAGE			1	/* Spread page cache over cpuset */  #define PFA_SPREAD_SLAB			2	/* Spread some slab caches over cpuset */ - +#define PFA_SPEC_SSB_DISABLE		3	/* Speculative Store Bypass disabled */ +#define PFA_SPEC_SSB_FORCE_DISABLE	4	/* Speculative Store Bypass force disabled*/  #define TASK_PFA_TEST(name, func)					\  	static inline bool task_##func(struct task_struct *p)		\ @@ -1458,6 +1459,13 @@ TASK_PFA_TEST(SPREAD_SLAB, spread_slab)  TASK_PFA_SET(SPREAD_SLAB, spread_slab)  TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab) +TASK_PFA_TEST(SPEC_SSB_DISABLE, spec_ssb_disable) +TASK_PFA_SET(SPEC_SSB_DISABLE, spec_ssb_disable) +TASK_PFA_CLEAR(SPEC_SSB_DISABLE, spec_ssb_disable) + +TASK_PFA_TEST(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable) +TASK_PFA_SET(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable) +  static inline void  current_restore_flags(unsigned long orig_flags, unsigned long flags)  { diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index c723a5c4e3ff..e5320f6c8654 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -4,8 +4,9 @@  #include <uapi/linux/seccomp.h> -#define SECCOMP_FILTER_FLAG_MASK	(SECCOMP_FILTER_FLAG_TSYNC | \ -					 SECCOMP_FILTER_FLAG_LOG) +#define SECCOMP_FILTER_FLAG_MASK	(SECCOMP_FILTER_FLAG_TSYNC	| \ +					 SECCOMP_FILTER_FLAG_LOG	| \ +					 SECCOMP_FILTER_FLAG_SPEC_ALLOW)  #ifdef CONFIG_SECCOMP diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index cd368d1b8cb8..a1e28dd5d0bf 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -170,6 +170,7 @@ struct nft_data_desc {  int nft_data_init(const struct nft_ctx *ctx,  		  struct nft_data *data, unsigned int size,  		  struct nft_data_desc *desc, const struct nlattr *nla); +void nft_data_hold(const struct nft_data *data, enum nft_data_types type);  void nft_data_release(const struct nft_data *data, enum nft_data_types type);  int nft_data_dump(struct sk_buff *skb, int attr, const struct nft_data *data,  		  enum nft_data_types type, unsigned int len); @@ -736,6 +737,10 @@ struct nft_expr_ops {  	int				(*init)(const struct nft_ctx *ctx,  						const struct nft_expr *expr,  						const struct nlattr * const tb[]); +	void				(*activate)(const struct nft_ctx *ctx, +						    const struct nft_expr *expr); +	void				(*deactivate)(const struct nft_ctx *ctx, +						      const struct nft_expr *expr);  	void				(*destroy)(const struct nft_ctx *ctx,  						   const struct nft_expr *expr);  	int				(*dump)(struct sk_buff *skb, diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 28b996d63490..35498e613ff5 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -103,6 +103,8 @@ void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int);  /*   * sctp/socket.c   */ +int sctp_inet_connect(struct socket *sock, struct sockaddr *uaddr, +		      int addr_len, int flags);  int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb);  int sctp_inet_listen(struct socket *sock, int backlog);  void sctp_write_space(struct sock *sk); diff --git a/include/net/tls.h b/include/net/tls.h index b400d0bb7448..f5fb16da3860 100644 --- a/include/net/tls.h +++ b/include/net/tls.h @@ -97,6 +97,9 @@ struct tls_sw_context {  	u8 control;  	bool decrypted; +	char rx_aad_ciphertext[TLS_AAD_SPACE_SIZE]; +	char rx_aad_plaintext[TLS_AAD_SPACE_SIZE]; +  	/* Sending context */  	char aad_space[TLS_AAD_SPACE_SIZE]; diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index 23159dd5be18..a1fd63871d17 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h @@ -48,7 +48,6 @@ struct ib_umem {  	int                     writable;  	int                     hugetlb;  	struct work_struct	work; -	struct pid             *pid;  	struct mm_struct       *mm;  	unsigned long		diff;  	struct ib_umem_odp     *odp_data; diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h index 4a4201d997a7..095383a4bd1a 100644 --- a/include/rdma/uverbs_ioctl.h +++ b/include/rdma/uverbs_ioctl.h @@ -411,13 +411,13 @@ static inline int uverbs_attr_get_enum_id(const struct uverbs_attr_bundle *attrs  static inline void *uverbs_attr_get_obj(const struct uverbs_attr_bundle *attrs_bundle,  					u16 idx)  { -	struct ib_uobject *uobj = -		uverbs_attr_get(attrs_bundle, idx)->obj_attr.uobject; +	const struct uverbs_attr *attr; -	if (IS_ERR(uobj)) -		return uobj; +	attr = uverbs_attr_get(attrs_bundle, idx); +	if (IS_ERR(attr)) +		return ERR_CAST(attr); -	return uobj->object; +	return attr->obj_attr.uobject->object;  }  static inline int uverbs_copy_to(const struct uverbs_attr_bundle *attrs_bundle, diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index bc01e06bc716..0be866c91f62 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -435,7 +435,9 @@ TRACE_EVENT(sched_pi_setprio,  		memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN);  		__entry->pid		= tsk->pid;  		__entry->oldprio	= tsk->prio; -		__entry->newprio	= pi_task ? pi_task->prio : tsk->prio; +		__entry->newprio	= pi_task ? +				min(tsk->normal_prio, pi_task->prio) : +				tsk->normal_prio;  		/* XXX SCHED_DEADLINE bits missing */  	), diff --git a/include/uapi/linux/netfilter/nf_conntrack_tcp.h b/include/uapi/linux/netfilter/nf_conntrack_tcp.h index 74b91151d494..bcba72def817 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_tcp.h +++ b/include/uapi/linux/netfilter/nf_conntrack_tcp.h @@ -46,6 +46,9 @@ enum tcp_conntrack {  /* Marks possibility for expected RFC5961 challenge ACK */  #define IP_CT_EXP_CHALLENGE_ACK 		0x40 +/* Simultaneous open initialized */ +#define IP_CT_TCP_SIMULTANEOUS_OPEN		0x80 +  struct nf_ct_tcp_flags {  	__u8 flags;  	__u8 mask; diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 9c3630146cec..271b93783d28 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2698,7 +2698,7 @@ enum nl80211_attrs {  #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS  #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS -#define NL80211_WIPHY_NAME_MAXLEN		128 +#define NL80211_WIPHY_NAME_MAXLEN		64  #define NL80211_MAX_SUPP_RATES			32  #define NL80211_MAX_SUPP_HT_RATES		77 diff --git a/include/uapi/linux/ppp-ioctl.h b/include/uapi/linux/ppp-ioctl.h index b19a9c249b15..784c2e3e572e 100644 --- a/include/uapi/linux/ppp-ioctl.h +++ b/include/uapi/linux/ppp-ioctl.h @@ -106,7 +106,7 @@ struct pppol2tp_ioc_stats {  #define PPPIOCGIDLE	_IOR('t', 63, struct ppp_idle) /* get idle time */  #define PPPIOCNEWUNIT	_IOWR('t', 62, int)	/* create new ppp unit */  #define PPPIOCATTACH	_IOW('t', 61, int)	/* attach to ppp unit */ -#define PPPIOCDETACH	_IOW('t', 60, int)	/* detach from ppp unit/chan */ +#define PPPIOCDETACH	_IOW('t', 60, int)	/* obsolete, do not use */  #define PPPIOCSMRRU	_IOW('t', 59, int)	/* set multilink MRU */  #define PPPIOCCONNECT	_IOW('t', 58, int)	/* connect channel to unit */  #define PPPIOCDISCONN	_IO('t', 57)		/* disconnect channel */ diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index af5f8c2df87a..db9f15f5db04 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -207,4 +207,16 @@ struct prctl_mm_map {  # define PR_SVE_VL_LEN_MASK		0xffff  # define PR_SVE_VL_INHERIT		(1 << 17) /* inherit across exec */ +/* Per task speculation control */ +#define PR_GET_SPECULATION_CTRL		52 +#define PR_SET_SPECULATION_CTRL		53 +/* Speculation control variants */ +# define PR_SPEC_STORE_BYPASS		0 +/* Return and control values for PR_SET/GET_SPECULATION_CTRL */ +# define PR_SPEC_NOT_AFFECTED		0 +# define PR_SPEC_PRCTL			(1UL << 0) +# define PR_SPEC_ENABLE			(1UL << 1) +# define PR_SPEC_DISABLE		(1UL << 2) +# define PR_SPEC_FORCE_DISABLE		(1UL << 3) +  #endif /* _LINUX_PRCTL_H */ diff --git a/include/uapi/linux/seccomp.h b/include/uapi/linux/seccomp.h index 2a0bd9dd104d..9efc0e73d50b 100644 --- a/include/uapi/linux/seccomp.h +++ b/include/uapi/linux/seccomp.h @@ -17,8 +17,9 @@  #define SECCOMP_GET_ACTION_AVAIL	2  /* Valid flags for SECCOMP_SET_MODE_FILTER */ -#define SECCOMP_FILTER_FLAG_TSYNC	1 -#define SECCOMP_FILTER_FLAG_LOG		2 +#define SECCOMP_FILTER_FLAG_TSYNC	(1UL << 0) +#define SECCOMP_FILTER_FLAG_LOG		(1UL << 1) +#define SECCOMP_FILTER_FLAG_SPEC_ALLOW	(1UL << 2)  /*   * All BPF programs must return a 32-bit value.  | 
