mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-06 06:52:52 -04:00
Merge 5.8-rc6 into staging-next
We need the staging fixes in here, and it resolves a merge issue with an iio driver. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include <asm/smp.h>
|
||||
|
||||
DECLARE_PER_CPU(struct mmiowb_state, __mmiowb_state);
|
||||
#define __mmiowb_state() this_cpu_ptr(&__mmiowb_state)
|
||||
#define __mmiowb_state() raw_cpu_ptr(&__mmiowb_state)
|
||||
#else
|
||||
#define __mmiowb_state() arch_mmiowb_state()
|
||||
#endif /* arch_mmiowb_state */
|
||||
@@ -35,7 +35,9 @@ DECLARE_PER_CPU(struct mmiowb_state, __mmiowb_state);
|
||||
static inline void mmiowb_set_pending(void)
|
||||
{
|
||||
struct mmiowb_state *ms = __mmiowb_state();
|
||||
ms->mmiowb_pending = ms->nesting_count;
|
||||
|
||||
if (likely(ms->nesting_count))
|
||||
ms->mmiowb_pending = ms->nesting_count;
|
||||
}
|
||||
|
||||
static inline void mmiowb_spin_lock(void)
|
||||
|
||||
@@ -29,8 +29,8 @@ struct alg_sock {
|
||||
|
||||
struct sock *parent;
|
||||
|
||||
unsigned int refcnt;
|
||||
unsigned int nokey_refcnt;
|
||||
atomic_t refcnt;
|
||||
atomic_t nokey_refcnt;
|
||||
|
||||
const struct af_alg_type *type;
|
||||
void *private;
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
* position @h. For example
|
||||
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
|
||||
*/
|
||||
#if !defined(__ASSEMBLY__) && \
|
||||
(!defined(CONFIG_CC_IS_GCC) || CONFIG_GCC_VERSION >= 49000)
|
||||
#if !defined(__ASSEMBLY__)
|
||||
#include <linux/build_bug.h>
|
||||
#define GENMASK_INPUT_CHECK(h, l) \
|
||||
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
|
||||
|
||||
@@ -590,6 +590,7 @@ struct request_queue {
|
||||
u64 write_hints[BLK_MAX_WRITE_HINTS];
|
||||
};
|
||||
|
||||
/* Keep blk_queue_flag_name[] in sync with the definitions below */
|
||||
#define QUEUE_FLAG_STOPPED 0 /* queue is stopped */
|
||||
#define QUEUE_FLAG_DYING 1 /* queue being torn down */
|
||||
#define QUEUE_FLAG_NOMERGES 3 /* disable merge attempts */
|
||||
|
||||
@@ -33,7 +33,7 @@ int netns_bpf_prog_query(const union bpf_attr *attr,
|
||||
union bpf_attr __user *uattr);
|
||||
int netns_bpf_prog_attach(const union bpf_attr *attr,
|
||||
struct bpf_prog *prog);
|
||||
int netns_bpf_prog_detach(const union bpf_attr *attr);
|
||||
int netns_bpf_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype);
|
||||
int netns_bpf_link_create(const union bpf_attr *attr,
|
||||
struct bpf_prog *prog);
|
||||
#else
|
||||
@@ -49,7 +49,8 @@ static inline int netns_bpf_prog_attach(const union bpf_attr *attr,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int netns_bpf_prog_detach(const union bpf_attr *attr)
|
||||
static inline int netns_bpf_prog_detach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
@@ -1543,13 +1543,16 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map)
|
||||
#endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */
|
||||
|
||||
#if defined(CONFIG_BPF_STREAM_PARSER)
|
||||
int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, u32 which);
|
||||
int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog,
|
||||
struct bpf_prog *old, u32 which);
|
||||
int sock_map_get_from_fd(const union bpf_attr *attr, struct bpf_prog *prog);
|
||||
int sock_map_prog_detach(const union bpf_attr *attr, enum bpf_prog_type ptype);
|
||||
void sock_map_unhash(struct sock *sk);
|
||||
void sock_map_close(struct sock *sk, long timeout);
|
||||
#else
|
||||
static inline int sock_map_prog_update(struct bpf_map *map,
|
||||
struct bpf_prog *prog, u32 which)
|
||||
struct bpf_prog *prog,
|
||||
struct bpf_prog *old, u32 which)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1559,6 +1562,12 @@ static inline int sock_map_get_from_fd(const union bpf_attr *attr,
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int sock_map_prog_detach(const union bpf_attr *attr,
|
||||
enum bpf_prog_type ptype)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif /* CONFIG_BPF_STREAM_PARSER */
|
||||
|
||||
#if defined(CONFIG_INET) && defined(CONFIG_BPF_SYSCALL)
|
||||
|
||||
@@ -82,6 +82,11 @@ static inline bool btf_type_is_int(const struct btf_type *t)
|
||||
return BTF_INFO_KIND(t->info) == BTF_KIND_INT;
|
||||
}
|
||||
|
||||
static inline bool btf_type_is_small_int(const struct btf_type *t)
|
||||
{
|
||||
return btf_type_is_int(t) && t->size <= sizeof(u64);
|
||||
}
|
||||
|
||||
static inline bool btf_type_is_enum(const struct btf_type *t)
|
||||
{
|
||||
return BTF_INFO_KIND(t->info) == BTF_KIND_ENUM;
|
||||
|
||||
@@ -790,7 +790,9 @@ struct sock_cgroup_data {
|
||||
union {
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
struct {
|
||||
u8 is_data;
|
||||
u8 is_data : 1;
|
||||
u8 no_refcnt : 1;
|
||||
u8 unused : 6;
|
||||
u8 padding;
|
||||
u16 prioidx;
|
||||
u32 classid;
|
||||
@@ -800,7 +802,9 @@ struct sock_cgroup_data {
|
||||
u32 classid;
|
||||
u16 prioidx;
|
||||
u8 padding;
|
||||
u8 is_data;
|
||||
u8 unused : 6;
|
||||
u8 no_refcnt : 1;
|
||||
u8 is_data : 1;
|
||||
} __packed;
|
||||
#endif
|
||||
u64 val;
|
||||
|
||||
@@ -822,6 +822,7 @@ extern spinlock_t cgroup_sk_update_lock;
|
||||
|
||||
void cgroup_sk_alloc_disable(void);
|
||||
void cgroup_sk_alloc(struct sock_cgroup_data *skcd);
|
||||
void cgroup_sk_clone(struct sock_cgroup_data *skcd);
|
||||
void cgroup_sk_free(struct sock_cgroup_data *skcd);
|
||||
|
||||
static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
|
||||
@@ -835,7 +836,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
|
||||
*/
|
||||
v = READ_ONCE(skcd->val);
|
||||
|
||||
if (v & 1)
|
||||
if (v & 3)
|
||||
return &cgrp_dfl_root.cgrp;
|
||||
|
||||
return (struct cgroup *)(unsigned long)v ?: &cgrp_dfl_root.cgrp;
|
||||
@@ -847,6 +848,7 @@ static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)
|
||||
#else /* CONFIG_CGROUP_DATA */
|
||||
|
||||
static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) {}
|
||||
static inline void cgroup_sk_clone(struct sock_cgroup_data *skcd) {}
|
||||
static inline void cgroup_sk_free(struct sock_cgroup_data *skcd) {}
|
||||
|
||||
#endif /* CONFIG_CGROUP_DATA */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
+ __GNUC_PATCHLEVEL__)
|
||||
|
||||
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */
|
||||
#if GCC_VERSION < 40800
|
||||
#if GCC_VERSION < 40900
|
||||
# error Sorry, your compiler is too old - please upgrade it.
|
||||
#endif
|
||||
|
||||
|
||||
@@ -252,32 +252,8 @@ struct ftrace_likely_data {
|
||||
* __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving
|
||||
* non-scalar types unchanged.
|
||||
*/
|
||||
#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900) || defined(__CHECKER__)
|
||||
/*
|
||||
* We build this out of a couple of helper macros in a vain attempt to
|
||||
* help you keep your lunch down while reading it.
|
||||
*/
|
||||
#define __pick_scalar_type(x, type, otherwise) \
|
||||
__builtin_choose_expr(__same_type(x, type), (type)0, otherwise)
|
||||
|
||||
/*
|
||||
* 'char' is not type-compatible with either 'signed char' or 'unsigned char',
|
||||
* so we include the naked type here as well as the signed/unsigned variants.
|
||||
*/
|
||||
#define __pick_integer_type(x, type, otherwise) \
|
||||
__pick_scalar_type(x, type, \
|
||||
__pick_scalar_type(x, unsigned type, \
|
||||
__pick_scalar_type(x, signed type, otherwise)))
|
||||
|
||||
#define __unqual_scalar_typeof(x) typeof( \
|
||||
__pick_integer_type(x, char, \
|
||||
__pick_integer_type(x, short, \
|
||||
__pick_integer_type(x, int, \
|
||||
__pick_integer_type(x, long, \
|
||||
__pick_integer_type(x, long long, x))))))
|
||||
#else
|
||||
/*
|
||||
* If supported, prefer C11 _Generic for better compile-times. As above, 'char'
|
||||
* Prefer C11 _Generic for better compile-times and simpler code. Note: 'char'
|
||||
* is not type-compatible with 'signed char', and we define a separate case.
|
||||
*/
|
||||
#define __scalar_type_to_expr_cases(type) \
|
||||
@@ -293,7 +269,6 @@ struct ftrace_likely_data {
|
||||
__scalar_type_to_expr_cases(long), \
|
||||
__scalar_type_to_expr_cases(long long), \
|
||||
default: (x)))
|
||||
#endif
|
||||
|
||||
/* Is this type a native word size -- useful for atomic operations */
|
||||
#define __native_word(t) \
|
||||
|
||||
@@ -433,7 +433,8 @@ enum dl_dev_state {
|
||||
* @suppliers: List of links to supplier devices.
|
||||
* @consumers: List of links to consumer devices.
|
||||
* @needs_suppliers: Hook to global list of devices waiting for suppliers.
|
||||
* @defer_sync: Hook to global list of devices that have deferred sync_state.
|
||||
* @defer_hook: Hook to global list of devices that have deferred sync_state or
|
||||
* deferred fw_devlink.
|
||||
* @need_for_probe: If needs_suppliers is on a list, this indicates if the
|
||||
* suppliers are needed for probe or not.
|
||||
* @status: Driver status information.
|
||||
@@ -442,7 +443,7 @@ struct dev_links_info {
|
||||
struct list_head suppliers;
|
||||
struct list_head consumers;
|
||||
struct list_head needs_suppliers;
|
||||
struct list_head defer_sync;
|
||||
struct list_head defer_hook;
|
||||
bool need_for_probe;
|
||||
enum dl_dev_state status;
|
||||
};
|
||||
|
||||
@@ -311,6 +311,7 @@ struct dma_buf {
|
||||
void *vmap_ptr;
|
||||
const char *exp_name;
|
||||
const char *name;
|
||||
spinlock_t name_lock; /* spinlock to protect name access */
|
||||
struct module *owner;
|
||||
struct list_head list_node;
|
||||
void *priv;
|
||||
|
||||
@@ -69,6 +69,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size,
|
||||
u64 dma_direct_get_required_mask(struct device *dev);
|
||||
gfp_t dma_direct_optimal_gfp_mask(struct device *dev, u64 dma_mask,
|
||||
u64 *phys_mask);
|
||||
bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size);
|
||||
void *dma_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
||||
gfp_t gfp, unsigned long attrs);
|
||||
void dma_direct_free(struct device *dev, size_t size, void *cpu_addr,
|
||||
@@ -85,4 +86,5 @@ int dma_direct_mmap(struct device *dev, struct vm_area_struct *vma,
|
||||
void *cpu_addr, dma_addr_t dma_addr, size_t size,
|
||||
unsigned long attrs);
|
||||
int dma_direct_supported(struct device *dev, u64 mask);
|
||||
bool dma_direct_need_sync(struct device *dev, dma_addr_t dma_addr);
|
||||
#endif /* _LINUX_DMA_DIRECT_H */
|
||||
|
||||
@@ -461,6 +461,7 @@ int dma_set_mask(struct device *dev, u64 mask);
|
||||
int dma_set_coherent_mask(struct device *dev, u64 mask);
|
||||
u64 dma_get_required_mask(struct device *dev);
|
||||
size_t dma_max_mapping_size(struct device *dev);
|
||||
bool dma_need_sync(struct device *dev, dma_addr_t dma_addr);
|
||||
unsigned long dma_get_merge_boundary(struct device *dev);
|
||||
#else /* CONFIG_HAS_DMA */
|
||||
static inline dma_addr_t dma_map_page_attrs(struct device *dev,
|
||||
@@ -571,6 +572,10 @@ static inline size_t dma_max_mapping_size(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline bool dma_need_sync(struct device *dev, dma_addr_t dma_addr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline unsigned long dma_get_merge_boundary(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -884,12 +884,12 @@ void bpf_jit_compile(struct bpf_prog *prog);
|
||||
bool bpf_jit_needs_zext(void);
|
||||
bool bpf_helper_changes_pkt_data(void *func);
|
||||
|
||||
static inline bool bpf_dump_raw_ok(void)
|
||||
static inline bool bpf_dump_raw_ok(const struct cred *cred)
|
||||
{
|
||||
/* Reconstruction of call-sites is dependent on kallsyms,
|
||||
* thus make dump the same restriction.
|
||||
*/
|
||||
return kallsyms_show_value() == 1;
|
||||
return kallsyms_show_value(cred);
|
||||
}
|
||||
|
||||
struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
|
||||
|
||||
@@ -315,6 +315,7 @@ enum rw_hint {
|
||||
#define IOCB_SYNC (1 << 5)
|
||||
#define IOCB_WRITE (1 << 6)
|
||||
#define IOCB_NOWAIT (1 << 7)
|
||||
#define IOCB_NOIO (1 << 9)
|
||||
|
||||
struct kiocb {
|
||||
struct file *ki_filp;
|
||||
@@ -1917,7 +1918,6 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
|
||||
struct iovec *fast_pointer,
|
||||
struct iovec **ret_pointer);
|
||||
|
||||
extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
|
||||
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
|
||||
extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
|
||||
extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
|
||||
@@ -3033,6 +3033,7 @@ extern int kernel_read_file_from_path_initns(const char *, void **, loff_t *, lo
|
||||
extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t,
|
||||
enum kernel_read_file_id);
|
||||
extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
|
||||
ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos);
|
||||
extern ssize_t kernel_write(struct file *, const void *, size_t, loff_t *);
|
||||
extern ssize_t __kernel_write(struct file *, const void *, size_t, loff_t *);
|
||||
extern struct file * open_exec(const char *);
|
||||
|
||||
@@ -109,6 +109,7 @@ struct fs_context {
|
||||
enum fs_context_phase phase:8; /* The phase the context is in */
|
||||
bool need_free:1; /* Need to call ops->free() */
|
||||
bool global:1; /* Goes into &init_user_ns */
|
||||
bool oldapi:1; /* Coming from mount(2) */
|
||||
};
|
||||
|
||||
struct fs_context_operations {
|
||||
|
||||
@@ -3333,13 +3333,17 @@ struct ieee80211_multiple_bssid_configuration {
|
||||
#define WLAN_AKM_SUITE_TDLS SUITE(0x000FAC, 7)
|
||||
#define WLAN_AKM_SUITE_SAE SUITE(0x000FAC, 8)
|
||||
#define WLAN_AKM_SUITE_FT_OVER_SAE SUITE(0x000FAC, 9)
|
||||
#define WLAN_AKM_SUITE_AP_PEER_KEY SUITE(0x000FAC, 10)
|
||||
#define WLAN_AKM_SUITE_8021X_SUITE_B SUITE(0x000FAC, 11)
|
||||
#define WLAN_AKM_SUITE_8021X_SUITE_B_192 SUITE(0x000FAC, 12)
|
||||
#define WLAN_AKM_SUITE_FT_8021X_SHA384 SUITE(0x000FAC, 13)
|
||||
#define WLAN_AKM_SUITE_FILS_SHA256 SUITE(0x000FAC, 14)
|
||||
#define WLAN_AKM_SUITE_FILS_SHA384 SUITE(0x000FAC, 15)
|
||||
#define WLAN_AKM_SUITE_FT_FILS_SHA256 SUITE(0x000FAC, 16)
|
||||
#define WLAN_AKM_SUITE_FT_FILS_SHA384 SUITE(0x000FAC, 17)
|
||||
#define WLAN_AKM_SUITE_OWE SUITE(0x000FAC, 18)
|
||||
#define WLAN_AKM_SUITE_FT_PSK_SHA384 SUITE(0x000FAC, 19)
|
||||
#define WLAN_AKM_SUITE_PSK_SHA384 SUITE(0x000FAC, 20)
|
||||
|
||||
#define WLAN_MAX_KEY_LEN 32
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */
|
||||
#define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */
|
||||
|
||||
#define VLAN_MAX_DEPTH 8 /* Max. number of nested VLAN tags parsed */
|
||||
|
||||
/*
|
||||
* struct vlan_hdr - vlan header
|
||||
* @h_vlan_TCI: priority and VLAN ID
|
||||
@@ -577,10 +579,10 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
|
||||
* Returns the EtherType of the packet, regardless of whether it is
|
||||
* vlan encapsulated (normal or hardware accelerated) or not.
|
||||
*/
|
||||
static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type,
|
||||
static inline __be16 __vlan_get_protocol(const struct sk_buff *skb, __be16 type,
|
||||
int *depth)
|
||||
{
|
||||
unsigned int vlan_depth = skb->mac_len;
|
||||
unsigned int vlan_depth = skb->mac_len, parse_depth = VLAN_MAX_DEPTH;
|
||||
|
||||
/* if type is 802.1Q/AD then the header should already be
|
||||
* present at mac_len - VLAN_HLEN (if mac_len > 0), or at
|
||||
@@ -595,13 +597,12 @@ static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type,
|
||||
vlan_depth = ETH_HLEN;
|
||||
}
|
||||
do {
|
||||
struct vlan_hdr *vh;
|
||||
struct vlan_hdr vhdr, *vh;
|
||||
|
||||
if (unlikely(!pskb_may_pull(skb,
|
||||
vlan_depth + VLAN_HLEN)))
|
||||
vh = skb_header_pointer(skb, vlan_depth, sizeof(vhdr), &vhdr);
|
||||
if (unlikely(!vh || !--parse_depth))
|
||||
return 0;
|
||||
|
||||
vh = (struct vlan_hdr *)(skb->data + vlan_depth);
|
||||
type = vh->h_vlan_encapsulated_proto;
|
||||
vlan_depth += VLAN_HLEN;
|
||||
} while (eth_type_vlan(type));
|
||||
@@ -620,11 +621,25 @@ static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type,
|
||||
* Returns the EtherType of the packet, regardless of whether it is
|
||||
* vlan encapsulated (normal or hardware accelerated) or not.
|
||||
*/
|
||||
static inline __be16 vlan_get_protocol(struct sk_buff *skb)
|
||||
static inline __be16 vlan_get_protocol(const struct sk_buff *skb)
|
||||
{
|
||||
return __vlan_get_protocol(skb, skb->protocol, NULL);
|
||||
}
|
||||
|
||||
/* A getter for the SKB protocol field which will handle VLAN tags consistently
|
||||
* whether VLAN acceleration is enabled or not.
|
||||
*/
|
||||
static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_vlan)
|
||||
{
|
||||
if (!skip_vlan)
|
||||
/* VLAN acceleration strips the VLAN header from the skb and
|
||||
* moves it to skb->vlan_proto
|
||||
*/
|
||||
return skb_vlan_tag_present(skb) ? skb->vlan_proto : skb->protocol;
|
||||
|
||||
return vlan_get_protocol(skb);
|
||||
}
|
||||
|
||||
static inline void vlan_set_encap_proto(struct sk_buff *skb,
|
||||
struct vlan_hdr *vhdr)
|
||||
{
|
||||
|
||||
@@ -67,8 +67,15 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
||||
{ "ELAN062B", 0 },
|
||||
{ "ELAN062C", 0 },
|
||||
{ "ELAN062D", 0 },
|
||||
{ "ELAN062E", 0 }, /* Lenovo V340 Whiskey Lake U */
|
||||
{ "ELAN062F", 0 }, /* Lenovo V340 Comet Lake U */
|
||||
{ "ELAN0631", 0 },
|
||||
{ "ELAN0632", 0 },
|
||||
{ "ELAN0633", 0 }, /* Lenovo S145 */
|
||||
{ "ELAN0634", 0 }, /* Lenovo V340 Ice lake */
|
||||
{ "ELAN0635", 0 }, /* Lenovo V1415-IIL */
|
||||
{ "ELAN0636", 0 }, /* Lenovo V1415-Dali */
|
||||
{ "ELAN0637", 0 }, /* Lenovo V1415-IGLR */
|
||||
{ "ELAN1000", 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \
|
||||
2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1)
|
||||
|
||||
struct cred;
|
||||
struct module;
|
||||
|
||||
static inline int is_kernel_inittext(unsigned long addr)
|
||||
@@ -98,7 +99,7 @@ int lookup_symbol_name(unsigned long addr, char *symname);
|
||||
int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
|
||||
|
||||
/* How and when do we show kallsyms values? */
|
||||
extern int kallsyms_show_value(void);
|
||||
extern bool kallsyms_show_value(const struct cred *cred);
|
||||
|
||||
#else /* !CONFIG_KALLSYMS */
|
||||
|
||||
@@ -158,7 +159,7 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
static inline int kallsyms_show_value(void)
|
||||
static inline bool kallsyms_show_value(const struct cred *cred)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -176,6 +176,17 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code,
|
||||
char *remcom_out_buffer,
|
||||
struct pt_regs *regs);
|
||||
|
||||
/**
|
||||
* kgdb_arch_handle_qxfer_pkt - Handle architecture specific GDB XML
|
||||
* packets.
|
||||
* @remcom_in_buffer: The buffer of the packet we have read.
|
||||
* @remcom_out_buffer: The buffer of %BUFMAX bytes to write a packet into.
|
||||
*/
|
||||
|
||||
extern void
|
||||
kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffer,
|
||||
char *remcom_out_buffer);
|
||||
|
||||
/**
|
||||
* kgdb_call_nmi_hook - Call kgdb_nmicallback() on the current CPU
|
||||
* @ignored: This parameter is only here to match the prototype.
|
||||
@@ -314,6 +325,7 @@ extern int kgdb_hex2mem(char *buf, char *mem, int count);
|
||||
|
||||
extern int kgdb_isremovedbreak(unsigned long addr);
|
||||
extern void kgdb_schedule_breakpoint(void);
|
||||
extern int kgdb_has_hit_break(unsigned long addr);
|
||||
|
||||
extern int
|
||||
kgdb_handle_exception(int ex_vector, int signo, int err_code,
|
||||
|
||||
@@ -150,7 +150,7 @@ LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer,
|
||||
size_t buffer_size)
|
||||
LSM_HOOK(void, LSM_RET_VOID, inode_getsecid, struct inode *inode, u32 *secid)
|
||||
LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new)
|
||||
LSM_HOOK(int, 0, inode_copy_up_xattr, const char *name)
|
||||
LSM_HOOK(int, -EOPNOTSUPP, inode_copy_up_xattr, const char *name)
|
||||
LSM_HOOK(int, 0, kernfs_init_security, struct kernfs_node *kn_dir,
|
||||
struct kernfs_node *kn)
|
||||
LSM_HOOK(int, 0, file_permission, struct file *file, int mask)
|
||||
@@ -360,7 +360,7 @@ LSM_HOOK(int, 0, key_alloc, struct key *key, const struct cred *cred,
|
||||
unsigned long flags)
|
||||
LSM_HOOK(void, LSM_RET_VOID, key_free, struct key *key)
|
||||
LSM_HOOK(int, 0, key_permission, key_ref_t key_ref, const struct cred *cred,
|
||||
unsigned perm)
|
||||
enum key_need_perm need_perm)
|
||||
LSM_HOOK(int, 0, key_getsecurity, struct key *key, char **_buffer)
|
||||
#endif /* CONFIG_KEYS */
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ enum {
|
||||
MLX5_REG_MCDA = 0x9063,
|
||||
MLX5_REG_MCAM = 0x907f,
|
||||
MLX5_REG_MIRC = 0x9162,
|
||||
MLX5_REG_SBCAM = 0xB01F,
|
||||
MLX5_REG_RESOURCE_DUMP = 0xC000,
|
||||
};
|
||||
|
||||
|
||||
@@ -9960,6 +9960,34 @@ struct mlx5_ifc_pptb_reg_bits {
|
||||
u8 untagged_buff[0x4];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_sbcam_reg_bits {
|
||||
u8 reserved_at_0[0x8];
|
||||
u8 feature_group[0x8];
|
||||
u8 reserved_at_10[0x8];
|
||||
u8 access_reg_group[0x8];
|
||||
|
||||
u8 reserved_at_20[0x20];
|
||||
|
||||
u8 sb_access_reg_cap_mask[4][0x20];
|
||||
|
||||
u8 reserved_at_c0[0x80];
|
||||
|
||||
u8 sb_feature_cap_mask[4][0x20];
|
||||
|
||||
u8 reserved_at_1c0[0x40];
|
||||
|
||||
u8 cap_total_buffer_size[0x20];
|
||||
|
||||
u8 cap_cell_size[0x10];
|
||||
u8 cap_max_pg_buffers[0x8];
|
||||
u8 cap_num_pool_supported[0x8];
|
||||
|
||||
u8 reserved_at_240[0x8];
|
||||
u8 cap_sbsr_stat_size[0x8];
|
||||
u8 cap_max_tclass_data[0x8];
|
||||
u8 cap_max_cpu_ingress_tclass_sb[0x8];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_pbmc_reg_bits {
|
||||
u8 reserved_at_0[0x8];
|
||||
u8 local_port[0x8];
|
||||
|
||||
@@ -318,7 +318,7 @@ struct pcmcia_device_id {
|
||||
#define INPUT_DEVICE_ID_LED_MAX 0x0f
|
||||
#define INPUT_DEVICE_ID_SND_MAX 0x07
|
||||
#define INPUT_DEVICE_ID_FF_MAX 0x7f
|
||||
#define INPUT_DEVICE_ID_SW_MAX 0x0f
|
||||
#define INPUT_DEVICE_ID_SW_MAX 0x10
|
||||
#define INPUT_DEVICE_ID_PROP_MAX 0x1f
|
||||
|
||||
#define INPUT_DEVICE_ID_MATCH_BUS 1
|
||||
|
||||
@@ -2169,12 +2169,11 @@ static inline int pci_pcie_type(const struct pci_dev *dev)
|
||||
*/
|
||||
static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
|
||||
{
|
||||
struct pci_dev *bridge = pci_upstream_bridge(dev);
|
||||
|
||||
while (bridge) {
|
||||
if (pci_pcie_type(bridge) == PCI_EXP_TYPE_ROOT_PORT)
|
||||
return bridge;
|
||||
bridge = pci_upstream_bridge(bridge);
|
||||
while (dev) {
|
||||
if (pci_is_pcie(dev) &&
|
||||
pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
|
||||
return dev;
|
||||
dev = pci_upstream_bridge(dev);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -155,7 +155,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
|
||||
* Loop over each sg element in the given sg_table object.
|
||||
*/
|
||||
#define for_each_sgtable_sg(sgt, sg, i) \
|
||||
for_each_sg(sgt->sgl, sg, sgt->orig_nents, i)
|
||||
for_each_sg((sgt)->sgl, sg, (sgt)->orig_nents, i)
|
||||
|
||||
/*
|
||||
* Loop over each sg element in the given *DMA mapped* sg_table object.
|
||||
@@ -163,7 +163,7 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
|
||||
* of the each element.
|
||||
*/
|
||||
#define for_each_sgtable_dma_sg(sgt, sg, i) \
|
||||
for_each_sg(sgt->sgl, sg, sgt->nents, i)
|
||||
for_each_sg((sgt)->sgl, sg, (sgt)->nents, i)
|
||||
|
||||
/**
|
||||
* sg_chain - Chain two sglists together
|
||||
@@ -451,7 +451,7 @@ sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter)
|
||||
* See also for_each_sg_page(). In each loop it operates on PAGE_SIZE unit.
|
||||
*/
|
||||
#define for_each_sgtable_page(sgt, piter, pgoffset) \
|
||||
for_each_sg_page(sgt->sgl, piter, sgt->orig_nents, pgoffset)
|
||||
for_each_sg_page((sgt)->sgl, piter, (sgt)->orig_nents, pgoffset)
|
||||
|
||||
/**
|
||||
* for_each_sgtable_dma_page - iterate over the DMA mapped sg_table object
|
||||
@@ -465,7 +465,7 @@ sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter)
|
||||
* unit.
|
||||
*/
|
||||
#define for_each_sgtable_dma_page(sgt, dma_iter, pgoffset) \
|
||||
for_each_sg_dma_page(sgt->sgl, dma_iter, sgt->nents, pgoffset)
|
||||
for_each_sg_dma_page((sgt)->sgl, dma_iter, (sgt)->nents, pgoffset)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -114,10 +114,6 @@ struct task_group;
|
||||
|
||||
#define task_is_stopped_or_traced(task) ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
|
||||
|
||||
#define task_contributes_to_load(task) ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
|
||||
(task->flags & PF_FROZEN) == 0 && \
|
||||
(task->state & TASK_NOLOAD) == 0)
|
||||
|
||||
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
|
||||
|
||||
/*
|
||||
|
||||
@@ -19,6 +19,7 @@ struct task_struct;
|
||||
#define JOBCTL_TRAPPING_BIT 21 /* switching to TRACED */
|
||||
#define JOBCTL_LISTENING_BIT 22 /* ptracer is listening for events */
|
||||
#define JOBCTL_TRAP_FREEZE_BIT 23 /* trap for cgroup freezer */
|
||||
#define JOBCTL_TASK_WORK_BIT 24 /* set by TWA_SIGNAL */
|
||||
|
||||
#define JOBCTL_STOP_DEQUEUED (1UL << JOBCTL_STOP_DEQUEUED_BIT)
|
||||
#define JOBCTL_STOP_PENDING (1UL << JOBCTL_STOP_PENDING_BIT)
|
||||
@@ -28,9 +29,10 @@ struct task_struct;
|
||||
#define JOBCTL_TRAPPING (1UL << JOBCTL_TRAPPING_BIT)
|
||||
#define JOBCTL_LISTENING (1UL << JOBCTL_LISTENING_BIT)
|
||||
#define JOBCTL_TRAP_FREEZE (1UL << JOBCTL_TRAP_FREEZE_BIT)
|
||||
#define JOBCTL_TASK_WORK (1UL << JOBCTL_TASK_WORK_BIT)
|
||||
|
||||
#define JOBCTL_TRAP_MASK (JOBCTL_TRAP_STOP | JOBCTL_TRAP_NOTIFY)
|
||||
#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK)
|
||||
#define JOBCTL_PENDING_MASK (JOBCTL_STOP_PENDING | JOBCTL_TRAP_MASK | JOBCTL_TASK_WORK)
|
||||
|
||||
extern bool task_set_jobctl_pending(struct task_struct *task, unsigned long mask);
|
||||
extern void task_clear_jobctl_trapping(struct task_struct *task);
|
||||
|
||||
@@ -462,10 +462,104 @@ extern void uart_handle_cts_change(struct uart_port *uport,
|
||||
extern void uart_insert_char(struct uart_port *port, unsigned int status,
|
||||
unsigned int overrun, unsigned int ch, unsigned int flag);
|
||||
|
||||
extern int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch);
|
||||
extern int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch);
|
||||
extern void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long flags);
|
||||
extern int uart_handle_break(struct uart_port *port);
|
||||
#ifdef CONFIG_MAGIC_SYSRQ_SERIAL
|
||||
#define SYSRQ_TIMEOUT (HZ * 5)
|
||||
|
||||
bool uart_try_toggle_sysrq(struct uart_port *port, unsigned int ch);
|
||||
|
||||
static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
|
||||
{
|
||||
if (!port->sysrq)
|
||||
return 0;
|
||||
|
||||
if (ch && time_before(jiffies, port->sysrq)) {
|
||||
if (sysrq_mask()) {
|
||||
handle_sysrq(ch);
|
||||
port->sysrq = 0;
|
||||
return 1;
|
||||
}
|
||||
if (uart_try_toggle_sysrq(port, ch))
|
||||
return 1;
|
||||
}
|
||||
port->sysrq = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
|
||||
{
|
||||
if (!port->sysrq)
|
||||
return 0;
|
||||
|
||||
if (ch && time_before(jiffies, port->sysrq)) {
|
||||
if (sysrq_mask()) {
|
||||
port->sysrq_ch = ch;
|
||||
port->sysrq = 0;
|
||||
return 1;
|
||||
}
|
||||
if (uart_try_toggle_sysrq(port, ch))
|
||||
return 1;
|
||||
}
|
||||
port->sysrq = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
|
||||
{
|
||||
int sysrq_ch;
|
||||
|
||||
if (!port->has_sysrq) {
|
||||
spin_unlock_irqrestore(&port->lock, irqflags);
|
||||
return;
|
||||
}
|
||||
|
||||
sysrq_ch = port->sysrq_ch;
|
||||
port->sysrq_ch = 0;
|
||||
|
||||
spin_unlock_irqrestore(&port->lock, irqflags);
|
||||
|
||||
if (sysrq_ch)
|
||||
handle_sysrq(sysrq_ch);
|
||||
}
|
||||
#else /* CONFIG_MAGIC_SYSRQ_SERIAL */
|
||||
static inline int uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
|
||||
{
|
||||
spin_unlock_irqrestore(&port->lock, irqflags);
|
||||
}
|
||||
#endif /* CONFIG_MAGIC_SYSRQ_SERIAL */
|
||||
|
||||
/*
|
||||
* We do the SysRQ and SAK checking like this...
|
||||
*/
|
||||
static inline int uart_handle_break(struct uart_port *port)
|
||||
{
|
||||
struct uart_state *state = port->state;
|
||||
|
||||
if (port->handle_break)
|
||||
port->handle_break(port);
|
||||
|
||||
#ifdef CONFIG_MAGIC_SYSRQ_SERIAL
|
||||
if (port->has_sysrq && uart_console(port)) {
|
||||
if (!port->sysrq) {
|
||||
port->sysrq = jiffies + SYSRQ_TIMEOUT;
|
||||
return 1;
|
||||
}
|
||||
port->sysrq = 0;
|
||||
}
|
||||
#endif
|
||||
if (port->flags & UPF_SAK)
|
||||
do_SAK(state->port.tty);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* UART_ENABLE_MS - determine if port should enable modem status irqs
|
||||
|
||||
@@ -430,6 +430,19 @@ static inline void psock_set_prog(struct bpf_prog **pprog,
|
||||
bpf_prog_put(prog);
|
||||
}
|
||||
|
||||
static inline int psock_replace_prog(struct bpf_prog **pprog,
|
||||
struct bpf_prog *prog,
|
||||
struct bpf_prog *old)
|
||||
{
|
||||
if (cmpxchg(pprog, old, prog) != old)
|
||||
return -ENOENT;
|
||||
|
||||
if (old)
|
||||
bpf_prog_put(old);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void psock_progs_drop(struct sk_psock_progs *progs)
|
||||
{
|
||||
psock_set_prog(&progs->msg_parser, NULL);
|
||||
|
||||
@@ -13,7 +13,10 @@ init_task_work(struct callback_head *twork, task_work_func_t func)
|
||||
twork->func = func;
|
||||
}
|
||||
|
||||
int task_work_add(struct task_struct *task, struct callback_head *twork, bool);
|
||||
#define TWA_RESUME 1
|
||||
#define TWA_SIGNAL 2
|
||||
int task_work_add(struct task_struct *task, struct callback_head *twork, int);
|
||||
|
||||
struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t);
|
||||
void task_work_run(void);
|
||||
|
||||
|
||||
@@ -400,7 +400,15 @@ static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, co
|
||||
static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct neighbour *n = dst->ops->neigh_lookup(dst, skb, NULL);
|
||||
struct neighbour *n = NULL;
|
||||
|
||||
/* The packets from tunnel devices (eg bareudp) may have only
|
||||
* metadata in the dst pointer of skb. Hence a pointer check of
|
||||
* neigh_lookup is needed.
|
||||
*/
|
||||
if (dst->ops->neigh_lookup)
|
||||
n = dst->ops->neigh_lookup(dst, skb, NULL);
|
||||
|
||||
return IS_ERR(n) ? NULL : n;
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,8 @@ flow_dissector_init_keys(struct flow_dissector_key_control *key_control,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BPF_SYSCALL
|
||||
int flow_dissector_bpf_prog_attach(struct net *net, struct bpf_prog *prog);
|
||||
int flow_dissector_bpf_prog_attach_check(struct net *net,
|
||||
struct bpf_prog *prog);
|
||||
#endif /* CONFIG_BPF_SYSCALL */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,13 +35,6 @@ struct genl_info;
|
||||
* do additional, common, filtering and return an error
|
||||
* @post_doit: called after an operation's doit callback, it may
|
||||
* undo operations done by pre_doit, for example release locks
|
||||
* @mcast_bind: a socket bound to the given multicast group (which
|
||||
* is given as the offset into the groups array)
|
||||
* @mcast_unbind: a socket was unbound from the given multicast group.
|
||||
* Note that unbind() will not be called symmetrically if the
|
||||
* generic netlink family is removed while there are still open
|
||||
* sockets.
|
||||
* @attrbuf: buffer to store parsed attributes (private)
|
||||
* @mcgrps: multicast groups used by this family
|
||||
* @n_mcgrps: number of multicast groups
|
||||
* @mcgrp_offset: starting number of multicast group IDs in this family
|
||||
@@ -64,9 +57,6 @@ struct genl_family {
|
||||
void (*post_doit)(const struct genl_ops *ops,
|
||||
struct sk_buff *skb,
|
||||
struct genl_info *info);
|
||||
int (*mcast_bind)(struct net *net, int group);
|
||||
void (*mcast_unbind)(struct net *net, int group);
|
||||
struct nlattr ** attrbuf; /* private */
|
||||
const struct genl_ops * ops;
|
||||
const struct genl_multicast_group *mcgrps;
|
||||
unsigned int n_ops;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <linux/ip.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/if_vlan.h>
|
||||
|
||||
#include <net/inet_sock.h>
|
||||
#include <net/dsfield.h>
|
||||
@@ -172,7 +173,7 @@ static inline void ipv6_copy_dscp(unsigned int dscp, struct ipv6hdr *inner)
|
||||
|
||||
static inline int INET_ECN_set_ce(struct sk_buff *skb)
|
||||
{
|
||||
switch (skb->protocol) {
|
||||
switch (skb_protocol(skb, true)) {
|
||||
case cpu_to_be16(ETH_P_IP):
|
||||
if (skb_network_header(skb) + sizeof(struct iphdr) <=
|
||||
skb_tail_pointer(skb))
|
||||
@@ -191,7 +192,7 @@ static inline int INET_ECN_set_ce(struct sk_buff *skb)
|
||||
|
||||
static inline int INET_ECN_set_ect1(struct sk_buff *skb)
|
||||
{
|
||||
switch (skb->protocol) {
|
||||
switch (skb_protocol(skb, true)) {
|
||||
case cpu_to_be16(ETH_P_IP):
|
||||
if (skb_network_header(skb) + sizeof(struct iphdr) <=
|
||||
skb_tail_pointer(skb))
|
||||
@@ -272,12 +273,16 @@ static inline int IP_ECN_decapsulate(const struct iphdr *oiph,
|
||||
{
|
||||
__u8 inner;
|
||||
|
||||
if (skb->protocol == htons(ETH_P_IP))
|
||||
switch (skb_protocol(skb, true)) {
|
||||
case htons(ETH_P_IP):
|
||||
inner = ip_hdr(skb)->tos;
|
||||
else if (skb->protocol == htons(ETH_P_IPV6))
|
||||
break;
|
||||
case htons(ETH_P_IPV6):
|
||||
inner = ipv6_get_dsfield(ipv6_hdr(skb));
|
||||
else
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return INET_ECN_decapsulate(skb, oiph->tos, inner);
|
||||
}
|
||||
@@ -287,12 +292,16 @@ static inline int IP6_ECN_decapsulate(const struct ipv6hdr *oipv6h,
|
||||
{
|
||||
__u8 inner;
|
||||
|
||||
if (skb->protocol == htons(ETH_P_IP))
|
||||
switch (skb_protocol(skb, true)) {
|
||||
case htons(ETH_P_IP):
|
||||
inner = ip_hdr(skb)->tos;
|
||||
else if (skb->protocol == htons(ETH_P_IPV6))
|
||||
break;
|
||||
case htons(ETH_P_IPV6):
|
||||
inner = ipv6_get_dsfield(ipv6_hdr(skb));
|
||||
else
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return INET_ECN_decapsulate(skb, ipv6_get_dsfield(oipv6h), inner);
|
||||
}
|
||||
|
||||
@@ -290,6 +290,9 @@ int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
|
||||
struct ip_tunnel_parm *p, __u32 fwmark);
|
||||
void ip_tunnel_setup(struct net_device *dev, unsigned int net_id);
|
||||
|
||||
extern const struct header_ops ip_tunnel_header_ops;
|
||||
__be16 ip_tunnel_parse_protocol(const struct sk_buff *skb);
|
||||
|
||||
struct ip_tunnel_encap_ops {
|
||||
size_t (*encap_hlen)(struct ip_tunnel_encap *e);
|
||||
int (*build_header)(struct sk_buff *skb, struct ip_tunnel_encap *e,
|
||||
|
||||
@@ -9,10 +9,13 @@
|
||||
#include <linux/bpf-netns.h>
|
||||
|
||||
struct bpf_prog;
|
||||
struct bpf_prog_array;
|
||||
|
||||
struct netns_bpf {
|
||||
struct bpf_prog __rcu *progs[MAX_NETNS_BPF_ATTACH_TYPE];
|
||||
struct bpf_link *links[MAX_NETNS_BPF_ATTACH_TYPE];
|
||||
/* Array of programs to run compiled from progs or links */
|
||||
struct bpf_prog_array __rcu *run_array[MAX_NETNS_BPF_ATTACH_TYPE];
|
||||
struct bpf_prog *progs[MAX_NETNS_BPF_ATTACH_TYPE];
|
||||
struct list_head links[MAX_NETNS_BPF_ATTACH_TYPE];
|
||||
};
|
||||
|
||||
#endif /* __NETNS_BPF_H__ */
|
||||
|
||||
@@ -136,17 +136,6 @@ static inline void qdisc_run(struct Qdisc *q)
|
||||
}
|
||||
}
|
||||
|
||||
static inline __be16 tc_skb_protocol(const struct sk_buff *skb)
|
||||
{
|
||||
/* We need to take extra care in case the skb came via
|
||||
* vlan accelerated path. In that case, use skb->vlan_proto
|
||||
* as the original vlan header was already stripped.
|
||||
*/
|
||||
if (skb_vlan_tag_present(skb))
|
||||
return skb->vlan_proto;
|
||||
return skb->protocol;
|
||||
}
|
||||
|
||||
/* Calculate maximal size of packet seen by hard_start_xmit
|
||||
routine of this device.
|
||||
*/
|
||||
|
||||
@@ -533,7 +533,8 @@ enum sk_pacing {
|
||||
* be copied.
|
||||
*/
|
||||
#define SK_USER_DATA_NOCOPY 1UL
|
||||
#define SK_USER_DATA_PTRMASK ~(SK_USER_DATA_NOCOPY)
|
||||
#define SK_USER_DATA_BPF 2UL /* Managed by BPF */
|
||||
#define SK_USER_DATA_PTRMASK ~(SK_USER_DATA_NOCOPY | SK_USER_DATA_BPF)
|
||||
|
||||
/**
|
||||
* sk_user_data_is_nocopy - Test if sk_user_data pointer must not be copied
|
||||
|
||||
@@ -40,7 +40,7 @@ struct xsk_buff_pool {
|
||||
u32 headroom;
|
||||
u32 chunk_size;
|
||||
u32 frame_len;
|
||||
bool cheap_dma;
|
||||
bool dma_need_sync;
|
||||
bool unaligned;
|
||||
void *addrs;
|
||||
struct device *dev;
|
||||
@@ -80,7 +80,7 @@ static inline dma_addr_t xp_get_frame_dma(struct xdp_buff_xsk *xskb)
|
||||
void xp_dma_sync_for_cpu_slow(struct xdp_buff_xsk *xskb);
|
||||
static inline void xp_dma_sync_for_cpu(struct xdp_buff_xsk *xskb)
|
||||
{
|
||||
if (xskb->pool->cheap_dma)
|
||||
if (!xskb->pool->dma_need_sync)
|
||||
return;
|
||||
|
||||
xp_dma_sync_for_cpu_slow(xskb);
|
||||
@@ -91,7 +91,7 @@ void xp_dma_sync_for_device_slow(struct xsk_buff_pool *pool, dma_addr_t dma,
|
||||
static inline void xp_dma_sync_for_device(struct xsk_buff_pool *pool,
|
||||
dma_addr_t dma, size_t size)
|
||||
{
|
||||
if (pool->cheap_dma)
|
||||
if (!pool->dma_need_sync)
|
||||
return;
|
||||
|
||||
xp_dma_sync_for_device_slow(pool, dma, size);
|
||||
|
||||
@@ -66,6 +66,7 @@ struct snd_compr_runtime {
|
||||
* @direction: stream direction, playback/recording
|
||||
* @metadata_set: metadata set flag, true when set
|
||||
* @next_track: has userspace signal next track transition, true when set
|
||||
* @partial_drain: undergoing partial_drain for stream, true when set
|
||||
* @private_data: pointer to DSP private data
|
||||
* @dma_buffer: allocated buffer if any
|
||||
*/
|
||||
@@ -78,6 +79,7 @@ struct snd_compr_stream {
|
||||
enum snd_compr_direction direction;
|
||||
bool metadata_set;
|
||||
bool next_track;
|
||||
bool partial_drain;
|
||||
void *private_data;
|
||||
struct snd_dma_buffer dma_buffer;
|
||||
};
|
||||
@@ -182,7 +184,13 @@ static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)
|
||||
if (snd_BUG_ON(!stream))
|
||||
return;
|
||||
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
/* for partial_drain case we are back to running state on success */
|
||||
if (stream->partial_drain) {
|
||||
stream->runtime->state = SNDRV_PCM_STATE_RUNNING;
|
||||
stream->partial_drain = false; /* clear this flag as well */
|
||||
} else {
|
||||
stream->runtime->state = SNDRV_PCM_STATE_SETUP;
|
||||
}
|
||||
|
||||
wake_up(&stream->runtime->sleep);
|
||||
}
|
||||
|
||||
@@ -3171,13 +3171,12 @@ union bpf_attr {
|
||||
* int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
|
||||
* Description
|
||||
* Copy *size* bytes from *data* into a ring buffer *ringbuf*.
|
||||
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
|
||||
* new data availability is sent.
|
||||
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of
|
||||
* new data availability is sent unconditionally.
|
||||
* If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
|
||||
* of new data availability is sent.
|
||||
* If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
|
||||
* of new data availability is sent unconditionally.
|
||||
* Return
|
||||
* 0, on success;
|
||||
* < 0, on error.
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
|
||||
* Description
|
||||
@@ -3189,20 +3188,20 @@ union bpf_attr {
|
||||
* void bpf_ringbuf_submit(void *data, u64 flags)
|
||||
* Description
|
||||
* Submit reserved ring buffer sample, pointed to by *data*.
|
||||
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
|
||||
* new data availability is sent.
|
||||
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of
|
||||
* new data availability is sent unconditionally.
|
||||
* If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
|
||||
* of new data availability is sent.
|
||||
* If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
|
||||
* of new data availability is sent unconditionally.
|
||||
* Return
|
||||
* Nothing. Always succeeds.
|
||||
*
|
||||
* void bpf_ringbuf_discard(void *data, u64 flags)
|
||||
* Description
|
||||
* Discard reserved ring buffer sample, pointed to by *data*.
|
||||
* If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
|
||||
* new data availability is sent.
|
||||
* IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of
|
||||
* new data availability is sent unconditionally.
|
||||
* If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
|
||||
* of new data availability is sent.
|
||||
* If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
|
||||
* of new data availability is sent unconditionally.
|
||||
* Return
|
||||
* Nothing. Always succeeds.
|
||||
*
|
||||
@@ -3210,16 +3209,18 @@ union bpf_attr {
|
||||
* Description
|
||||
* Query various characteristics of provided ring buffer. What
|
||||
* exactly is queries is determined by *flags*:
|
||||
* - BPF_RB_AVAIL_DATA - amount of data not yet consumed;
|
||||
* - BPF_RB_RING_SIZE - the size of ring buffer;
|
||||
* - BPF_RB_CONS_POS - consumer position (can wrap around);
|
||||
* - BPF_RB_PROD_POS - producer(s) position (can wrap around);
|
||||
* Data returned is just a momentary snapshots of actual values
|
||||
*
|
||||
* * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed.
|
||||
* * **BPF_RB_RING_SIZE**: The size of ring buffer.
|
||||
* * **BPF_RB_CONS_POS**: Consumer position (can wrap around).
|
||||
* * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
|
||||
*
|
||||
* Data returned is just a momentary snapshot of actual values
|
||||
* and could be inaccurate, so this facility should be used to
|
||||
* power heuristics and for reporting, not to make 100% correct
|
||||
* calculation.
|
||||
* Return
|
||||
* Requested value, or 0, if flags are not recognized.
|
||||
* Requested value, or 0, if *flags* are not recognized.
|
||||
*
|
||||
* int bpf_csum_level(struct sk_buff *skb, u64 level)
|
||||
* Description
|
||||
|
||||
@@ -110,9 +110,12 @@ struct dsa_hw_desc {
|
||||
uint16_t rsvd1;
|
||||
union {
|
||||
uint8_t expected_res;
|
||||
/* create delta record */
|
||||
struct {
|
||||
uint64_t delta_addr;
|
||||
uint32_t max_delta_size;
|
||||
uint32_t delt_rsvd;
|
||||
uint8_t expected_res_mask;
|
||||
};
|
||||
uint32_t delta_rec_size;
|
||||
uint64_t dest2;
|
||||
|
||||
@@ -888,7 +888,8 @@
|
||||
#define SW_LINEIN_INSERT 0x0d /* set = inserted */
|
||||
#define SW_MUTE_DEVICE 0x0e /* set = device disabled */
|
||||
#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
|
||||
#define SW_MAX 0x0f
|
||||
#define SW_MACHINE_COVER 0x10 /* set = cover closed */
|
||||
#define SW_MAX 0x10
|
||||
#define SW_CNT (SW_MAX+1)
|
||||
|
||||
/*
|
||||
|
||||
@@ -197,6 +197,7 @@ struct io_sqring_offsets {
|
||||
* sq_ring->flags
|
||||
*/
|
||||
#define IORING_SQ_NEED_WAKEUP (1U << 0) /* needs io_uring_enter wakeup */
|
||||
#define IORING_SQ_CQ_OVERFLOW (1U << 1) /* CQ ring is overflown */
|
||||
|
||||
struct io_cqring_offsets {
|
||||
__u32 head;
|
||||
|
||||
@@ -103,7 +103,7 @@ VMMDEV_ASSERT_SIZE(vbg_ioctl_driver_version_info, 24 + 20);
|
||||
|
||||
|
||||
/* IOCTL to perform a VMM Device request larger then 1KB. */
|
||||
#define VBG_IOCTL_VMMDEV_REQUEST_BIG _IOC(_IOC_READ | _IOC_WRITE, 'V', 3, 0)
|
||||
#define VBG_IOCTL_VMMDEV_REQUEST_BIG _IO('V', 3)
|
||||
|
||||
|
||||
/** VBG_IOCTL_HGCM_CONNECT data structure. */
|
||||
@@ -198,7 +198,7 @@ struct vbg_ioctl_log {
|
||||
} u;
|
||||
};
|
||||
|
||||
#define VBG_IOCTL_LOG(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 9, s)
|
||||
#define VBG_IOCTL_LOG(s) _IO('V', 9)
|
||||
|
||||
|
||||
/** VBG_IOCTL_WAIT_FOR_EVENTS data structure. */
|
||||
|
||||
Reference in New Issue
Block a user