aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_bus.h11
-rw-r--r--include/drm/drm_pagemap.h8
-rw-r--r--include/keys/request_key_auth-type.h2
-rw-r--r--include/linux/bpf.h53
-rw-r--r--include/linux/bpf_verifier.h59
-rw-r--r--include/linux/btf.h1
-rw-r--r--include/linux/can/core.h3
-rw-r--r--include/linux/can/skb.h4
-rw-r--r--include/linux/capability.h5
-rw-r--r--include/linux/cgroup-defs.h5
-rw-r--r--include/linux/console.h17
-rw-r--r--include/linux/cpufreq.h3
-rw-r--r--include/linux/device-id/ap.h2
-rw-r--r--include/linux/dma-buf.h1
-rw-r--r--include/linux/dma-fence-array.h1
-rw-r--r--include/linux/dma-fence-chain.h9
-rw-r--r--include/linux/dma-fence.h6
-rw-r--r--include/linux/edac.h3
-rw-r--r--include/linux/entry-common.h9
-rw-r--r--include/linux/ethtool.h8
-rw-r--r--include/linux/filter.h1
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/ftrace.h5
-rw-r--r--include/linux/hrtimer_rearm.h2
-rw-r--r--include/linux/ieee80211-mesh.h4
-rw-r--r--include/linux/if_vlan.h3
-rw-r--r--include/linux/igmp.h7
-rw-r--r--include/linux/interrupt_rc.h22
-rw-r--r--include/linux/irqdomain.h18
-rw-r--r--include/linux/kprobes.h1
-rw-r--r--include/linux/kvm_host.h10
-rw-r--r--include/linux/libata.h4
-rw-r--r--include/linux/mempool.h7
-rw-r--r--include/linux/mm_types.h15
-rw-r--r--include/linux/mmap_lock.h2
-rw-r--r--include/linux/mount.h2
-rw-r--r--include/linux/mtd/nand.h2
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/linux/netfilter_arp/arp_tables.h19
-rw-r--r--include/linux/netfilter_netdev.h2
-rw-r--r--include/linux/netfs.h7
-rw-r--r--include/linux/ns/ns_common_types.h6
-rw-r--r--include/linux/nsproxy.h1
-rw-r--r--include/linux/nvme-tcp.h18
-rw-r--r--include/linux/perf/riscv_pmu.h2
-rw-r--r--include/linux/perf_event.h24
-rw-r--r--include/linux/preempt.h4
-rw-r--r--include/linux/rbtree_augmented.h35
-rw-r--r--include/linux/ring_buffer.h24
-rw-r--r--include/linux/rolling_buffer.h6
-rw-r--r--include/linux/rtnetlink.h7
-rw-r--r--include/linux/sched.h22
-rw-r--r--include/linux/sched/ext.h1
-rw-r--r--include/linux/sched/rt.h2
-rw-r--r--include/linux/sched/signal.h5
-rw-r--r--include/linux/sched/topology.h4
-rw-r--r--include/linux/sched/user.h3
-rw-r--r--include/linux/siphash.h8
-rw-r--r--include/linux/skbuff.h31
-rw-r--r--include/linux/soc/qcom/geni-se.h15
-rw-r--r--include/linux/thunderbolt.h3
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_driver.h6
-rw-r--r--include/linux/tty_port.h22
-rw-r--r--include/linux/usb/serial.h1
-rw-r--r--include/linux/virtio_net.h60
-rw-r--r--include/media/v4l2-hevc.h41
-rw-r--r--include/net/af_vsock.h3
-rw-r--r--include/net/amt.h4
-rw-r--r--include/net/bluetooth/coredump.h2
-rw-r--r--include/net/bluetooth/hci_core.h5
-rw-r--r--include/net/bluetooth/rfcomm.h1
-rw-r--r--include/net/can.h2
-rw-r--r--include/net/cfg802154.h1
-rw-r--r--include/net/codel.h5
-rw-r--r--include/net/codel_impl.h16
-rw-r--r--include/net/dst.h3
-rw-r--r--include/net/gso.h8
-rw-r--r--include/net/gue.h19
-rw-r--r--include/net/if_inet6.h2
-rw-r--r--include/net/ip.h10
-rw-r--r--include/net/ip6_route.h6
-rw-r--r--include/net/mac80211.h5
-rw-r--r--include/net/mana/mana.h14
-rw-r--r--include/net/netfilter/nf_conntrack.h5
-rw-r--r--include/net/netfilter/nf_flow_table.h2
-rw-r--r--include/net/nfc/hci.h2
-rw-r--r--include/net/nfc/nfc.h3
-rw-r--r--include/net/sch_generic.h11
-rw-r--r--include/net/sock.h2
-rw-r--r--include/net/strparser.h10
-rw-r--r--include/net/tcp.h7
-rw-r--r--include/net/xdp.h5
-rw-r--r--include/rdma/uverbs_types.h2
-rw-r--r--include/sound/core.h9
-rw-r--r--include/sound/cs35l56.h1
-rw-r--r--include/sound/soc.h3
-rw-r--r--include/sound/soc_sdw_utils.h2
-rw-r--r--include/trace/events/cachefiles.h19
-rw-r--r--include/trace/events/dma.h2
-rw-r--r--include/trace/events/icmp.h13
-rw-r--r--include/trace/events/landlock.h371
-rw-r--r--include/trace/events/netfs.h30
-rw-r--r--include/trace/events/timer.h2
-rw-r--r--include/uapi/drm/amdgpu_drm.h2
-rw-r--r--include/uapi/linux/alloc_tag.h1
-rw-r--r--include/uapi/linux/input-event-codes.h6
-rw-r--r--include/uapi/linux/magic.h1
-rw-r--r--include/uapi/linux/random.h2
-rw-r--r--include/uapi/rdma/bnxt_re-abi.h2
-rw-r--r--include/vdso/getrandom.h2
111 files changed, 859 insertions, 466 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 1a45e0d521d8..a10a591c18b2 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -202,12 +202,8 @@ struct acpi_device_dir {
/* Plug and Play */
-#define MAX_ACPI_DEVICE_NAME_LEN 40
-#define MAX_ACPI_CLASS_NAME_LEN 20
typedef char acpi_bus_id[8];
typedef u64 acpi_bus_address;
-typedef char acpi_device_name[MAX_ACPI_DEVICE_NAME_LEN];
-typedef char acpi_device_class[MAX_ACPI_CLASS_NAME_LEN];
struct acpi_hardware_id {
struct list_head list;
@@ -229,16 +225,12 @@ struct acpi_device_pnp {
acpi_bus_address bus_address; /* _ADR */
char *unique_id; /* _UID */
struct list_head ids; /* _HID and _CIDs */
- acpi_device_name device_name; /* Driver-determined */
- acpi_device_class device_class; /* " */
};
#define acpi_device_bid(d) ((d)->pnp.bus_id)
#define acpi_device_adr(d) ((d)->pnp.bus_address)
const char *acpi_device_hid(struct acpi_device *device);
#define acpi_device_uid(d) ((d)->pnp.unique_id)
-#define acpi_device_name(d) ((d)->pnp.device_name)
-#define acpi_device_class(d) ((d)->pnp.device_class)
/* Power Management */
@@ -578,6 +570,9 @@ int acpi_dev_for_each_child_reverse(struct acpi_device *adev,
* ------
*/
+#define MAX_ACPI_CLASS_NAME_LEN 20
+typedef char acpi_device_class[MAX_ACPI_CLASS_NAME_LEN];
+
struct acpi_bus_event {
struct list_head node;
acpi_device_class device_class;
diff --git a/include/drm/drm_pagemap.h b/include/drm/drm_pagemap.h
index 95eb4b66b057..ebbd3b0ddf36 100644
--- a/include/drm/drm_pagemap.h
+++ b/include/drm/drm_pagemap.h
@@ -2,6 +2,7 @@
#ifndef _DRM_PAGEMAP_H_
#define _DRM_PAGEMAP_H_
+#include <linux/bits.h>
#include <linux/dma-direction.h>
#include <linux/hmm.h>
#include <linux/memremap.h>
@@ -339,6 +340,9 @@ struct drm_pagemap_migrate_details {
#if IS_ENABLED(CONFIG_ZONE_DEVICE)
+#define DRM_PAGEMAP_ZDD_FLAG_MIGRATED BIT(0)
+#define DRM_PAGEMAP_ZDD_FLAG_MASK DRM_PAGEMAP_ZDD_FLAG_MIGRATED
+
int drm_pagemap_migrate_to_devmem(struct drm_pagemap_devmem *devmem_allocation,
struct mm_struct *mm,
unsigned long start, unsigned long end,
@@ -373,7 +377,9 @@ static inline struct drm_pagemap_zdd *drm_pagemap_page_zone_device_data(struct p
{
struct folio *folio = page_folio(page);
- return folio_zone_device_data(folio);
+ return (struct drm_pagemap_zdd *)
+ ((unsigned long)folio_zone_device_data(folio) &
+ ~DRM_PAGEMAP_ZDD_FLAG_MASK);
}
#else
diff --git a/include/keys/request_key_auth-type.h b/include/keys/request_key_auth-type.h
index 01e42ee5f409..464636278c4f 100644
--- a/include/keys/request_key_auth-type.h
+++ b/include/keys/request_key_auth-type.h
@@ -22,7 +22,7 @@ struct request_key_auth {
const struct cred *cred;
void *callout_info;
size_t callout_len;
- pid_t pid;
+ struct pid *pid;
char op[8];
} __randomize_layout;
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index ffa5626411ac..0ecb9418dfbd 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -894,6 +894,7 @@ enum bpf_arg_type {
ARG_PTR_TO_CTX, /* pointer to context */
ARG_ANYTHING, /* any (initialized) argument is ok */
+ ARG_SCALAR, /* scalar argument */
ARG_PTR_TO_SPIN_LOCK, /* pointer to bpf_spin_lock */
ARG_PTR_TO_SOCK_COMMON, /* pointer to sock_common */
ARG_PTR_TO_SOCKET, /* pointer to bpf_sock (fullsock) */
@@ -1257,11 +1258,15 @@ struct btf_func_model {
#define BPF_TRAMP_F_INDIRECT BIT(8)
/* Each call __bpf_prog_enter + call bpf_func + call __bpf_prog_exit is ~50
- * bytes on x86.
+ * bytes on x86. The trampoline image has to fit in PAGE_SIZE.
*/
enum {
-#if defined(__s390x__)
+#if defined(__s390x__) || defined(__powerpc64__)
BPF_MAX_TRAMP_LINKS = 27,
+#elif defined(__x86_64__)
+ BPF_MAX_TRAMP_LINKS = 36,
+#elif defined(__aarch64__)
+ BPF_MAX_TRAMP_LINKS = 37,
#else
BPF_MAX_TRAMP_LINKS = 38,
#endif
@@ -1314,6 +1319,7 @@ int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image, void *i
void *arch_alloc_bpf_trampoline(unsigned int size);
void arch_free_bpf_trampoline(void *image, unsigned int size);
int __must_check arch_protect_bpf_trampoline(void *image, unsigned int size);
+int arch_bpf_trampoline_skip(void *nop, void *target);
int arch_bpf_trampoline_size(const struct btf_func_model *m, u32 flags,
struct bpf_tramp_nodes *tnodes, void *func_addr);
@@ -1362,19 +1368,48 @@ enum bpf_tramp_prog_type {
BPF_TRAMP_FSESSION,
};
+/*
+ * Each prog call in a trampoline image is preceded by a nop. When the prog is
+ * detached, the nop is patched to a jump to target, right after the call, so
+ * that tasks still running in the image skip the prog.
+ */
+struct bpf_tramp_skip {
+ struct bpf_prog *prog;
+ void *nop;
+ void *target;
+};
+
struct bpf_tramp_image {
void *image;
int size;
struct bpf_ksym ksym;
struct percpu_ref pcref;
- void *ip_after_call;
- void *ip_epilogue;
+ bool call_orig;
+ /* entry in tr->images, the image holds a reference on tr */
+ struct bpf_trampoline *tr;
+ struct list_head list;
+ int nr_skips;
+ struct bpf_tramp_skip *skips;
union {
struct rcu_head rcu;
struct work_struct work;
};
};
+static inline void bpf_tramp_image_add_skip(struct bpf_tramp_image *im, struct bpf_prog *prog,
+ void *nop, void *target)
+{
+ struct bpf_tramp_skip *skip;
+
+ /* struct_ops trampolines and arch_bpf_trampoline_size() have no image */
+ if (!im || !im->skips)
+ return;
+ skip = &im->skips[im->nr_skips++];
+ skip->prog = prog;
+ skip->nop = nop;
+ skip->target = target;
+}
+
struct bpf_trampoline {
/* hlist for trampoline_key_table */
struct hlist_node hlist_key;
@@ -1401,6 +1436,8 @@ struct bpf_trampoline {
int progs_cnt[BPF_TRAMP_MAX];
/* Executable image of trampoline */
struct bpf_tramp_image *cur_image;
+ /* Images not freed yet, cur_image and older ones still in use */
+ struct list_head images;
/* Used as temporary old image storage for multi_attach */
struct {
struct bpf_tramp_image *old_image;
@@ -1650,8 +1687,9 @@ static inline void bpf_trampoline_set_flags(struct bpf_trampoline *tr, u32 flags
struct bpf_func_info_aux {
u16 linkage;
bool unreliable;
- bool called : 1;
- bool verified : 1;
+ /* Indexed by in_sleepable. */
+ bool called[2];
+ bool verified[2];
};
enum bpf_jit_poke_reason {
@@ -1768,6 +1806,7 @@ struct bpf_prog_aux {
bool offload_requested; /* Program is bound and offloaded to the netdev. */
bool attach_btf_trace; /* true if attaching to BTF-enabled raw tp */
bool attach_tracing_prog; /* true if tracing another tracing program */
+ bool tramp_linked; /* true if it was ever linked to a trampoline */
bool func_proto_unreliable;
bool tail_call_reachable;
bool xdp_has_frags;
@@ -4209,7 +4248,7 @@ static inline int bpf_map_check_op_flags(struct bpf_map *map, u64 flags, u64 all
return -EINVAL;
cpu = flags >> 32;
- if ((flags & BPF_F_CPU) && cpu >= num_possible_cpus())
+ if ((flags & BPF_F_CPU) && (cpu >= nr_cpu_ids || !cpu_possible(cpu)))
return -ERANGE;
}
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
index 5fad59fdab0d..b83ec99f1a13 100644
--- a/include/linux/bpf_verifier.h
+++ b/include/linux/bpf_verifier.h
@@ -45,18 +45,20 @@ struct bpf_reg_state {
union {
/* valid when type == PTR_TO_PACKET */
int range;
+ /*
+ * Valid when type == PTR_TO_STACK. Inside the callee two registers
+ * can be both PTR_TO_STACK like R1=fp-8 and R2=fp-8, but one of them
+ * points to this function stack while another to the caller's stack.
+ * To differentiate them 'frameno' is used which is an index in
+ * bpf_verifier_state->frame[] array pointing to bpf_func_state.
+ */
+ u8 frameno;
- /* valid when type == CONST_PTR_TO_MAP | PTR_TO_MAP_VALUE |
- * PTR_TO_MAP_VALUE_OR_NULL
+ /*
+ * For CONST_PTR_TO_MAP, PTR_TO_MAP_KEY, PTR_TO_MAP_VALUE and