1
0

Compare commits

...

8 Commits

Author SHA1 Message Date
06a5da3214 release 6.12.20 2025-03-23 03:20:34 +03:00
42650d9e26 release 6.12.19 2025-03-13 20:55:12 +03:00
541b699fa5 release 6.12.18 2025-03-08 06:46:16 +03:00
9bc795cb7a release 6.12.17 2025-02-27 16:40:53 +03:00
40abc00198 release 6.12.16 2025-02-21 18:45:20 +03:00
92542309fb release 6.12.14 2025-02-17 17:51:15 +03:00
e0baaf49dd release 6.12.13 2025-02-09 19:40:34 +03:00
b8c80400f5 release 6.12.12 2025-02-02 13:14:09 +03:00
70 changed files with 631 additions and 397 deletions

57
debian/changelog vendored
View File

@@ -1,3 +1,60 @@
linux (6.12.20-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.20
-- Konstantin Demin <rockdrilla@gmail.com> Sun, 23 Mar 2025 03:14:29 +0300
linux (6.12.19-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.19
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 13 Mar 2025 20:47:49 +0300
linux (6.12.18-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.18
-- Konstantin Demin <rockdrilla@gmail.com> Sat, 08 Mar 2025 06:44:24 +0300
linux (6.12.17-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.17
-- Konstantin Demin <rockdrilla@gmail.com> Thu, 27 Feb 2025 16:35:33 +0300
linux (6.12.16-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.15
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.16
-- Konstantin Demin <rockdrilla@gmail.com> Fri, 21 Feb 2025 17:46:41 +0300
linux (6.12.14-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.14
-- Konstantin Demin <rockdrilla@gmail.com> Mon, 17 Feb 2025 17:43:08 +0300
linux (6.12.13-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.13
-- Konstantin Demin <rockdrilla@gmail.com> Sun, 09 Feb 2025 19:34:35 +0300
linux (6.12.12-1) sid; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.12
-- Konstantin Demin <rockdrilla@gmail.com> Sun, 02 Feb 2025 13:07:44 +0300
linux (6.12.11-1) sid; urgency=medium linux (6.12.11-1) sid; urgency=medium
* New upstream stable update: * New upstream stable update:

View File

@@ -429,11 +429,6 @@ CONFIG_GOOGLE_COREBOOT_TABLE=m
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
CONFIG_GOOGLE_VPD=m CONFIG_GOOGLE_VPD=m
##
## file: drivers/firmware/imx/Kconfig
##
# CONFIG_IMX_SCMI_MISC_DRV is not set
## ##
## file: drivers/gnss/Kconfig ## file: drivers/gnss/Kconfig
## ##
@@ -722,11 +717,6 @@ CONFIG_VIRTIO_IOMMU=y
## ##
# CONFIG_IOMMUFD is not set # CONFIG_IOMMUFD is not set
##
## file: drivers/irqchip/Kconfig
##
# CONFIG_LAN966X_OIC is not set
## ##
## file: drivers/isdn/Kconfig ## file: drivers/isdn/Kconfig
## ##

View File

@@ -701,11 +701,6 @@ CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY=m
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=y CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=y
# CONFIG_GOOGLE_VPD is not set # CONFIG_GOOGLE_VPD is not set
##
## file: drivers/firmware/imx/Kconfig
##
CONFIG_IMX_SCMI_MISC_DRV=m
## ##
## file: drivers/fsi/Kconfig ## file: drivers/fsi/Kconfig
## ##
@@ -1834,6 +1829,7 @@ CONFIG_CDNS_I3C_MASTER=m
CONFIG_DW_I3C_MASTER=m CONFIG_DW_I3C_MASTER=m
CONFIG_SVC_I3C_MASTER=m CONFIG_SVC_I3C_MASTER=m
CONFIG_MIPI_I3C_HCI=m CONFIG_MIPI_I3C_HCI=m
CONFIG_MIPI_I3C_HCI_PCI=m
## ##
## file: drivers/infiniband/Kconfig ## file: drivers/infiniband/Kconfig
@@ -2212,7 +2208,6 @@ CONFIG_IOMMUFD=m
## file: drivers/irqchip/Kconfig ## file: drivers/irqchip/Kconfig
## ##
# CONFIG_AL_FIC is not set # CONFIG_AL_FIC is not set
CONFIG_LAN966X_OIC=m
# CONFIG_XILINX_INTC is not set # CONFIG_XILINX_INTC is not set
## ##
@@ -8584,6 +8579,8 @@ CONFIG_DRM_AUX_BRIDGE=m
CONFIG_DRM_AUX_HPD_BRIDGE=m CONFIG_DRM_AUX_HPD_BRIDGE=m
CONFIG_DRM_BRIDGE=y CONFIG_DRM_BRIDGE=y
CONFIG_DRM_BUDDY=m CONFIG_DRM_BUDDY=m
CONFIG_DRM_CLIENT_SELECTION=y
CONFIG_DRM_CLIENT_SETUP=y
CONFIG_DRM_DISPLAY_DP_AUX_BUS=m CONFIG_DRM_DISPLAY_DP_AUX_BUS=m
CONFIG_DRM_DISPLAY_DP_HELPER=y CONFIG_DRM_DISPLAY_DP_HELPER=y
CONFIG_DRM_DISPLAY_DP_TUNNEL=y CONFIG_DRM_DISPLAY_DP_TUNNEL=y

View File

@@ -516,11 +516,6 @@ CONFIG_GOOGLE_COREBOOT_TABLE=m
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
CONFIG_GOOGLE_VPD=m CONFIG_GOOGLE_VPD=m
##
## file: drivers/firmware/imx/Kconfig
##
# CONFIG_IMX_SCMI_MISC_DRV is not set
## ##
## file: drivers/gnss/Kconfig ## file: drivers/gnss/Kconfig
## ##
@@ -1553,11 +1548,6 @@ CONFIG_VIRTIO_IOMMU=y
## ##
# CONFIG_IOMMUFD is not set # CONFIG_IOMMUFD is not set
##
## file: drivers/irqchip/Kconfig
##
# CONFIG_LAN966X_OIC is not set
## ##
## file: drivers/isdn/Kconfig ## file: drivers/isdn/Kconfig
## ##

View File

@@ -863,6 +863,7 @@ CONFIG_PCC=y
CONFIG_MD=y CONFIG_MD=y
CONFIG_BLK_DEV_MD=m CONFIG_BLK_DEV_MD=m
# CONFIG_MD_BITMAP_FILE is not set # CONFIG_MD_BITMAP_FILE is not set
CONFIG_MD_LINEAR=m
CONFIG_BLK_DEV_DM=m CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set # CONFIG_DM_DEBUG is not set
# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set # CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set
@@ -1181,11 +1182,6 @@ CONFIG_PCIE_PTM=y
## ##
# CONFIG_CHROME_PLATFORMS is not set # CONFIG_CHROME_PLATFORMS is not set
##
## file: drivers/platform/cznic/Kconfig
##
# CONFIG_CZNIC_PLATFORMS is not set
## ##
## file: drivers/platform/mellanox/Kconfig ## file: drivers/platform/mellanox/Kconfig
## ##

View File

@@ -0,0 +1,61 @@
From: Philip Yang <Philip.Yang@amd.com>
Date: Wed, 29 Jan 2025 12:37:30 -0500
Subject: drm/amdkfd: Fix user queue validation on Gfx7/8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Origin: https://gitlab.freedesktop.org/drm/kernel/-/commit/e7a477735f1771b9a9346a5fbd09d7ff0641723a
Bug-Debian: https://bugs.debian.org/1093124
To workaround queue full h/w issue on Gfx7/8, when application create
AQL queue, the ring buffer bo allocate size is queue_size/2 and
map queue_size ring buffer to GPU in 2 pieces using 2 attachments, each
attachment map size is queue_size/2, with same ring_bo backing memory.
For Gfx7/8, user queue buffer validation should use queue_size/2 to
verify ring_bo allocation and mapping size.
Fixes: 68e599db7a54 ("drm/amdkfd: Validate user queue buffers")
Suggested-by: Tomáš Trnka <trnka@scm.com>
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_queue.c
@@ -233,6 +233,7 @@ void kfd_queue_buffer_put(struct amdgpu_
int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_properties *properties)
{
struct kfd_topology_device *topo_dev;
+ u64 expected_queue_size;
struct amdgpu_vm *vm;
u32 total_cwsr_size;
int err;
@@ -241,6 +242,15 @@ int kfd_queue_acquire_buffers(struct kfd
if (!topo_dev)
return -EINVAL;
+ /* AQL queues on GFX7 and GFX8 appear twice their actual size */
+ if (properties->type == KFD_QUEUE_TYPE_COMPUTE &&
+ properties->format == KFD_QUEUE_FORMAT_AQL &&
+ topo_dev->node_props.gfx_target_version >= 70000 &&
+ topo_dev->node_props.gfx_target_version < 90000)
+ expected_queue_size = properties->queue_size / 2;
+ else
+ expected_queue_size = properties->queue_size;
+
vm = drm_priv_to_vm(pdd->drm_priv);
err = amdgpu_bo_reserve(vm->root.bo, false);
if (err)
@@ -255,7 +265,7 @@ int kfd_queue_acquire_buffers(struct kfd
goto out_err_unreserve;
err = kfd_queue_buffer_get(vm, (void *)properties->queue_address,
- &properties->ring_bo, properties->queue_size);
+ &properties->ring_bo, expected_queue_size);
if (err)
goto out_err_unreserve;

View File

@@ -1,55 +0,0 @@
From: Ian Campbell <ijc@hellion.org.uk>
Date: Thu, 17 Jan 2013 08:55:21 +0000
Subject: Tweak gitignore for Debian pkg-kernel using git
Forwarded: not-needed
[bwh: Tweak further for pure git]
---
.gitignore | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
--- a/.gitignore
+++ b/.gitignore
@@ -79,11 +79,6 @@ modules.order
/rpmbuild/
#
-# Debian directory (make deb-pkg)
-#
-/debian/
-
-#
# Snap directory (make snap-pkg)
#
/snap/
@@ -100,19 +95,6 @@ modules.order
/pacman/
#
-# We don't want to ignore the following even if they are dot-files
-#
-!.clang-format
-!.cocciconfig
-!.editorconfig
-!.get_maintainer.ignore
-!.gitattributes
-!.gitignore
-!.kunitconfig
-!.mailmap
-!.rustfmt.toml
-
-#
# Generated include files
#
/include/config/
@@ -177,3 +159,10 @@ sphinx_*/
# Rust analyzer configuration
/rust-project.json
+
+#
+# Debian packaging: ignore everything at the top level, since it isn't
+# included in our repository
+#
+/*
+!/debian/

View File

@@ -15,7 +15,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- ---
--- a/net/ax25/af_ax25.c --- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c
@@ -2066,7 +2066,7 @@ module_init(ax25_init); @@ -2077,7 +2077,7 @@ module_init(ax25_init);
MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>"); MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol"); MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
@@ -37,7 +37,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
{ {
--- a/net/rose/af_rose.c --- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c +++ b/net/rose/af_rose.c
@@ -1630,7 +1630,7 @@ MODULE_PARM_DESC(rose_ndevs, "number of @@ -1638,7 +1638,7 @@ MODULE_PARM_DESC(rose_ndevs, "number of
MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>"); MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");
MODULE_DESCRIPTION("The amateur radio ROSE network layer protocol"); MODULE_DESCRIPTION("The amateur radio ROSE network layer protocol");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");

View File

@@ -54,7 +54,7 @@ use of $(ARCH) needs to be moved after this.
KCONFIG_CONFIG ?= .config KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG export KCONFIG_CONFIG
@@ -525,6 +495,35 @@ RUSTFLAGS_KERNEL = @@ -529,6 +499,35 @@ RUSTFLAGS_KERNEL =
AFLAGS_KERNEL = AFLAGS_KERNEL =
LDFLAGS_vmlinux = LDFLAGS_vmlinux =

View File

@@ -20,7 +20,7 @@ is non-empty.
--- ---
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -1818,7 +1818,7 @@ PHONY += prepare @@ -1825,7 +1825,7 @@ PHONY += prepare
# now expand this into a simple variable to reduce the cost of shell evaluations # now expand this into a simple variable to reduce the cost of shell evaluations
prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT) prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
prepare: prepare:

View File

@@ -141,7 +141,7 @@ arm-init to efi-init common for all arch") renamed arm-init.c to efi-init.c]
--- a/include/linux/efi.h --- a/include/linux/efi.h
+++ b/include/linux/efi.h +++ b/include/linux/efi.h
@@ -764,7 +764,8 @@ extern int efi_mem_desc_lookup(u64 phys_ @@ -765,7 +765,8 @@ extern int efi_mem_desc_lookup(u64 phys_
extern int __efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md); extern int __efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md);
extern void efi_mem_reserve(phys_addr_t addr, u64 size); extern void efi_mem_reserve(phys_addr_t addr, u64 size);
extern int efi_mem_reserve_persistent(phys_addr_t addr, u64 size); extern int efi_mem_reserve_persistent(phys_addr_t addr, u64 size);

View File

@@ -106,7 +106,7 @@ cc: linux-efi@vger.kernel.org
+} +}
--- a/include/linux/efi.h --- a/include/linux/efi.h
+++ b/include/linux/efi.h +++ b/include/linux/efi.h
@@ -875,6 +875,14 @@ static inline int efi_range_is_wc(unsign @@ -876,6 +876,14 @@ static inline int efi_range_is_wc(unsign
#define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */ #define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
#define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */ #define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */
#define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */ #define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */
@@ -121,7 +121,7 @@ cc: linux-efi@vger.kernel.org
#ifdef CONFIG_EFI #ifdef CONFIG_EFI
/* /*
@@ -899,6 +907,7 @@ static inline bool efi_rt_services_suppo @@ -900,6 +908,7 @@ static inline bool efi_rt_services_suppo
return (efi.runtime_supported_mask & mask) == mask; return (efi.runtime_supported_mask & mask) == mask;
} }
extern void efi_find_mirror(void); extern void efi_find_mirror(void);
@@ -129,7 +129,7 @@ cc: linux-efi@vger.kernel.org
#else #else
static inline bool efi_enabled(int feature) static inline bool efi_enabled(int feature)
{ {
@@ -918,6 +927,7 @@ static inline bool efi_rt_services_suppo @@ -919,6 +928,7 @@ static inline bool efi_rt_services_suppo
} }
static inline void efi_find_mirror(void) {} static inline void efi_find_mirror(void) {}
@@ -137,7 +137,7 @@ cc: linux-efi@vger.kernel.org
#endif #endif
extern int efi_status_to_err(efi_status_t status); extern int efi_status_to_err(efi_status_t status);
@@ -1136,13 +1146,6 @@ static inline bool efi_runtime_disabled( @@ -1137,13 +1147,6 @@ static inline bool efi_runtime_disabled(
extern void efi_call_virt_check_flags(unsigned long flags, const void *caller); extern void efi_call_virt_check_flags(unsigned long flags, const void *caller);
extern unsigned long efi_call_virt_save_flags(void); extern unsigned long efi_call_virt_save_flags(void);

View File

@@ -22,7 +22,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- a/include/linux/perf_event.h --- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h +++ b/include/linux/perf_event.h
@@ -1617,6 +1617,11 @@ int perf_cpu_time_max_percent_handler(co @@ -1623,6 +1623,11 @@ int perf_cpu_time_max_percent_handler(co
int perf_event_max_stack_handler(const struct ctl_table *table, int write, int perf_event_max_stack_handler(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos); void *buffer, size_t *lenp, loff_t *ppos);
@@ -50,7 +50,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
/* Minimum for 512 kiB + 1 user control page */ /* Minimum for 512 kiB + 1 user control page */
int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */ int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
@@ -12681,6 +12686,9 @@ SYSCALL_DEFINE5(perf_event_open, @@ -12691,6 +12696,9 @@ SYSCALL_DEFINE5(perf_event_open,
if (err) if (err)
return err; return err;

View File

@@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Ignore sysrq setting - this boot parameter will Ignore sysrq setting - this boot parameter will
--- a/arch/x86/Kconfig --- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig +++ b/arch/x86/Kconfig
@@ -3163,6 +3163,14 @@ config COMPAT_32 @@ -3165,6 +3165,14 @@ config COMPAT_32
select HAVE_UID16 select HAVE_UID16
select OLD_SIGSUSPEND3 select OLD_SIGSUSPEND3

View File

@@ -30,7 +30,7 @@ this reverts following commit:
--- a/tools/objtool/check.c --- a/tools/objtool/check.c
+++ b/tools/objtool/check.c +++ b/tools/objtool/check.c
@@ -4925,10 +4925,14 @@ int check(struct objtool_file *file) @@ -4897,10 +4897,14 @@ int check(struct objtool_file *file)
} }
out: out:

View File

@@ -32,7 +32,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -3961,6 +3961,7 @@ static int tcp_ack(struct sock *sk, cons @@ -3967,6 +3967,7 @@ static int tcp_ack(struct sock *sk, cons
prior_fack = tcp_is_sack(tp) ? tcp_highest_sack_seq(tp) : tp->snd_una; prior_fack = tcp_is_sack(tp) ? tcp_highest_sack_seq(tp) : tp->snd_una;
rs.prior_in_flight = tcp_packets_in_flight(tp); rs.prior_in_flight = tcp_packets_in_flight(tp);

View File

@@ -25,7 +25,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -884,6 +884,11 @@ static inline u32 tcp_stamp_us_delta(u64 @@ -901,6 +901,11 @@ static inline u32 tcp_stamp_us_delta(u64
return max_t(s64, t1 - t0, 0); return max_t(s64, t1 - t0, 0);
} }
@@ -37,7 +37,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
/* provide the departure time in us unit */ /* provide the departure time in us unit */
static inline u64 tcp_skb_timestamp_us(const struct sk_buff *skb) static inline u64 tcp_skb_timestamp_us(const struct sk_buff *skb)
{ {
@@ -973,9 +978,9 @@ struct tcp_skb_cb { @@ -990,9 +995,9 @@ struct tcp_skb_cb {
/* pkts S/ACKed so far upon tx of skb, incl retrans: */ /* pkts S/ACKed so far upon tx of skb, incl retrans: */
__u32 delivered; __u32 delivered;
/* start of send pipeline phase */ /* start of send pipeline phase */

View File

@@ -27,7 +27,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -981,6 +981,10 @@ struct tcp_skb_cb { @@ -998,6 +998,10 @@ struct tcp_skb_cb {
u32 first_tx_mstamp; u32 first_tx_mstamp;
/* when we reached the "delivered" count */ /* when we reached the "delivered" count */
u32 delivered_mstamp; u32 delivered_mstamp;
@@ -38,7 +38,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
} tx; /* only used for outgoing skbs */ } tx; /* only used for outgoing skbs */
union { union {
struct inet_skb_parm h4; struct inet_skb_parm h4;
@@ -1137,6 +1141,7 @@ struct rate_sample { @@ -1154,6 +1158,7 @@ struct rate_sample {
u64 prior_mstamp; /* starting timestamp for interval */ u64 prior_mstamp; /* starting timestamp for interval */
u32 prior_delivered; /* tp->delivered at "prior_mstamp" */ u32 prior_delivered; /* tp->delivered at "prior_mstamp" */
u32 prior_delivered_ce;/* tp->delivered_ce at "prior_mstamp" */ u32 prior_delivered_ce;/* tp->delivered_ce at "prior_mstamp" */
@@ -46,7 +46,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
s32 delivered; /* number of packets delivered over interval */ s32 delivered; /* number of packets delivered over interval */
s32 delivered_ce; /* number of packets delivered w/ CE marks*/ s32 delivered_ce; /* number of packets delivered w/ CE marks*/
long interval_us; /* time for tp->delivered to incr "delivered" */ long interval_us; /* time for tp->delivered to incr "delivered" */
@@ -1259,6 +1264,7 @@ static inline void tcp_ca_event(struct s @@ -1276,6 +1281,7 @@ static inline void tcp_ca_event(struct s
void tcp_set_ca_state(struct sock *sk, const u8 ca_state); void tcp_set_ca_state(struct sock *sk, const u8 ca_state);
/* From tcp_rate.c */ /* From tcp_rate.c */
@@ -56,7 +56,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
struct rate_sample *rs); struct rate_sample *rs);
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c
@@ -2767,6 +2767,7 @@ static bool tcp_write_xmit(struct sock * @@ -2770,6 +2770,7 @@ static bool tcp_write_xmit(struct sock *
skb_set_delivery_time(skb, tp->tcp_wstamp_ns, SKB_CLOCK_MONOTONIC); skb_set_delivery_time(skb, tp->tcp_wstamp_ns, SKB_CLOCK_MONOTONIC);
list_move_tail(&skb->tcp_tsorted_anchor, &tp->tsorted_sent_queue); list_move_tail(&skb->tcp_tsorted_anchor, &tp->tsorted_sent_queue);
tcp_init_tso_segs(skb, mss_now); tcp_init_tso_segs(skb, mss_now);

View File

@@ -19,7 +19,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -985,6 +985,7 @@ struct tcp_skb_cb { @@ -1002,6 +1002,7 @@ struct tcp_skb_cb {
#define TCPCB_IN_FLIGHT_MAX ((1U << TCPCB_IN_FLIGHT_BITS) - 1) #define TCPCB_IN_FLIGHT_MAX ((1U << TCPCB_IN_FLIGHT_BITS) - 1)
u32 in_flight:20, /* packets in flight at transmit */ u32 in_flight:20, /* packets in flight at transmit */
unused2:12; unused2:12;
@@ -27,7 +27,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
} tx; /* only used for outgoing skbs */ } tx; /* only used for outgoing skbs */
union { union {
struct inet_skb_parm h4; struct inet_skb_parm h4;
@@ -1139,11 +1140,13 @@ struct ack_sample { @@ -1156,11 +1157,13 @@ struct ack_sample {
*/ */
struct rate_sample { struct rate_sample {
u64 prior_mstamp; /* starting timestamp for interval */ u64 prior_mstamp; /* starting timestamp for interval */

View File

@@ -18,7 +18,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1158,6 +1158,7 @@ struct rate_sample { @@ -1175,6 +1175,7 @@ struct rate_sample {
bool is_app_limited; /* is sample from packet with bubble in pipe? */ bool is_app_limited; /* is sample from packet with bubble in pipe? */
bool is_retrans; /* is sample from retransmission? */ bool is_retrans; /* is sample from retransmission? */
bool is_ack_delayed; /* is this (likely) a delayed ACK? */ bool is_ack_delayed; /* is this (likely) a delayed ACK? */
@@ -28,7 +28,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
struct tcp_congestion_ops { struct tcp_congestion_ops {
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -4060,6 +4060,7 @@ static int tcp_ack(struct sock *sk, cons @@ -4066,6 +4066,7 @@ static int tcp_ack(struct sock *sk, cons
delivered = tcp_newly_delivered(sk, delivered, flag); delivered = tcp_newly_delivered(sk, delivered, flag);
lost = tp->lost - lost; /* freshly marked lost */ lost = tp->lost - lost; /* freshly marked lost */
rs.is_ack_delayed = !!(flag & FLAG_ACK_MAYBE_DELAYED); rs.is_ack_delayed = !!(flag & FLAG_ACK_MAYBE_DELAYED);

View File

@@ -30,7 +30,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1185,6 +1185,9 @@ struct tcp_congestion_ops { @@ -1202,6 +1202,9 @@ struct tcp_congestion_ops {
/* override sysctl_tcp_min_tso_segs */ /* override sysctl_tcp_min_tso_segs */
u32 (*min_tso_segs)(struct sock *sk); u32 (*min_tso_segs)(struct sock *sk);
@@ -42,7 +42,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
*/ */
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -1120,7 +1120,12 @@ static void tcp_verify_retransmit_hint(s @@ -1126,7 +1126,12 @@ static void tcp_verify_retransmit_hint(s
*/ */
static void tcp_notify_skb_loss_event(struct tcp_sock *tp, const struct sk_buff *skb) static void tcp_notify_skb_loss_event(struct tcp_sock *tp, const struct sk_buff *skb)
{ {

View File

@@ -39,7 +39,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -1506,6 +1506,17 @@ static bool tcp_shifted_skb(struct sock @@ -1512,6 +1512,17 @@ static bool tcp_shifted_skb(struct sock
WARN_ON_ONCE(tcp_skb_pcount(skb) < pcount); WARN_ON_ONCE(tcp_skb_pcount(skb) < pcount);
tcp_skb_pcount_add(skb, -pcount); tcp_skb_pcount_add(skb, -pcount);

View File

@@ -31,7 +31,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1284,6 +1284,21 @@ static inline bool tcp_skb_sent_after(u6 @@ -1301,6 +1301,21 @@ static inline bool tcp_skb_sent_after(u6
return t1 > t2 || (t1 == t2 && after(seq1, seq2)); return t1 > t2 || (t1 == t2 && after(seq1, seq2));
} }
@@ -55,7 +55,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
* between different flows. * between different flows.
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c
@@ -1603,7 +1603,7 @@ int tcp_fragment(struct sock *sk, enum t @@ -1606,7 +1606,7 @@ int tcp_fragment(struct sock *sk, enum t
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *buff; struct sk_buff *buff;
@@ -64,7 +64,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
long limit; long limit;
int nlen; int nlen;
u8 flags; u8 flags;
@@ -1678,6 +1678,30 @@ int tcp_fragment(struct sock *sk, enum t @@ -1681,6 +1681,30 @@ int tcp_fragment(struct sock *sk, enum t
if (diff) if (diff)
tcp_adjust_pcount(sk, skb, diff); tcp_adjust_pcount(sk, skb, diff);

View File

@@ -23,7 +23,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1120,7 +1120,11 @@ enum tcp_ca_ack_event_flags { @@ -1137,7 +1137,11 @@ enum tcp_ca_ack_event_flags {
#define TCP_CONG_NON_RESTRICTED 0x1 #define TCP_CONG_NON_RESTRICTED 0x1
/* Requires ECN/ECT set on all packets */ /* Requires ECN/ECT set on all packets */
#define TCP_CONG_NEEDS_ECN 0x2 #define TCP_CONG_NEEDS_ECN 0x2
@@ -36,7 +36,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
union tcp_cc_info; union tcp_cc_info;
@@ -1252,6 +1256,14 @@ static inline char *tcp_ca_get_name_by_k @@ -1269,6 +1273,14 @@ static inline char *tcp_ca_get_name_by_k
} }
#endif #endif
@@ -53,7 +53,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
const struct inet_connection_sock *icsk = inet_csk(sk); const struct inet_connection_sock *icsk = inet_csk(sk);
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -370,7 +370,7 @@ static void __tcp_ecn_check_ce(struct so @@ -376,7 +376,7 @@ static void __tcp_ecn_check_ce(struct so
tcp_enter_quickack_mode(sk, 2); tcp_enter_quickack_mode(sk, 2);
break; break;
case INET_ECN_CE: case INET_ECN_CE:
@@ -62,7 +62,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
tcp_ca_event(sk, CA_EVENT_ECN_IS_CE); tcp_ca_event(sk, CA_EVENT_ECN_IS_CE);
if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) { if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) {
@@ -381,7 +381,7 @@ static void __tcp_ecn_check_ce(struct so @@ -387,7 +387,7 @@ static void __tcp_ecn_check_ce(struct so
tp->ecn_flags |= TCP_ECN_SEEN; tp->ecn_flags |= TCP_ECN_SEEN;
break; break;
default: default:

View File

@@ -27,7 +27,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1186,8 +1186,8 @@ struct tcp_congestion_ops { @@ -1203,8 +1203,8 @@ struct tcp_congestion_ops {
/* hook for packet ack accounting (optional) */ /* hook for packet ack accounting (optional) */
void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample); void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample);
@@ -97,7 +97,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
}; };
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c
@@ -2059,13 +2059,12 @@ static u32 tcp_tso_autosize(const struct @@ -2062,13 +2062,12 @@ static u32 tcp_tso_autosize(const struct
static u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now) static u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now)
{ {
const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops; const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops;

View File

@@ -33,7 +33,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */ fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */
--- a/net/ipv4/tcp.c --- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c
@@ -3384,6 +3384,7 @@ int tcp_disconnect(struct sock *sk, int @@ -3397,6 +3397,7 @@ int tcp_disconnect(struct sock *sk, int
tp->rx_opt.dsack = 0; tp->rx_opt.dsack = 0;
tp->rx_opt.num_sacks = 0; tp->rx_opt.num_sacks = 0;
tp->rcv_ooopack = 0; tp->rcv_ooopack = 0;
@@ -53,7 +53,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
if (tcp_ca_needs_ecn(sk)) if (tcp_ca_needs_ecn(sk))
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -5770,13 +5770,14 @@ static void __tcp_ack_snd_check(struct s @@ -5776,13 +5776,14 @@ static void __tcp_ack_snd_check(struct s
/* More than one full frame received... */ /* More than one full frame received... */
if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss &&

View File

@@ -35,7 +35,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */ fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c
@@ -3005,6 +3005,7 @@ void tcp_send_loss_probe(struct sock *sk @@ -3008,6 +3008,7 @@ void tcp_send_loss_probe(struct sock *sk
if (WARN_ON(!skb || !tcp_skb_pcount(skb))) if (WARN_ON(!skb || !tcp_skb_pcount(skb)))
goto rearm_timer; goto rearm_timer;

View File

@@ -25,7 +25,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1098,6 +1098,7 @@ enum tcp_ca_event { @@ -1115,6 +1115,7 @@ enum tcp_ca_event {
CA_EVENT_LOSS, /* loss timeout */ CA_EVENT_LOSS, /* loss timeout */
CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */ CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */
CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */ CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */
@@ -35,7 +35,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
/* Information about inbound ACK, passed to cong_ops->in_ack_event() */ /* Information about inbound ACK, passed to cong_ops->in_ack_event() */
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -3859,6 +3859,7 @@ static void tcp_process_tlp_ack(struct s @@ -3865,6 +3865,7 @@ static void tcp_process_tlp_ack(struct s
/* ACK advances: there was a loss, so reduce cwnd. Reset /* ACK advances: there was a loss, so reduce cwnd. Reset
* tlp_high_seq in tcp_init_cwnd_reduction() * tlp_high_seq in tcp_init_cwnd_reduction()
*/ */

View File

@@ -21,7 +21,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -1162,6 +1162,7 @@ struct rate_sample { @@ -1179,6 +1179,7 @@ struct rate_sample {
u32 last_end_seq; /* end_seq of most recently ACKed packet */ u32 last_end_seq; /* end_seq of most recently ACKed packet */
bool is_app_limited; /* is sample from packet with bubble in pipe? */ bool is_app_limited; /* is sample from packet with bubble in pipe? */
bool is_retrans; /* is sample from retransmission? */ bool is_retrans; /* is sample from retransmission? */
@@ -31,7 +31,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
}; };
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -3842,7 +3842,8 @@ static void tcp_replace_ts_recent(struct @@ -3848,7 +3848,8 @@ static void tcp_replace_ts_recent(struct
/* This routine deals with acks during a TLP episode and ends an episode by /* This routine deals with acks during a TLP episode and ends an episode by
* resetting tlp_high_seq. Ref: TLP algorithm in draft-ietf-tcpm-rack * resetting tlp_high_seq. Ref: TLP algorithm in draft-ietf-tcpm-rack
*/ */
@@ -41,7 +41,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
@@ -3870,6 +3871,11 @@ static void tcp_process_tlp_ack(struct s @@ -3876,6 +3877,11 @@ static void tcp_process_tlp_ack(struct s
FLAG_NOT_DUP | FLAG_DATA_SACKED))) { FLAG_NOT_DUP | FLAG_DATA_SACKED))) {
/* Pure dupack: original and TLP probe arrived; no loss */ /* Pure dupack: original and TLP probe arrived; no loss */
tp->tlp_high_seq = 0; tp->tlp_high_seq = 0;
@@ -53,7 +53,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
} }
} }
@@ -4053,7 +4059,7 @@ static int tcp_ack(struct sock *sk, cons @@ -4059,7 +4065,7 @@ static int tcp_ack(struct sock *sk, cons
tcp_rack_update_reo_wnd(sk, &rs); tcp_rack_update_reo_wnd(sk, &rs);
if (tp->tlp_high_seq) if (tp->tlp_high_seq)
@@ -62,7 +62,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
if (tcp_ack_is_dubious(sk, flag)) { if (tcp_ack_is_dubious(sk, flag)) {
if (!(flag & (FLAG_SND_UNA_ADVANCED | if (!(flag & (FLAG_SND_UNA_ADVANCED |
@@ -4097,7 +4103,7 @@ no_queue: @@ -4103,7 +4109,7 @@ no_queue:
tcp_ack_probe(sk); tcp_ack_probe(sk);
if (tp->tlp_high_seq) if (tp->tlp_high_seq)

View File

@@ -33,7 +33,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -375,6 +375,7 @@ static inline void tcp_dec_quickack_mode @@ -376,6 +376,7 @@ static inline void tcp_dec_quickack_mode
#define TCP_ECN_QUEUE_CWR 2 #define TCP_ECN_QUEUE_CWR 2
#define TCP_ECN_DEMAND_CWR 4 #define TCP_ECN_DEMAND_CWR 4
#define TCP_ECN_SEEN 8 #define TCP_ECN_SEEN 8
@@ -41,7 +41,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
enum tcp_tw_status { enum tcp_tw_status {
TCP_TW_SUCCESS = 0, TCP_TW_SUCCESS = 0,
@@ -777,6 +778,15 @@ static inline void tcp_fast_path_check(s @@ -794,6 +795,15 @@ static inline void tcp_fast_path_check(s
tcp_fast_path_on(tp); tcp_fast_path_on(tp);
} }
@@ -88,7 +88,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c
@@ -336,10 +336,9 @@ static void tcp_ecn_send_syn(struct sock @@ -339,10 +339,9 @@ static void tcp_ecn_send_syn(struct sock
bool bpf_needs_ecn = tcp_bpf_ca_needs_ecn(sk); bool bpf_needs_ecn = tcp_bpf_ca_needs_ecn(sk);
bool use_ecn = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_ecn) == 1 || bool use_ecn = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_ecn) == 1 ||
tcp_ca_needs_ecn(sk) || bpf_needs_ecn; tcp_ca_needs_ecn(sk) || bpf_needs_ecn;
@@ -100,7 +100,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
if (dst && dst_feature(dst, RTAX_FEATURE_ECN)) if (dst && dst_feature(dst, RTAX_FEATURE_ECN))
use_ecn = true; use_ecn = true;
} }
@@ -351,6 +350,9 @@ static void tcp_ecn_send_syn(struct sock @@ -354,6 +353,9 @@ static void tcp_ecn_send_syn(struct sock
tp->ecn_flags = TCP_ECN_OK; tp->ecn_flags = TCP_ECN_OK;
if (tcp_ca_needs_ecn(sk) || bpf_needs_ecn) if (tcp_ca_needs_ecn(sk) || bpf_needs_ecn)
INET_ECN_xmit(sk); INET_ECN_xmit(sk);

View File

@@ -153,7 +153,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
#define ICSK_TIME_RETRANS 1 /* Retransmit timer */ #define ICSK_TIME_RETRANS 1 /* Retransmit timer */
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -2474,7 +2474,7 @@ struct tcp_plb_state { @@ -2491,7 +2491,7 @@ struct tcp_plb_state {
u8 consec_cong_rounds:5, /* consecutive congested rounds */ u8 consec_cong_rounds:5, /* consecutive congested rounds */
unused:3; unused:3;
u32 pause_until; /* jiffies32 when PLB can resume rerouting */ u32 pause_until; /* jiffies32 when PLB can resume rerouting */

View File

@@ -25,7 +25,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/net/tcp.h --- a/include/net/tcp.h
+++ b/include/net/tcp.h +++ b/include/net/tcp.h
@@ -376,6 +376,7 @@ static inline void tcp_dec_quickack_mode @@ -377,6 +377,7 @@ static inline void tcp_dec_quickack_mode
#define TCP_ECN_DEMAND_CWR 4 #define TCP_ECN_DEMAND_CWR 4
#define TCP_ECN_SEEN 8 #define TCP_ECN_SEEN 8
#define TCP_ECN_LOW 16 #define TCP_ECN_LOW 16
@@ -47,7 +47,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
/* BBR marks the current round trip as a loss round. */ /* BBR marks the current round trip as a loss round. */
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c
@@ -390,7 +390,8 @@ static void tcp_ecn_send(struct sock *sk @@ -393,7 +393,8 @@ static void tcp_ecn_send(struct sock *sk
th->cwr = 1; th->cwr = 1;
skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
} }

View File

@@ -27,7 +27,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
* Sender's congestion state indicating normal or abnormal situations * Sender's congestion state indicating normal or abnormal situations
--- a/net/ipv4/tcp.c --- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c
@@ -4111,6 +4111,8 @@ void tcp_get_info(struct sock *sk, struc @@ -4124,6 +4124,8 @@ void tcp_get_info(struct sock *sk, struc
info->tcpi_options |= TCPI_OPT_ECN; info->tcpi_options |= TCPI_OPT_ECN;
if (tp->ecn_flags & TCP_ECN_SEEN) if (tp->ecn_flags & TCP_ECN_SEEN)
info->tcpi_options |= TCPI_OPT_ECN_SEEN; info->tcpi_options |= TCPI_OPT_ECN_SEEN;

View File

@@ -0,0 +1,22 @@
From 2aa0cab3a568e6adccbe708ee2e79185638860ed Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike@fireburn.co.uk>
Date: Fri, 14 Feb 2025 12:28:00 +0000
Subject: ntsync: Set the permissions to be 0666
This allows ntsync to be usuable by non-root processes out of the box
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
---
drivers/misc/ntsync.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/misc/ntsync.c
+++ b/drivers/misc/ntsync.c
@@ -1206,6 +1206,7 @@ static struct miscdevice ntsync_misc = {
.minor = MISC_DYNAMIC_MINOR,
.name = NTSYNC_NAME,
.fops = &ntsync_fops,
+ .mode = 0666, // Setting file permissions to 0666
};
module_misc_device(ntsync_misc);

View File

@@ -13,7 +13,7 @@ dependency on CONFIG_ARC and adds RUSTFLAGS.
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -813,6 +813,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe @@ -820,6 +820,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += -O2 KBUILD_CFLAGS += -O2
KBUILD_RUSTFLAGS += -Copt-level=2 KBUILD_RUSTFLAGS += -Copt-level=2

View File

@@ -1,6 +1,6 @@
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -821,6 +821,10 @@ KBUILD_CFLAGS += -Os @@ -828,6 +828,10 @@ KBUILD_CFLAGS += -Os
KBUILD_RUSTFLAGS += -Copt-level=s KBUILD_RUSTFLAGS += -Copt-level=s
endif endif

View File

@@ -11,7 +11,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -825,6 +825,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE @@ -832,6 +832,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += $(call cc-option,-fivopts) KBUILD_CFLAGS += $(call cc-option,-fivopts)
endif endif

View File

@@ -30,7 +30,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
--- a/fs/xfs/xfs_qm.c --- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c
@@ -1153,8 +1153,8 @@ xfs_qm_dqusage_adjust( @@ -1181,8 +1181,8 @@ xfs_qm_dqusage_adjust(
void *data) void *data)
{ {
struct xfs_inode *ip; struct xfs_inode *ip;
@@ -41,7 +41,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
int error; int error;
ASSERT(XFS_IS_QUOTA_ON(mp)); ASSERT(XFS_IS_QUOTA_ON(mp));
@@ -1191,18 +1191,17 @@ xfs_qm_dqusage_adjust( @@ -1219,18 +1219,17 @@ xfs_qm_dqusage_adjust(
ASSERT(ip->i_delayed_blks == 0); ASSERT(ip->i_delayed_blks == 0);
@@ -66,7 +66,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
/* /*
* Add the (disk blocks and inode) resources occupied by this * Add the (disk blocks and inode) resources occupied by this
@@ -1858,9 +1857,8 @@ xfs_qm_vop_chown( @@ -1892,9 +1891,8 @@ xfs_qm_vop_chown(
struct xfs_dquot *newdq) struct xfs_dquot *newdq)
{ {
struct xfs_dquot *prevdq; struct xfs_dquot *prevdq;
@@ -78,7 +78,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
xfs_assert_ilocked(ip, XFS_ILOCK_EXCL); xfs_assert_ilocked(ip, XFS_ILOCK_EXCL);
ASSERT(XFS_IS_QUOTA_ON(ip->i_mount)); ASSERT(XFS_IS_QUOTA_ON(ip->i_mount));
@@ -1870,11 +1868,17 @@ xfs_qm_vop_chown( @@ -1904,11 +1902,17 @@ xfs_qm_vop_chown(
ASSERT(prevdq); ASSERT(prevdq);
ASSERT(prevdq != newdq); ASSERT(prevdq != newdq);
@@ -98,7 +98,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
xfs_trans_mod_ino_dquot(tp, ip, newdq, XFS_TRANS_DQ_ICOUNT, 1); xfs_trans_mod_ino_dquot(tp, ip, newdq, XFS_TRANS_DQ_ICOUNT, 1);
/* /*
@@ -1884,7 +1888,8 @@ xfs_qm_vop_chown( @@ -1918,7 +1922,8 @@ xfs_qm_vop_chown(
* (having already bumped up the real counter) so that we don't have * (having already bumped up the real counter) so that we don't have
* any reservation to give back when we commit. * any reservation to give back when we commit.
*/ */
@@ -108,7 +108,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
-ip->i_delayed_blks); -ip->i_delayed_blks);
/* /*
@@ -1896,8 +1901,13 @@ xfs_qm_vop_chown( @@ -1930,8 +1935,13 @@ xfs_qm_vop_chown(
*/ */
tp->t_flags |= XFS_TRANS_DIRTY; tp->t_flags |= XFS_TRANS_DIRTY;
xfs_dqlock(prevdq); xfs_dqlock(prevdq);
@@ -126,7 +126,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
/* /*
--- a/fs/xfs/xfs_trans.c --- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c
@@ -1254,11 +1254,26 @@ retry: @@ -1257,11 +1257,26 @@ retry:
gdqp = (new_gdqp != ip->i_gdquot) ? new_gdqp : NULL; gdqp = (new_gdqp != ip->i_gdquot) ? new_gdqp : NULL;
pdqp = (new_pdqp != ip->i_pdquot) ? new_pdqp : NULL; pdqp = (new_pdqp != ip->i_pdquot) ? new_pdqp : NULL;
if (udqp || gdqp || pdqp) { if (udqp || gdqp || pdqp) {
@@ -153,7 +153,7 @@ Reviewed-by: Christoph Hellwig <hch@lst.de>
/* /*
* Reserve enough quota to handle blocks on disk and reserved * Reserve enough quota to handle blocks on disk and reserved
* for a delayed allocation. We'll actually transfer the * for a delayed allocation. We'll actually transfer the
@@ -1266,8 +1281,20 @@ retry: @@ -1269,8 +1284,20 @@ retry:
* though that part is only semi-transactional. * though that part is only semi-transactional.
*/ */
error = xfs_trans_reserve_quota_bydquots(tp, mp, udqp, gdqp, error = xfs_trans_reserve_quota_bydquots(tp, mp, udqp, gdqp,

View File

@@ -83,7 +83,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
.maxlen = sizeof(u8), .maxlen = sizeof(u8),
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c
@@ -5652,6 +5652,7 @@ static bool tcp_prune_ofo_queue(struct s @@ -5658,6 +5658,7 @@ static bool tcp_prune_ofo_queue(struct s
static int tcp_prune_queue(struct sock *sk, const struct sk_buff *in_skb) static int tcp_prune_queue(struct sock *sk, const struct sk_buff *in_skb)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
@@ -91,7 +91,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
NET_INC_STATS(sock_net(sk), LINUX_MIB_PRUNECALLED); NET_INC_STATS(sock_net(sk), LINUX_MIB_PRUNECALLED);
@@ -5663,6 +5664,39 @@ static int tcp_prune_queue(struct sock * @@ -5669,6 +5670,39 @@ static int tcp_prune_queue(struct sock *
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
return 0; return 0;
@@ -131,7 +131,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
tcp_collapse_ofo_queue(sk); tcp_collapse_ofo_queue(sk);
if (!skb_queue_empty(&sk->sk_receive_queue)) if (!skb_queue_empty(&sk->sk_receive_queue))
tcp_collapse(sk, &sk->sk_receive_queue, NULL, tcp_collapse(sk, &sk->sk_receive_queue, NULL,
@@ -5681,6 +5715,8 @@ static int tcp_prune_queue(struct sock * @@ -5687,6 +5721,8 @@ static int tcp_prune_queue(struct sock *
if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
return 0; return 0;

View File

@@ -12,7 +12,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -997,15 +997,8 @@ export CC_FLAGS_FPU @@ -1004,15 +1004,8 @@ export CC_FLAGS_FPU
export CC_FLAGS_NO_FPU export CC_FLAGS_NO_FPU
ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0) ifneq ($(CONFIG_FUNCTION_ALIGNMENT),0)

View File

@@ -11,7 +11,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/include/linux/blkdev.h --- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h +++ b/include/linux/blkdev.h
@@ -613,7 +613,8 @@ enum { @@ -614,7 +614,8 @@ enum {
QUEUE_FLAG_MAX QUEUE_FLAG_MAX
}; };

View File

@@ -158,5 +158,5 @@ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+} +}
+ +
extern void __futex_unqueue(struct futex_q *q); extern void __futex_unqueue(struct futex_q *q);
extern void __futex_queue(struct futex_q *q, struct futex_hash_bucket *hb); extern void __futex_queue(struct futex_q *q, struct futex_hash_bucket *hb,
extern int futex_unqueue(struct futex_q *q); struct task_struct *task);

View File

@@ -1,6 +1,6 @@
From 6cb30d7518301094b9c7397a24a22cf538a1d64c Mon Sep 17 00:00:00 2001 From e11153c4df0fee7caadec3714a60a4936d6a9ea2 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:20 -0500 Date: Wed, 5 Feb 2025 23:43:20 -0500
Subject: x86/mm: make MMU_GATHER_RCU_TABLE_FREE unconditional Subject: x86/mm: make MMU_GATHER_RCU_TABLE_FREE unconditional
Currently x86 uses CONFIG_MMU_GATHER_TABLE_FREE when using Currently x86 uses CONFIG_MMU_GATHER_TABLE_FREE when using
@@ -29,6 +29,7 @@ That makes it safe to use INVLPGB on AMD CPUs.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Suggested-by: Peter Zijlstra <peterz@infradead.org> Suggested-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/Kconfig | 2 +- arch/x86/Kconfig | 2 +-
arch/x86/kernel/paravirt.c | 7 +------ arch/x86/kernel/paravirt.c | 7 +------

View File

@@ -1,6 +1,6 @@
From df8f812b62c450b98b972ad0a4d5a5ba400f5eae Mon Sep 17 00:00:00 2001 From e8008cb69c5e4efbaedd70b0fb692343e4aa0e51 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:21 -0500 Date: Wed, 5 Feb 2025 23:43:21 -0500
Subject: x86/mm: remove pv_ops.mmu.tlb_remove_table call Subject: x86/mm: remove pv_ops.mmu.tlb_remove_table call
Every pv_ops.mmu.tlb_remove_table call ends up calling tlb_remove_table. Every pv_ops.mmu.tlb_remove_table call ends up calling tlb_remove_table.
@@ -10,6 +10,7 @@ and not going through the paravirt function pointers.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Suggested-by: Qi Zheng <zhengqi.arch@bytedance.com> Suggested-by: Qi Zheng <zhengqi.arch@bytedance.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/hyperv/mmu.c | 1 - arch/x86/hyperv/mmu.c | 1 -
arch/x86/include/asm/paravirt.h | 5 ----- arch/x86/include/asm/paravirt.h | 5 -----
@@ -74,7 +75,7 @@ Suggested-by: Qi Zheng <zhengqi.arch@bytedance.com>
.mmu.notify_page_enc_status_changed = paravirt_nop, .mmu.notify_page_enc_status_changed = paravirt_nop,
--- a/arch/x86/xen/mmu_pv.c --- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c
@@ -2137,7 +2137,6 @@ static const typeof(pv_ops) xen_mmu_ops @@ -2189,7 +2189,6 @@ static const typeof(pv_ops) xen_mmu_ops
.flush_tlb_kernel = xen_flush_tlb, .flush_tlb_kernel = xen_flush_tlb,
.flush_tlb_one_user = xen_flush_tlb_one_user, .flush_tlb_one_user = xen_flush_tlb_one_user,
.flush_tlb_multi = xen_flush_tlb_multi, .flush_tlb_multi = xen_flush_tlb_multi,

View File

@@ -1,6 +1,6 @@
From 8b2bd3f69b50cfe59eee4506413715878bcbb901 Mon Sep 17 00:00:00 2001 From 7ac6508c4db81eced5f6e3d7c8913af1da6cf110 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:22 -0500 Date: Wed, 5 Feb 2025 23:43:22 -0500
Subject: x86/mm: consolidate full flush threshold decision Subject: x86/mm: consolidate full flush threshold decision
Reduce code duplication by consolidating the decision point Reduce code duplication by consolidating the decision point
@@ -10,15 +10,35 @@ inside get_flush_tlb_info.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Suggested-by: Dave Hansen <dave.hansen@intel.com> Suggested-by: Dave Hansen <dave.hansen@intel.com>
--- ---
arch/x86/mm/tlb.c | 43 ++++++++++++++++++++----------------------- arch/x86/mm/tlb.c | 56 ++++++++++++++++++++++++++---------------------
1 file changed, 20 insertions(+), 23 deletions(-) 1 file changed, 31 insertions(+), 25 deletions(-)
--- a/arch/x86/mm/tlb.c --- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c
@@ -981,6 +981,15 @@ static struct flush_tlb_info *get_flush_ @@ -1000,8 +1000,13 @@ static struct flush_tlb_info *get_flush_
info->new_tlb_gen = new_tlb_gen; BUG_ON(this_cpu_inc_return(flush_tlb_info_idx) != 1);
info->initiating_cpu = smp_processor_id(); #endif
- info->start = start;
- info->end = end;
+ /*
+ * Round the start and end addresses to the page size specified
+ * by the stride shift. This ensures partial pages at the end of
+ * a range get fully invalidated.
+ */
+ info->start = round_down(start, 1 << stride_shift);
+ info->end = round_up(end, 1 << stride_shift);
info->mm = mm;
info->stride_shift = stride_shift;
info->freed_tables = freed_tables;
@@ -1009,6 +1014,19 @@ static struct flush_tlb_info *get_flush_
info->initiating_cpu = smp_processor_id();
info->trim_cpumask = 0;
+ WARN_ONCE(start != info->start || end != info->end,
+ "TLB flush not stride %x aligned. Start %lx, end %lx\n",
+ 1 << stride_shift, start, end);
+
+ /* + /*
+ * If the number of flushes is so large that a full flush + * If the number of flushes is so large that a full flush
+ * would be faster, do a full flush. + * would be faster, do a full flush.
@@ -31,7 +51,7 @@ Suggested-by: Dave Hansen <dave.hansen@intel.com>
return info; return info;
} }
@@ -998,17 +1007,8 @@ void flush_tlb_mm_range(struct mm_struct @@ -1026,17 +1044,8 @@ void flush_tlb_mm_range(struct mm_struct
bool freed_tables) bool freed_tables)
{ {
struct flush_tlb_info *info; struct flush_tlb_info *info;
@@ -50,7 +70,7 @@ Suggested-by: Dave Hansen <dave.hansen@intel.com>
/* This is also a barrier that synchronizes with switch_mm(). */ /* This is also a barrier that synchronizes with switch_mm(). */
new_tlb_gen = inc_mm_tlb_gen(mm); new_tlb_gen = inc_mm_tlb_gen(mm);
@@ -1060,22 +1060,19 @@ static void do_kernel_range_flush(void * @@ -1089,22 +1098,19 @@ static void do_kernel_range_flush(void *
void flush_tlb_kernel_range(unsigned long start, unsigned long end) void flush_tlb_kernel_range(unsigned long start, unsigned long end)
{ {
@@ -61,12 +81,12 @@ Suggested-by: Dave Hansen <dave.hansen@intel.com>
- } else { - } else {
- struct flush_tlb_info *info; - struct flush_tlb_info *info;
+ struct flush_tlb_info *info; + struct flush_tlb_info *info;
+
+ guard(preempt)();
- preempt_disable(); - preempt_disable();
- info = get_flush_tlb_info(NULL, start, end, 0, false, - info = get_flush_tlb_info(NULL, start, end, 0, false,
- TLB_GENERATION_INVALID); - TLB_GENERATION_INVALID);
+ guard(preempt)();
+
+ info = get_flush_tlb_info(NULL, start, end, PAGE_SHIFT, false, + info = get_flush_tlb_info(NULL, start, end, PAGE_SHIFT, false,
+ TLB_GENERATION_INVALID); + TLB_GENERATION_INVALID);
@@ -82,7 +102,7 @@ Suggested-by: Dave Hansen <dave.hansen@intel.com>
} }
/* /*
@@ -1247,7 +1244,7 @@ void arch_tlbbatch_flush(struct arch_tlb @@ -1276,7 +1282,7 @@ void arch_tlbbatch_flush(struct arch_tlb
int cpu = get_cpu(); int cpu = get_cpu();

View File

@@ -1,6 +1,6 @@
From a182b0471ba3c3329d93abfa07e3d452183a9137 Mon Sep 17 00:00:00 2001 From e772b2eb66e5c3cf668feadab678f2a88d896189 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:23 -0500 Date: Wed, 5 Feb 2025 23:43:23 -0500
Subject: x86/mm: get INVLPGB count max from CPUID Subject: x86/mm: get INVLPGB count max from CPUID
The CPU advertises the maximum number of pages that can be shot down The CPU advertises the maximum number of pages that can be shot down
@@ -9,6 +9,7 @@ with one INVLPGB instruction in the CPUID data.
Save that information for later use. Save that information for later use.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/Kconfig.cpu | 5 +++++ arch/x86/Kconfig.cpu | 5 +++++
arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/cpufeatures.h | 1 +

View File

@@ -1,12 +1,13 @@
From cc3f8dd3033c79abd9f37a94efed74a535a703c9 Mon Sep 17 00:00:00 2001 From 7a896b12875e2b988acbf0229fb4bcf9157b83bd Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:24 -0500 Date: Wed, 5 Feb 2025 23:43:24 -0500
Subject: x86/mm: add INVLPGB support code Subject: x86/mm: add INVLPGB support code
Add invlpgb.h with the helper functions and definitions needed to use Add invlpgb.h with the helper functions and definitions needed to use
broadcast TLB invalidation on AMD EPYC 3 and newer CPUs. broadcast TLB invalidation on AMD EPYC 3 and newer CPUs.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/include/asm/invlpgb.h | 101 ++++++++++++++++++++++++++++++++ arch/x86/include/asm/invlpgb.h | 101 ++++++++++++++++++++++++++++++++
arch/x86/include/asm/tlbflush.h | 1 + arch/x86/include/asm/tlbflush.h | 1 +

View File

@@ -1,6 +1,6 @@
From 6b6686f0d7e228d0a2d8c166204adea5484c20d7 Mon Sep 17 00:00:00 2001 From 99f2b0eda74d7ec76c9c48b78f9d30d251501c28 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:25 -0500 Date: Wed, 5 Feb 2025 23:43:25 -0500
Subject: x86/mm: use INVLPGB for kernel TLB flushes Subject: x86/mm: use INVLPGB for kernel TLB flushes
Use broadcast TLB invalidation for kernel addresses when available. Use broadcast TLB invalidation for kernel addresses when available.
@@ -8,13 +8,14 @@ Use broadcast TLB invalidation for kernel addresses when available.
Remove the need to send IPIs for kernel TLB flushes. Remove the need to send IPIs for kernel TLB flushes.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/mm/tlb.c | 28 +++++++++++++++++++++++++++- arch/x86/mm/tlb.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-) 1 file changed, 27 insertions(+), 1 deletion(-)
--- a/arch/x86/mm/tlb.c --- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c
@@ -1048,6 +1048,30 @@ void flush_tlb_all(void) @@ -1086,6 +1086,30 @@ void flush_tlb_all(void)
on_each_cpu(do_flush_tlb_all, NULL, 1); on_each_cpu(do_flush_tlb_all, NULL, 1);
} }
@@ -45,7 +46,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
static void do_kernel_range_flush(void *info) static void do_kernel_range_flush(void *info)
{ {
struct flush_tlb_info *f = info; struct flush_tlb_info *f = info;
@@ -1067,7 +1091,9 @@ void flush_tlb_kernel_range(unsigned lon @@ -1105,7 +1129,9 @@ void flush_tlb_kernel_range(unsigned lon
info = get_flush_tlb_info(NULL, start, end, PAGE_SHIFT, false, info = get_flush_tlb_info(NULL, start, end, PAGE_SHIFT, false,
TLB_GENERATION_INVALID); TLB_GENERATION_INVALID);

View File

@@ -1,19 +1,20 @@
From 6cffce503223f9076a5e16177905ba3ab6d9f7d8 Mon Sep 17 00:00:00 2001 From 1ef7edb5b2375d4010ed2ad0c7d87fcfa7ab4519 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:26 -0500 Date: Wed, 5 Feb 2025 23:43:26 -0500
Subject: x86/mm: use INVLPGB in flush_tlb_all Subject: x86/mm: use INVLPGB in flush_tlb_all
The flush_tlb_all() function is not used a whole lot, but we might The flush_tlb_all() function is not used a whole lot, but we might
as well use broadcast TLB flushing there, too. as well use broadcast TLB flushing there, too.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/mm/tlb.c | 15 +++++++++++++++ arch/x86/mm/tlb.c | 15 +++++++++++++++
1 file changed, 15 insertions(+) 1 file changed, 15 insertions(+)
--- a/arch/x86/mm/tlb.c --- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c
@@ -1036,6 +1036,19 @@ void flush_tlb_mm_range(struct mm_struct @@ -1074,6 +1074,19 @@ void flush_tlb_mm_range(struct mm_struct
} }
@@ -33,7 +34,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
static void do_flush_tlb_all(void *info) static void do_flush_tlb_all(void *info)
{ {
count_vm_tlb_event(NR_TLB_REMOTE_FLUSH_RECEIVED); count_vm_tlb_event(NR_TLB_REMOTE_FLUSH_RECEIVED);
@@ -1044,6 +1057,8 @@ static void do_flush_tlb_all(void *info) @@ -1082,6 +1095,8 @@ static void do_flush_tlb_all(void *info)
void flush_tlb_all(void) void flush_tlb_all(void)
{ {

View File

@@ -1,6 +1,6 @@
From 3d23d79d14cdd3c68dc5bffbaf34a60eaca7fa40 Mon Sep 17 00:00:00 2001 From 5e5219596683c3b8178e09f6ec1e75154537325f Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:27 -0500 Date: Wed, 5 Feb 2025 23:43:27 -0500
Subject: x86/mm: use broadcast TLB flushing for page reclaim TLB flushing Subject: x86/mm: use broadcast TLB flushing for page reclaim TLB flushing
In the page reclaim code, we only track the CPU(s) where the TLB needs In the page reclaim code, we only track the CPU(s) where the TLB needs
@@ -10,13 +10,14 @@ invalidated.
Use broadcast TLB flushing when that is available. Use broadcast TLB flushing when that is available.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/mm/tlb.c | 4 +++- arch/x86/mm/tlb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
--- a/arch/x86/mm/tlb.c --- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c
@@ -1292,7 +1292,9 @@ void arch_tlbbatch_flush(struct arch_tlb @@ -1330,7 +1330,9 @@ void arch_tlbbatch_flush(struct arch_tlb
* a local TLB flush is needed. Optimize this use-case by calling * a local TLB flush is needed. Optimize this use-case by calling
* flush_tlb_func_local() directly in this case. * flush_tlb_func_local() directly in this case.
*/ */

View File

@@ -1,6 +1,6 @@
From 79c9df0c7637c8ba8a1833889a2ace355d56c96e Mon Sep 17 00:00:00 2001 From c7212dc64d8e9e4f12f1c6edea3b75c350a30381 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:28 -0500 Date: Wed, 5 Feb 2025 23:43:28 -0500
Subject: x86/mm: enable broadcast TLB invalidation for multi-threaded Subject: x86/mm: enable broadcast TLB invalidation for multi-threaded
processes processes
@@ -9,10 +9,10 @@ and newer CPUs.
In order to not exhaust PCID space, and keep TLB flushes local for single In order to not exhaust PCID space, and keep TLB flushes local for single
threaded processes, we only hand out broadcast ASIDs to processes active on threaded processes, we only hand out broadcast ASIDs to processes active on
3 or more CPUs, and gradually increase the threshold as broadcast ASID space 4 or more CPUs.
is depleted.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/include/asm/mmu.h | 6 + arch/x86/include/asm/mmu.h | 6 +
arch/x86/include/asm/mmu_context.h | 14 ++ arch/x86/include/asm/mmu_context.h | 14 ++
@@ -22,7 +22,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
--- a/arch/x86/include/asm/mmu.h --- a/arch/x86/include/asm/mmu.h
+++ b/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h
@@ -67,6 +67,12 @@ typedef struct { @@ -69,6 +69,12 @@ typedef struct {
u16 pkey_allocation_map; u16 pkey_allocation_map;
s16 execute_only_pkey; s16 execute_only_pkey;
#endif #endif
@@ -46,7 +46,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
/* /*
* Init a new mm. Used on mm copies, like at fork() * Init a new mm. Used on mm copies, like at fork()
* and on mm's that are brand-new, like at execve(). * and on mm's that are brand-new, like at execve().
@@ -160,6 +162,14 @@ static inline int init_new_context(struc @@ -161,6 +163,14 @@ static inline int init_new_context(struc
mm->context.execute_only_pkey = -1; mm->context.execute_only_pkey = -1;
} }
#endif #endif
@@ -61,7 +61,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
mm_reset_untag_mask(mm); mm_reset_untag_mask(mm);
init_new_context_ldt(mm); init_new_context_ldt(mm);
return 0; return 0;
@@ -169,6 +179,10 @@ static inline int init_new_context(struc @@ -170,6 +180,10 @@ static inline int init_new_context(struc
static inline void destroy_context(struct mm_struct *mm) static inline void destroy_context(struct mm_struct *mm)
{ {
destroy_context_ldt(mm); destroy_context_ldt(mm);
@@ -82,7 +82,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <asm/special_insns.h> #include <asm/special_insns.h>
@@ -238,6 +239,78 @@ void flush_tlb_one_kernel(unsigned long @@ -239,6 +240,78 @@ void flush_tlb_one_kernel(unsigned long
void flush_tlb_multi(const struct cpumask *cpumask, void flush_tlb_multi(const struct cpumask *cpumask,
const struct flush_tlb_info *info); const struct flush_tlb_info *info);
@@ -100,12 +100,12 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
+ return !is_dyn_asid(asid); + return !is_dyn_asid(asid);
+} +}
+ +
+static inline bool in_asid_transition(const struct flush_tlb_info *info) +static inline bool in_asid_transition(struct mm_struct *mm)
+{ +{
+ if (!cpu_feature_enabled(X86_FEATURE_INVLPGB)) + if (!cpu_feature_enabled(X86_FEATURE_INVLPGB))
+ return false; + return false;
+ +
+ return info->mm && READ_ONCE(info->mm->context.asid_transition); + return mm && READ_ONCE(mm->context.asid_transition);
+} +}
+ +
+static inline u16 mm_global_asid(struct mm_struct *mm) +static inline u16 mm_global_asid(struct mm_struct *mm)
@@ -133,7 +133,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
+ return false; + return false;
+} +}
+ +
+static inline bool in_asid_transition(const struct flush_tlb_info *info) +static inline bool in_asid_transition(struct mm_struct *mm)
+{ +{
+ return false; + return false;
+} +}
@@ -578,16 +578,16 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
if (unlikely(f->new_tlb_gen != TLB_GENERATION_INVALID && if (unlikely(f->new_tlb_gen != TLB_GENERATION_INVALID &&
f->new_tlb_gen <= local_tlb_gen)) { f->new_tlb_gen <= local_tlb_gen)) {
/* /*
@@ -926,7 +1243,7 @@ STATIC_NOPV void native_flush_tlb_multi( @@ -953,7 +1270,7 @@ STATIC_NOPV void native_flush_tlb_multi(
* up on the new contents of what used to be page tables, while * up on the new contents of what used to be page tables, while
* doing a speculative memory access. * doing a speculative memory access.
*/ */
- if (info->freed_tables) - if (info->freed_tables)
+ if (info->freed_tables || in_asid_transition(info)) + if (info->freed_tables || in_asid_transition(info->mm))
on_each_cpu_mask(cpumask, flush_tlb_func, (void *)info, true); on_each_cpu_mask(cpumask, flush_tlb_func, (void *)info, true);
else else
on_each_cpu_cond_mask(tlb_is_not_lazy, flush_tlb_func, on_each_cpu_cond_mask(should_flush_tlb, flush_tlb_func,
@@ -1021,8 +1338,11 @@ void flush_tlb_mm_range(struct mm_struct @@ -1058,9 +1375,12 @@ void flush_tlb_mm_range(struct mm_struct
* a local TLB flush is needed. Optimize this use-case by calling * a local TLB flush is needed. Optimize this use-case by calling
* flush_tlb_func_local() directly in this case. * flush_tlb_func_local() directly in this case.
*/ */
@@ -595,6 +595,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
+ if (mm_global_asid(mm)) { + if (mm_global_asid(mm)) {
+ broadcast_tlb_flush(info); + broadcast_tlb_flush(info);
+ } else if (cpumask_any_but(mm_cpumask(mm), cpu) < nr_cpu_ids) { + } else if (cpumask_any_but(mm_cpumask(mm), cpu) < nr_cpu_ids) {
info->trim_cpumask = should_trim_cpumask(mm);
flush_tlb_multi(mm_cpumask(mm), info); flush_tlb_multi(mm_cpumask(mm), info);
+ consider_global_asid(mm); + consider_global_asid(mm);
} else if (mm == this_cpu_read(cpu_tlbstate.loaded_mm)) { } else if (mm == this_cpu_read(cpu_tlbstate.loaded_mm)) {

View File

@@ -0,0 +1,251 @@
From 6f601cdcd33be8fc0da98c6bab777575af3260b8 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com>
Date: Wed, 5 Feb 2025 23:43:29 -0500
Subject: x86/mm: do targeted broadcast flushing from tlbbatch code
Instead of doing a system-wide TLB flush from arch_tlbbatch_flush,
queue up asynchronous, targeted flushes from arch_tlbbatch_add_pending.
This also allows us to avoid adding the CPUs of processes using broadcast
flushing to the batch->cpumask, and will hopefully further reduce TLB
flushing from the reclaim and compaction paths.
Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
---
arch/x86/include/asm/invlpgb.h | 21 +++++----
arch/x86/include/asm/tlbflush.h | 17 ++++---
arch/x86/mm/tlb.c | 80 +++++++++++++++++++++++++++++++--
3 files changed, 95 insertions(+), 23 deletions(-)
--- a/arch/x86/include/asm/invlpgb.h
+++ b/arch/x86/include/asm/invlpgb.h
@@ -31,9 +31,8 @@ static inline void __invlpgb(unsigned lo
}
/* Wait for INVLPGB originated by this CPU to complete. */
-static inline void tlbsync(void)
+static inline void __tlbsync(void)
{
- cant_migrate();
/* TLBSYNC: supported in binutils >= 0.36. */
asm volatile(".byte 0x0f, 0x01, 0xff" ::: "memory");
}
@@ -61,19 +60,19 @@ static inline void invlpgb_flush_user(un
unsigned long addr)
{
__invlpgb(0, pcid, addr, 0, 0, INVLPGB_PCID | INVLPGB_VA);
- tlbsync();
+ __tlbsync();
}
-static inline void invlpgb_flush_user_nr_nosync(unsigned long pcid,
- unsigned long addr,
- u16 nr,
- bool pmd_stride)
+static inline void __invlpgb_flush_user_nr_nosync(unsigned long pcid,
+ unsigned long addr,
+ u16 nr,
+ bool pmd_stride)
{
__invlpgb(0, pcid, addr, nr - 1, pmd_stride, INVLPGB_PCID | INVLPGB_VA);
}
/* Flush all mappings for a given PCID, not including globals. */
-static inline void invlpgb_flush_single_pcid_nosync(unsigned long pcid)
+static inline void __invlpgb_flush_single_pcid_nosync(unsigned long pcid)
{
__invlpgb(0, pcid, 0, 0, 0, INVLPGB_PCID);
}
@@ -82,11 +81,11 @@ static inline void invlpgb_flush_single_
static inline void invlpgb_flush_all(void)
{
__invlpgb(0, 0, 0, 0, 0, INVLPGB_INCLUDE_GLOBAL);
- tlbsync();
+ __tlbsync();
}
/* Flush addr, including globals, for all PCIDs. */
-static inline void invlpgb_flush_addr_nosync(unsigned long addr, u16 nr)
+static inline void __invlpgb_flush_addr_nosync(unsigned long addr, u16 nr)
{
__invlpgb(0, 0, addr, nr - 1, 0, INVLPGB_INCLUDE_GLOBAL);
}
@@ -95,7 +94,7 @@ static inline void invlpgb_flush_addr_no
static inline void invlpgb_flush_all_nonglobals(void)
{
__invlpgb(0, 0, 0, 0, 0, 0);
- tlbsync();
+ __tlbsync();
}
#endif /* _ASM_X86_INVLPGB */
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -106,6 +106,7 @@ struct tlb_state {
* need to be invalidated.
*/
bool invalidate_other;
+ bool need_tlbsync;
#ifdef CONFIG_ADDRESS_MASKING
/*
@@ -310,6 +311,10 @@ static inline void broadcast_tlb_flush(s
static inline void consider_global_asid(struct mm_struct *mm)
{
}
+
+static inline void tlbsync(void)
+{
+}
#endif
#ifdef CONFIG_PARAVIRT
@@ -359,21 +364,15 @@ static inline u64 inc_mm_tlb_gen(struct
return atomic64_inc_return(&mm->context.tlb_gen);
}
-static inline void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
- struct mm_struct *mm,
- unsigned long uaddr)
-{
- inc_mm_tlb_gen(mm);
- cpumask_or(&batch->cpumask, &batch->cpumask, mm_cpumask(mm));
- mmu_notifier_arch_invalidate_secondary_tlbs(mm, 0, -1UL);
-}
-
static inline void arch_flush_tlb_batched_pending(struct mm_struct *mm)
{
flush_tlb_mm(mm);
}
extern void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch);
+extern void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
+ struct mm_struct *mm,
+ unsigned long uaddr);
static inline bool pte_flags_need_flush(unsigned long oldflags,
unsigned long newflags,
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -488,6 +488,37 @@ static void finish_asid_transition(struc
WRITE_ONCE(mm->context.asid_transition, false);
}
+static inline void tlbsync(void)
+{
+ if (!this_cpu_read(cpu_tlbstate.need_tlbsync))
+ return;
+ __tlbsync();
+ this_cpu_write(cpu_tlbstate.need_tlbsync, false);
+}
+
+static inline void invlpgb_flush_user_nr_nosync(unsigned long pcid,
+ unsigned long addr,
+ u16 nr, bool pmd_stride)
+{
+ __invlpgb_flush_user_nr_nosync(pcid, addr, nr, pmd_stride);
+ if (!this_cpu_read(cpu_tlbstate.need_tlbsync))
+ this_cpu_write(cpu_tlbstate.need_tlbsync, true);
+}
+
+static inline void invlpgb_flush_single_pcid_nosync(unsigned long pcid)
+{
+ __invlpgb_flush_single_pcid_nosync(pcid);
+ if (!this_cpu_read(cpu_tlbstate.need_tlbsync))
+ this_cpu_write(cpu_tlbstate.need_tlbsync, true);
+}
+
+static inline void invlpgb_flush_addr_nosync(unsigned long addr, u16 nr)
+{
+ __invlpgb_flush_addr_nosync(addr, nr);
+ if (!this_cpu_read(cpu_tlbstate.need_tlbsync))
+ this_cpu_write(cpu_tlbstate.need_tlbsync, true);
+}
+
static void broadcast_tlb_flush(struct flush_tlb_info *info)
{
bool pmd = info->stride_shift == PMD_SHIFT;
@@ -794,6 +825,8 @@ void switch_mm_irqs_off(struct mm_struct
if (IS_ENABLED(CONFIG_PROVE_LOCKING))
WARN_ON_ONCE(!irqs_disabled());
+ tlbsync();
+
/*
* Verify that CR3 is what we think it is. This will catch
* hypothetical buggy code that directly switches to swapper_pg_dir
@@ -976,6 +1009,8 @@ reload_tlb:
*/
void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
+ tlbsync();
+
if (this_cpu_read(cpu_tlbstate.loaded_mm) == &init_mm)
return;
@@ -1650,9 +1685,7 @@ void arch_tlbbatch_flush(struct arch_tlb
* a local TLB flush is needed. Optimize this use-case by calling
* flush_tlb_func_local() directly in this case.
*/
- if (cpu_feature_enabled(X86_FEATURE_INVLPGB)) {
- invlpgb_flush_all_nonglobals();
- } else if (cpumask_any_but(&batch->cpumask, cpu) < nr_cpu_ids) {
+ if (cpumask_any_but(&batch->cpumask, cpu) < nr_cpu_ids) {
flush_tlb_multi(&batch->cpumask, info);
} else if (cpumask_test_cpu(cpu, &batch->cpumask)) {
lockdep_assert_irqs_enabled();
@@ -1661,12 +1694,53 @@ void arch_tlbbatch_flush(struct arch_tlb
local_irq_enable();
}
+ /*
+ * If we issued (asynchronous) INVLPGB flushes, wait for them here.
+ * The cpumask above contains only CPUs that were running tasks
+ * not using broadcast TLB flushing.
+ */
+ if (cpu_feature_enabled(X86_FEATURE_INVLPGB))
+ tlbsync();
+
cpumask_clear(&batch->cpumask);
put_flush_tlb_info();
put_cpu();
}
+void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
+ struct mm_struct *mm,
+ unsigned long uaddr)
+{
+ u16 asid = mm_global_asid(mm);
+
+ if (asid) {
+ invlpgb_flush_user_nr_nosync(kern_pcid(asid), uaddr, 1, false);
+ /* Do any CPUs supporting INVLPGB need PTI? */
+ if (static_cpu_has(X86_FEATURE_PTI))
+ invlpgb_flush_user_nr_nosync(user_pcid(asid), uaddr, 1, false);
+
+ /*
+ * Some CPUs might still be using a local ASID for this
+ * process, and require IPIs, while others are using the
+ * global ASID.
+ *
+ * In this corner case we need to do both the broadcast
+ * TLB invalidation, and send IPIs. The IPIs will help
+ * stragglers transition to the broadcast ASID.
+ */
+ if (in_asid_transition(mm))
+ asid = 0;
+ }
+
+ if (!asid) {
+ inc_mm_tlb_gen(mm);
+ cpumask_or(&batch->cpumask, &batch->cpumask, mm_cpumask(mm));
+ }
+
+ mmu_notifier_arch_invalidate_secondary_tlbs(mm, 0, -1UL);
+}
+
/*
* Blindly accessing user memory from NMI context can be dangerous
* if we're in the middle of switching the current user task or

View File

@@ -1,6 +1,6 @@
From 0678da9f0870f0d211d49808a66e98abc0c58438 Mon Sep 17 00:00:00 2001 From 101ba03a6474bbc52971505abf1e3ee9613f255b Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:30 -0500 Date: Wed, 5 Feb 2025 23:43:30 -0500
Subject: x86/mm: enable AMD translation cache extensions Subject: x86/mm: enable AMD translation cache extensions
With AMD TCE (translation cache extensions) only the intermediate mappings With AMD TCE (translation cache extensions) only the intermediate mappings
@@ -22,6 +22,7 @@ only those upper-level entries that lead to the target PTE in
the page table hierarchy, leaving unrelated upper-level entries intact. the page table hierarchy, leaving unrelated upper-level entries intact.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/include/asm/msr-index.h | 2 ++ arch/x86/include/asm/msr-index.h | 2 ++
arch/x86/kernel/cpu/amd.c | 4 ++++ arch/x86/kernel/cpu/amd.c | 4 ++++

View File

@@ -1,6 +1,6 @@
From 02d1759eda082f9595f3232f5dffd5d49943924a Mon Sep 17 00:00:00 2001 From 7b8ef03b059bca98d2af696c3ec2adcaa673f7e4 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:31 -0500 Date: Wed, 5 Feb 2025 23:43:31 -0500
Subject: x86/mm: only invalidate final translations with INVLPGB Subject: x86/mm: only invalidate final translations with INVLPGB
Use the INVLPGB_FINAL_ONLY flag when invalidating mappings with INVPLGB. Use the INVLPGB_FINAL_ONLY flag when invalidating mappings with INVPLGB.
@@ -11,15 +11,16 @@ On the (rare) occasions where we free page tables we do a full flush,
ensuring intermediate translations get flushed from the TLB. ensuring intermediate translations get flushed from the TLB.
Signed-off-by: Rik van Riel <riel@surriel.com> Signed-off-by: Rik van Riel <riel@surriel.com>
Tested-by: Manali Shukla <Manali.Shukla@amd.com>
--- ---
arch/x86/include/asm/invlpgb.h | 10 ++++++++-- arch/x86/include/asm/invlpgb.h | 10 ++++++++--
arch/x86/mm/tlb.c | 8 ++++---- arch/x86/mm/tlb.c | 13 +++++++------
2 files changed, 12 insertions(+), 6 deletions(-) 2 files changed, 15 insertions(+), 8 deletions(-)
--- a/arch/x86/include/asm/invlpgb.h --- a/arch/x86/include/asm/invlpgb.h
+++ b/arch/x86/include/asm/invlpgb.h +++ b/arch/x86/include/asm/invlpgb.h
@@ -67,9 +67,15 @@ static inline void invlpgb_flush_user(un @@ -66,9 +66,15 @@ static inline void invlpgb_flush_user(un
static inline void invlpgb_flush_user_nr_nosync(unsigned long pcid, static inline void __invlpgb_flush_user_nr_nosync(unsigned long pcid,
unsigned long addr, unsigned long addr,
u16 nr, u16 nr,
- bool pmd_stride) - bool pmd_stride)
@@ -27,7 +28,7 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
+ bool freed_tables) + bool freed_tables)
{ {
- __invlpgb(0, pcid, addr, nr - 1, pmd_stride, INVLPGB_PCID | INVLPGB_VA); - __invlpgb(0, pcid, addr, nr - 1, pmd_stride, INVLPGB_PCID | INVLPGB_VA);
+ unsigned long flags = INVLPGB_PCID | INVLPGB_VA; + u8 flags = INVLPGB_PCID | INVLPGB_VA;
+ +
+ if (!freed_tables) + if (!freed_tables)
+ flags |= INVLPGB_FINAL_ONLY; + flags |= INVLPGB_FINAL_ONLY;
@@ -38,7 +39,20 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
/* Flush all mappings for a given PCID, not including globals. */ /* Flush all mappings for a given PCID, not including globals. */
--- a/arch/x86/mm/tlb.c --- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c
@@ -518,10 +518,10 @@ static void broadcast_tlb_flush(struct f @@ -498,9 +498,10 @@ static inline void tlbsync(void)
static inline void invlpgb_flush_user_nr_nosync(unsigned long pcid,
unsigned long addr,
- u16 nr, bool pmd_stride)
+ u16 nr, bool pmd_stride,
+ bool freed_tables)
{
- __invlpgb_flush_user_nr_nosync(pcid, addr, nr, pmd_stride);
+ __invlpgb_flush_user_nr_nosync(pcid, addr, nr, pmd_stride, freed_tables);
if (!this_cpu_read(cpu_tlbstate.need_tlbsync))
this_cpu_write(cpu_tlbstate.need_tlbsync, true);
}
@@ -549,10 +550,10 @@ static void broadcast_tlb_flush(struct f
nr = min(maxnr, (info->end - addr) >> info->stride_shift); nr = min(maxnr, (info->end - addr) >> info->stride_shift);
nr = max(nr, 1); nr = max(nr, 1);
@@ -51,10 +65,10 @@ Signed-off-by: Rik van Riel <riel@surriel.com>
addr += nr << info->stride_shift; addr += nr << info->stride_shift;
} while (addr < info->end); } while (addr < info->end);
@@ -1654,10 +1654,10 @@ void arch_tlbbatch_add_pending(struct ar @@ -1715,10 +1716,10 @@ void arch_tlbbatch_add_pending(struct ar
batch->used_invlpgb = true; u16 asid = mm_global_asid(mm);
migrate_disable();
} if (asid) {
- invlpgb_flush_user_nr_nosync(kern_pcid(asid), uaddr, 1, false); - invlpgb_flush_user_nr_nosync(kern_pcid(asid), uaddr, 1, false);
+ invlpgb_flush_user_nr_nosync(kern_pcid(asid), uaddr, 1, false, false); + invlpgb_flush_user_nr_nosync(kern_pcid(asid), uaddr, 1, false, false);
/* Do any CPUs supporting INVLPGB need PTI? */ /* Do any CPUs supporting INVLPGB need PTI? */

View File

@@ -1,4 +1,4 @@
From b61dfc43cfc7511795366dfd9260f0959ca2f2d2 Mon Sep 17 00:00:00 2001 From 7b0836fcad644d24d6318bf63013ec1b35d6a27b Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com> From: Rik van Riel <riel@surriel.com>
Date: Thu, 19 Dec 2024 15:32:53 -0500 Date: Thu, 19 Dec 2024 15:32:53 -0500
Subject: mm: remove unnecessary calls to lru_add_drain Subject: mm: remove unnecessary calls to lru_add_drain

View File

@@ -1,4 +1,4 @@
From e2d1ffb13e3909dab142f0f8ec8f934b79930717 Mon Sep 17 00:00:00 2001 From 7ecab5a83d3155baa009cd6bc6e18959fee8be62 Mon Sep 17 00:00:00 2001
From: Vincenzo Frascino <vincenzo.frascino@arm.com> From: Vincenzo Frascino <vincenzo.frascino@arm.com>
Date: Mon, 14 Oct 2024 16:13:39 +0100 Date: Mon, 14 Oct 2024 16:13:39 +0100
Subject: vdso: Introduce vdso/page.h Subject: vdso: Introduce vdso/page.h

View File

@@ -1,4 +1,4 @@
From 4478ee194402472199e05d3e27a87f0fc775cc18 Mon Sep 17 00:00:00 2001 From d1bcf51400e790e65945a29078bd816bd61aa148 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de> From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 24 Oct 2024 13:34:26 +0000 Date: Thu, 24 Oct 2024 13:34:26 +0000
Subject: vdso: Change PAGE_MASK to signed on all 32-bit architectures Subject: vdso: Change PAGE_MASK to signed on all 32-bit architectures

View File

@@ -1,135 +0,0 @@
From 647727eaa06fc61fbc55de4c09ab0c0fe7bc7263 Mon Sep 17 00:00:00 2001
From: Rik van Riel <riel@surriel.com>
Date: Wed, 22 Jan 2025 23:23:29 -0500
Subject: x86/mm: do targeted broadcast flushing from tlbbatch code
Instead of doing a system-wide TLB flush from arch_tlbbatch_flush,
queue up asynchronous, targeted flushes from arch_tlbbatch_add_pending.
This also allows us to avoid adding the CPUs of processes using broadcast
flushing to the batch->cpumask, and will hopefully further reduce TLB
flushing from the reclaim and compaction paths.
Signed-off-by: Rik van Riel <riel@surriel.com>
---
arch/x86/include/asm/tlbbatch.h | 1 +
arch/x86/include/asm/tlbflush.h | 12 ++-----
arch/x86/mm/tlb.c | 57 +++++++++++++++++++++++++++++++--
3 files changed, 58 insertions(+), 12 deletions(-)
--- a/arch/x86/include/asm/tlbbatch.h
+++ b/arch/x86/include/asm/tlbbatch.h
@@ -10,6 +10,7 @@ struct arch_tlbflush_unmap_batch {
* the PFNs being flushed..
*/
struct cpumask cpumask;
+ bool used_invlpgb;
};
#endif /* _ARCH_X86_TLBBATCH_H */
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -358,21 +358,15 @@ static inline u64 inc_mm_tlb_gen(struct
return atomic64_inc_return(&mm->context.tlb_gen);
}
-static inline void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
- struct mm_struct *mm,
- unsigned long uaddr)
-{
- inc_mm_tlb_gen(mm);
- cpumask_or(&batch->cpumask, &batch->cpumask, mm_cpumask(mm));
- mmu_notifier_arch_invalidate_secondary_tlbs(mm, 0, -1UL);
-}
-
static inline void arch_flush_tlb_batched_pending(struct mm_struct *mm)
{
flush_tlb_mm(mm);
}
extern void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch);
+extern void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
+ struct mm_struct *mm,
+ unsigned long uaddr);
static inline bool pte_flags_need_flush(unsigned long oldflags,
unsigned long newflags,
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -1612,9 +1612,7 @@ void arch_tlbbatch_flush(struct arch_tlb
* a local TLB flush is needed. Optimize this use-case by calling
* flush_tlb_func_local() directly in this case.
*/
- if (cpu_feature_enabled(X86_FEATURE_INVLPGB)) {
- invlpgb_flush_all_nonglobals();
- } else if (cpumask_any_but(&batch->cpumask, cpu) < nr_cpu_ids) {
+ if (cpumask_any_but(&batch->cpumask, cpu) < nr_cpu_ids) {
flush_tlb_multi(&batch->cpumask, info);
} else if (cpumask_test_cpu(cpu, &batch->cpumask)) {
lockdep_assert_irqs_enabled();
@@ -1623,12 +1621,65 @@ void arch_tlbbatch_flush(struct arch_tlb
local_irq_enable();
}
+ /*
+ * If we issued (asynchronous) INVLPGB flushes, wait for them here.
+ * The cpumask above contains only CPUs that were running tasks
+ * not using broadcast TLB flushing.
+ */
+ if (cpu_feature_enabled(X86_FEATURE_INVLPGB) && batch->used_invlpgb) {
+ tlbsync();
+ migrate_enable();
+ batch->used_invlpgb = false;
+ }
+
cpumask_clear(&batch->cpumask);
put_flush_tlb_info();
put_cpu();
}
+void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
+ struct mm_struct *mm,
+ unsigned long uaddr)
+{
+ u16 asid = mm_global_asid(mm);
+
+ if (asid) {
+ /*
+ * Queue up an asynchronous invalidation. The corresponding
+ * TLBSYNC is done in arch_tlbbatch_flush(), and must be done
+ * on the same CPU.
+ */
+ if (!batch->used_invlpgb) {
+ batch->used_invlpgb = true;
+ migrate_disable();
+ }
+ invlpgb_flush_user_nr_nosync(kern_pcid(asid), uaddr, 1, false);
+ /* Do any CPUs supporting INVLPGB need PTI? */
+ if (static_cpu_has(X86_FEATURE_PTI))
+ invlpgb_flush_user_nr_nosync(user_pcid(asid), uaddr, 1, false);
+
+ /*
+ * Some CPUs might still be using a local ASID for this
+ * process, and require IPIs, while others are using the
+ * global ASID.
+ *
+ * In this corner case we need to do both the broadcast
+ * TLB invalidation, and send IPIs. The IPIs will help
+ * stragglers transition to the broadcast ASID.
+ */
+ if (READ_ONCE(mm->context.asid_transition))
+ asid = 0;
+ }
+
+ if (!asid) {
+ inc_mm_tlb_gen(mm);
+ cpumask_or(&batch->cpumask, &batch->cpumask, mm_cpumask(mm));
+ }
+
+ mmu_notifier_arch_invalidate_secondary_tlbs(mm, 0, -1UL);
+}
+
/*
* Blindly accessing user memory from NMI context can be dangerous
* if we're in the middle of switching the current user task or

View File

@@ -15,7 +15,7 @@ Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -1019,11 +1019,6 @@ KBUILD_CFLAGS += -fno-strict-overflow @@ -1026,11 +1026,6 @@ KBUILD_CFLAGS += -fno-strict-overflow
# Make sure -fstack-check isn't enabled (like gentoo apparently did) # Make sure -fstack-check isn't enabled (like gentoo apparently did)
KBUILD_CFLAGS += -fno-stack-check KBUILD_CFLAGS += -fno-stack-check

View File

@@ -23,7 +23,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
extern int amdgpu_gtt_size; extern int amdgpu_gtt_size;
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -136,6 +136,7 @@ enum AMDGPU_DEBUG_MASK { @@ -138,6 +138,7 @@ enum AMDGPU_DEBUG_MASK {
}; };
unsigned int amdgpu_vram_limit = UINT_MAX; unsigned int amdgpu_vram_limit = UINT_MAX;
@@ -31,7 +31,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
int amdgpu_vis_vram_limit; int amdgpu_vis_vram_limit;
int amdgpu_gart_size = -1; /* auto */ int amdgpu_gart_size = -1; /* auto */
int amdgpu_gtt_size = -1; /* auto */ int amdgpu_gtt_size = -1; /* auto */
@@ -260,6 +261,15 @@ struct amdgpu_watchdog_timer amdgpu_watc @@ -262,6 +263,15 @@ struct amdgpu_watchdog_timer amdgpu_watc
}; };
/** /**
@@ -61,7 +61,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -2792,7 +2792,10 @@ int smu_get_power_limit(void *handle, @@ -2793,7 +2793,10 @@ int smu_get_power_limit(void *handle,
*limit = smu->max_power_limit; *limit = smu->max_power_limit;
break; break;
case SMU_PPT_LIMIT_MIN: case SMU_PPT_LIMIT_MIN:
@@ -73,7 +73,7 @@ Subject: ZEN: drm/amdgpu/pm: Allow override of min_power_limit with
break; break;
default: default:
return -EINVAL; return -EINVAL;
@@ -2816,7 +2819,14 @@ static int smu_set_power_limit(void *han @@ -2817,7 +2820,14 @@ static int smu_set_power_limit(void *han
if (smu->ppt_funcs->set_power_limit) if (smu->ppt_funcs->set_power_limit)
return smu->ppt_funcs->set_power_limit(smu, limit_type, limit); return smu->ppt_funcs->set_power_limit(smu, limit_type, limit);

View File

@@ -70,7 +70,7 @@ Contains:
if (unlikely(nofail)) { if (unlikely(nofail)) {
/* /*
@@ -4278,8 +4281,13 @@ restart: @@ -4279,8 +4282,13 @@ restart:
goto nopage; goto nopage;
} }
@@ -85,7 +85,7 @@ Contains:
/* /*
* The adjusted alloc_flags might result in immediate success, so try * The adjusted alloc_flags might result in immediate success, so try
@@ -4481,9 +4489,12 @@ nopage: @@ -4482,9 +4490,12 @@ nopage:
goto retry; goto retry;
} }
fail: fail:
@@ -102,7 +102,7 @@ Contains:
--- a/mm/vmscan.c --- a/mm/vmscan.c
+++ b/mm/vmscan.c +++ b/mm/vmscan.c
@@ -6384,7 +6384,7 @@ retry: @@ -6385,7 +6385,7 @@ retry:
return 0; return 0;
} }
@@ -111,7 +111,7 @@ Contains:
{ {
struct zone *zone; struct zone *zone;
unsigned long pfmemalloc_reserve = 0; unsigned long pfmemalloc_reserve = 0;
@@ -6413,6 +6413,10 @@ static bool allow_direct_reclaim(pg_data @@ -6414,6 +6414,10 @@ static bool allow_direct_reclaim(pg_data
wmark_ok = free_pages > pfmemalloc_reserve / 2; wmark_ok = free_pages > pfmemalloc_reserve / 2;
@@ -122,7 +122,7 @@ Contains:
/* kswapd must be awake if processes are being throttled */ /* kswapd must be awake if processes are being throttled */
if (!wmark_ok && waitqueue_active(&pgdat->kswapd_wait)) { if (!wmark_ok && waitqueue_active(&pgdat->kswapd_wait)) {
if (READ_ONCE(pgdat->kswapd_highest_zoneidx) > ZONE_NORMAL) if (READ_ONCE(pgdat->kswapd_highest_zoneidx) > ZONE_NORMAL)
@@ -6478,7 +6482,7 @@ static bool throttle_direct_reclaim(gfp_ @@ -6479,7 +6483,7 @@ static bool throttle_direct_reclaim(gfp_
/* Throttle based on the first usable node */ /* Throttle based on the first usable node */
pgdat = zone->zone_pgdat; pgdat = zone->zone_pgdat;
@@ -131,7 +131,7 @@ Contains:
goto out; goto out;
break; break;
} }
@@ -6500,11 +6504,14 @@ static bool throttle_direct_reclaim(gfp_ @@ -6501,11 +6505,14 @@ static bool throttle_direct_reclaim(gfp_
*/ */
if (!(gfp_mask & __GFP_FS)) if (!(gfp_mask & __GFP_FS))
wait_event_interruptible_timeout(pgdat->pfmemalloc_wait, wait_event_interruptible_timeout(pgdat->pfmemalloc_wait,
@@ -148,7 +148,7 @@ Contains:
if (fatal_signal_pending(current)) if (fatal_signal_pending(current))
return true; return true;
@@ -7007,14 +7014,14 @@ restart: @@ -7008,14 +7015,14 @@ restart:
* able to safely make forward progress. Wake them * able to safely make forward progress. Wake them
*/ */
if (waitqueue_active(&pgdat->pfmemalloc_wait) && if (waitqueue_active(&pgdat->pfmemalloc_wait) &&

View File

@@ -93,7 +93,7 @@ caused by rebalancing too many tasks at once.
/* Restrict the NUMA promotion throughput (MB/s) for each target node. */ /* Restrict the NUMA promotion throughput (MB/s) for each target node. */
--- a/kernel/sched/sched.h --- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h +++ b/kernel/sched/sched.h
@@ -2825,7 +2825,7 @@ extern void deactivate_task(struct rq *r @@ -2797,7 +2797,7 @@ extern void deactivate_task(struct rq *r
extern void wakeup_preempt(struct rq *rq, struct task_struct *p, int flags); extern void wakeup_preempt(struct rq *rq, struct task_struct *p, int flags);

View File

@@ -20,7 +20,7 @@ Fixes: https://github.com/zen-kernel/zen-kernel/issues/282
--- a/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c
@@ -3315,6 +3315,11 @@ static int crypt_ctr(struct dm_target *t @@ -3308,6 +3308,11 @@ static int crypt_ctr(struct dm_target *t
goto bad; goto bad;
} }

View File

@@ -56,7 +56,7 @@ Signed-off-by: Vinay Banakar <vny@google.com>
LIST_HEAD(ret_folios); LIST_HEAD(ret_folios);
LIST_HEAD(demote_folios); LIST_HEAD(demote_folios);
+ LIST_HEAD(pageout_list); + LIST_HEAD(pageout_list);
unsigned int nr_reclaimed = 0; unsigned int nr_reclaimed = 0, nr_demoted = 0;
unsigned int pgactivate = 0; unsigned int pgactivate = 0;
bool do_demote_pass; bool do_demote_pass;
@@ -1365,52 +1366,9 @@ retry: @@ -1365,52 +1366,9 @@ retry:
@@ -190,5 +190,5 @@ Signed-off-by: Vinay Banakar <vny@google.com>
+ } + }
+ +
/* Migrate folios selected for demotion */ /* Migrate folios selected for demotion */
stat->nr_demoted = demote_folio_list(&demote_folios, pgdat); nr_demoted = demote_folio_list(&demote_folios, pgdat);
nr_reclaimed += stat->nr_demoted; nr_reclaimed += nr_demoted;

34
debian/patches/series vendored
View File

@@ -1,5 +1,3 @@
debian/gitignore.patch
# Disable features broken by exclusion of upstream files # Disable features broken by exclusion of upstream files
debian/dfsg/arch-powerpc-platforms-8xx-ucode-disable.patch debian/dfsg/arch-powerpc-platforms-8xx-ucode-disable.patch
debian/dfsg/drivers-media-dvb-dvb-usb-af9005-disable.patch debian/dfsg/drivers-media-dvb-dvb-usb-af9005-disable.patch
@@ -72,6 +70,7 @@ bugfix/all/disable-some-marvell-phys.patch
bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch
bugfix/all/documentation-use-relative-source-paths-in-abi-documentation.patch bugfix/all/documentation-use-relative-source-paths-in-abi-documentation.patch
bugfix/all/nfsd-fix-legacy-client-tracking-initialization.patch bugfix/all/nfsd-fix-legacy-client-tracking-initialization.patch
bugfix/all/drm-amdkfd-Fix-user-queue-validation-on-Gfx7-8.patch
# Miscellaneous features # Miscellaneous features
@@ -163,6 +162,7 @@ misc-ntsync7/0015-ntsync-Introduce-alertable-waits.patch
misc-ntsync7/0016-maintainers-Add-an-entry-for-ntsync.patch misc-ntsync7/0016-maintainers-Add-an-entry-for-ntsync.patch
misc-ntsync7/0017-docs-ntsync-Add-documentation-for-the-ntsync-uAPI.patch misc-ntsync7/0017-docs-ntsync-Add-documentation-for-the-ntsync-uAPI.patch
misc-ntsync7/0018-ntsync-No-longer-depend-on-BROKEN.patch misc-ntsync7/0018-ntsync-No-longer-depend-on-BROKEN.patch
misc-ntsync7/0019-ntsync-Set-the-permissions-to-be-0666.patch
misc-openwrt/0001-mac80211-ignore-AP-power-level-when-tx-power-type-is.patch misc-openwrt/0001-mac80211-ignore-AP-power-level-when-tx-power-type-is.patch
@@ -203,21 +203,21 @@ patchset-xanmod/valve/0004-leds-steamdeck-Add-support-for-Steam-Deck-LED.patch
patchset-xanmod/valve/0005-mfd-Add-MFD-core-driver-for-Steam-Deck.patch patchset-xanmod/valve/0005-mfd-Add-MFD-core-driver-for-Steam-Deck.patch
patchset-xanmod/valve/0006-mfd-steamdeck-Expose-controller-board-power-in-sysfs.patch patchset-xanmod/valve/0006-mfd-steamdeck-Expose-controller-board-power-in-sysfs.patch
patchset-zen/nvlpgb-v7/0001-x86-mm-make-MMU_GATHER_RCU_TABLE_FREE-unconditional.patch patchset-zen/invlpgb-v9/0001-x86-mm-make-MMU_GATHER_RCU_TABLE_FREE-unconditional.patch
patchset-zen/nvlpgb-v7/0002-x86-mm-remove-pv_ops.mmu.tlb_remove_table-call.patch patchset-zen/invlpgb-v9/0002-x86-mm-remove-pv_ops.mmu.tlb_remove_table-call.patch
patchset-zen/nvlpgb-v7/0003-x86-mm-consolidate-full-flush-threshold-decision.patch patchset-zen/invlpgb-v9/0003-x86-mm-consolidate-full-flush-threshold-decision.patch
patchset-zen/nvlpgb-v7/0004-x86-mm-get-INVLPGB-count-max-from-CPUID.patch patchset-zen/invlpgb-v9/0004-x86-mm-get-INVLPGB-count-max-from-CPUID.patch
patchset-zen/nvlpgb-v7/0005-x86-mm-add-INVLPGB-support-code.patch patchset-zen/invlpgb-v9/0005-x86-mm-add-INVLPGB-support-code.patch
patchset-zen/nvlpgb-v7/0006-x86-mm-use-INVLPGB-for-kernel-TLB-flushes.patch patchset-zen/invlpgb-v9/0006-x86-mm-use-INVLPGB-for-kernel-TLB-flushes.patch
patchset-zen/nvlpgb-v7/0007-x86-mm-use-INVLPGB-in-flush_tlb_all.patch patchset-zen/invlpgb-v9/0007-x86-mm-use-INVLPGB-in-flush_tlb_all.patch
patchset-zen/nvlpgb-v7/0008-x86-mm-use-broadcast-TLB-flushing-for-page-reclaim-T.patch patchset-zen/invlpgb-v9/0008-x86-mm-use-broadcast-TLB-flushing-for-page-reclaim-T.patch
patchset-zen/nvlpgb-v7/0009-x86-mm-enable-broadcast-TLB-invalidation-for-multi-t.patch patchset-zen/invlpgb-v9/0009-x86-mm-enable-broadcast-TLB-invalidation-for-multi-t.patch
patchset-zen/nvlpgb-v7/0010-x86-mm-do-targeted-broadcast-flushing-from-tlbbatch-.patch patchset-zen/invlpgb-v9/0010-x86-mm-do-targeted-broadcast-flushing-from-tlbbatch-.patch
patchset-zen/nvlpgb-v7/0011-x86-mm-enable-AMD-translation-cache-extensions.patch patchset-zen/invlpgb-v9/0011-x86-mm-enable-AMD-translation-cache-extensions.patch
patchset-zen/nvlpgb-v7/0012-x86-mm-only-invalidate-final-translations-with-INVLP.patch patchset-zen/invlpgb-v9/0012-x86-mm-only-invalidate-final-translations-with-INVLP.patch
patchset-zen/nvlpgb-v7/0013-mm-remove-unnecessary-calls-to-lru_add_drain.patch patchset-zen/invlpgb-v9/0013-mm-remove-unnecessary-calls-to-lru_add_drain.patch
patchset-zen/nvlpgb-v7/0014-vdso-Introduce-vdso-page.h.patch patchset-zen/invlpgb-v9/0014-vdso-Introduce-vdso-page.h.patch
patchset-zen/nvlpgb-v7/0015-vdso-Change-PAGE_MASK-to-signed-on-all-32-bit-archit.patch patchset-zen/invlpgb-v9/0015-vdso-Change-PAGE_MASK-to-signed-on-all-32-bit-archit.patch
patchset-zen/tlb/0001-mm-Optimize-TLB-flushes-during-page-reclaim.patch patchset-zen/tlb/0001-mm-Optimize-TLB-flushes-during-page-reclaim.patch

View File

@@ -0,0 +1,10 @@
PROGS = resolve_btfids
include $(top_rulesdir)/Makefile.inc
resolve_btfids:
$(MAKE) -C $(top_srcdir)/tools/bpf/resolve_btfids O=$(CURDIR) \
HOSTCC=$(CC) HOSTCFLAGS='$(CFLAGS) $(CPPFLAGS)' \
HOSTLD=$(CROSS_COMPILE)ld KBUILD_HOSTLDFLAGS='$(LDFLAGS)' \
HOSTAR=$(CROSS_COMPILE)ar \
V=1

5
debian/rules.real vendored
View File

@@ -279,6 +279,9 @@ binary_headers: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
cp -a $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/include $(DIR)/arch/$(KERNEL_ARCH) cp -a $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/include $(DIR)/arch/$(KERNEL_ARCH)
find $(DIR) -name '*.cmd' -delete find $(DIR) -name '*.cmd' -delete
$(CROSS_COMPILE)objcopy -j .BTF -j .BTF_ids $(SOURCE_DIR)/vmlinux $(DIR)/vmlinux
chmod 644 $(DIR)/vmlinux
f='$(SOURCE_DIR)/arch/$(KERNEL_ARCH)/lib/crtsavres.o' ; \ f='$(SOURCE_DIR)/arch/$(KERNEL_ARCH)/lib/crtsavres.o' ; \
d='$(DIR)/arch/$(KERNEL_ARCH)/lib' ; \ d='$(DIR)/arch/$(KERNEL_ARCH)/lib' ; \
if [ -f "$$f" ] ; then \ if [ -f "$$f" ] ; then \
@@ -438,6 +441,7 @@ binary_bpftool: build_bpftool
build_kbuild: $(STAMPS_DIR)/build-tools-headers build_kbuild: $(STAMPS_DIR)/build-tools-headers
$(call make-tools,certs) $(call make-tools,certs)
$(call make-tools,scripts) $(call make-tools,scripts)
$(call make-tools,tools/bpf/resolve_btfids)
$(call make-tools,tools/objtool) $(call make-tools,tools/objtool)
binary_kbuild: PREFIX_DIR = /usr/lib/$(PACKAGE_NAME) binary_kbuild: PREFIX_DIR = /usr/lib/$(PACKAGE_NAME)
@@ -445,6 +449,7 @@ binary_kbuild: build_kbuild
$(dh_binary_pre) $(dh_binary_pre)
$(call make-tools,certs) install prefix=$(PREFIX_DIR) $(call make-tools,certs) install prefix=$(PREFIX_DIR)
$(call make-tools,scripts) install prefix=$(PREFIX_DIR) $(call make-tools,scripts) install prefix=$(PREFIX_DIR)
$(call make-tools,tools/bpf/resolve_btfids) install prefix=$(PREFIX_DIR)
$(call make-tools,tools/objtool) install prefix=$(PREFIX_DIR) $(call make-tools,tools/objtool) install prefix=$(PREFIX_DIR)
dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME) dh_link $(PREFIX_DIR) /usr/src/$(PACKAGE_NAME)
$(dh_binary_post) $(dh_binary_post)

View File

@@ -0,0 +1 @@
{{package}}: statically-linked-binary [usr/src/*/vmlinux]

View File

@@ -1,6 +1,7 @@
Package: linux-bpf-dev Package: linux-bpf-dev
Meta-Rules-Target: bpf-dev Meta-Rules-Target: bpf-dev
Build-Profiles: <!pkg.linux.nokernel !pkg.linux.quick> Build-Profiles: <!pkg.linux.nokernel !pkg.linux.quick>
Multi-Arch: same
Section: devel Section: devel
Depends: ${misc:Depends} Depends: ${misc:Depends}
Description: Headers for BPF development Description: Headers for BPF development

View File

@@ -2,7 +2,7 @@ Package: krd-linux-kbuild-@abiname@
Meta-Rules-Target: kbuild Meta-Rules-Target: kbuild
Build-Profiles: <!pkg.linux.notools> Build-Profiles: <!pkg.linux.notools>
Architecture: linux-any Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}, build-essential Depends: ${shlibs:Depends}, ${misc:Depends}, build-essential, pahole
Multi-Arch: foreign Multi-Arch: foreign
Description: Kbuild infrastructure for KrD's Linux @abiname@ Description: Kbuild infrastructure for KrD's Linux @abiname@
This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@.