Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
27ff12b
cpufreq: intel_pstate: Update Balance performance EPP for Emerald Rapids
PlaidCat Apr 8, 2025
706e6dc
x86/pci: Skip early E820 check for ECAM region
PlaidCat Apr 8, 2025
d5d9e49
vsock/virtio: Initialization of the dangling pointer occurring in vsk…
PlaidCat Apr 8, 2025
eb503e1
ACPI: extlog: fix NULL pointer dereference check
PlaidCat Apr 8, 2025
c1d2242
arp: Move ATF_COM setting in arp_req_set().
PlaidCat Apr 8, 2025
00341ff
arp: Validate netmask earlier for SIOCDARP and SIOCSARP in arp_ioctl().
PlaidCat Apr 8, 2025
56153ed
arp: Factorise ip_route_output() call in arp_req_set() and arp_req_de…
PlaidCat Apr 8, 2025
a6fd9b5
arp: Remove a nest in arp_req_get().
PlaidCat Apr 8, 2025
500dfaa
arp: Get dev after calling arp_req_(delete|set|get)().
PlaidCat Apr 8, 2025
ca306b8
net: Remove unused declaration dev_restart()
PlaidCat Apr 8, 2025
8052ef6
net: Protect dev->name by seqlock.
PlaidCat Apr 8, 2025
170d781
arp: Convert ioctl(SIOCGARP) to RCU.
PlaidCat Apr 8, 2025
16c4031
net: add softirq safety to netdev_rename_lock
PlaidCat Apr 8, 2025
055cf35
dev: Acquire netdev_rename_lock before restoring dev->name in dev_cha…
PlaidCat Apr 8, 2025
84b1fba
hugetlb: prioritize surplus allocation from current node
PlaidCat Apr 8, 2025
422308f
smb: client: fix chmod(2) regression with ATTR_READONLY
PlaidCat Apr 8, 2025
47bdbbf
can: bcm: Fix UAF in bcm_proc_show()
PlaidCat Apr 8, 2025
4ff9ea3
mm: fix NULL pointer dereference in alloc_pages_bulk_noprof
PlaidCat Apr 8, 2025
c16e0cd
x86/kexec: Add EFI config table identity mapping for kexec kernel
PlaidCat Apr 8, 2025
e554624
ALSA: usb-audio: Add sampling rates support for Mbox3
PlaidCat Apr 8, 2025
94fcfcb
ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and M…
PlaidCat Apr 8, 2025
2e99e0a
ALSA: usb-audio: Fix for sampling rates support for Mbox3
PlaidCat Apr 8, 2025
a769dd9
ALSA: usb-audio: Fix a DMA to stack memory bug
PlaidCat Apr 8, 2025
0c21042
x86/kaslr: Expose and use the end of the physical memory address space
PlaidCat Apr 8, 2025
d29f2e0
HID: core: zero-initialize the report buffer
PlaidCat Apr 8, 2025
f69f8dd
Rebuild rocky9_5 with kernel-5.14.0-503.31.1.el9_5
PlaidCat Apr 8, 2025
ab5b224
SUNRPC: Fix a hang in TLS sock_close if sk_write_pending
PlaidCat Apr 8, 2025
ec28b3b
tls: Fix tls_sw_sendmsg error handling
PlaidCat Apr 8, 2025
7676a8e
SUNRPC: timeout and cancel TLS handshake with -ETIMEDOUT
PlaidCat Apr 8, 2025
84b8b02
SUNRPC: Handle -ETIMEDOUT return from tlshd
PlaidCat Apr 8, 2025
d3d5d33
x86/mm/ident_map: Use gbpages only where full GB page should be mapped.
PlaidCat Apr 8, 2025
6cd2059
scsi: st: Don't modify unknown block number in MTIOCGET
PlaidCat Apr 8, 2025
602279b
scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset
PlaidCat Apr 8, 2025
5cd9c18
scsi: st: New session only when Unit Attention for new tape
PlaidCat Apr 8, 2025
1ddd401
Rebuild rocky9_5 with kernel-5.14.0-503.33.1.el9_5
PlaidCat Apr 8, 2025
9451892
arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array
PlaidCat Apr 8, 2025
e74ec18
Rebuild rocky9_5 with kernel-5.14.0-503.34.1.el9_5
PlaidCat Apr 8, 2025
535735f
intel_idle: fix ACPI _CST matching for newer Xeon platforms
PlaidCat Apr 8, 2025
3387fc2
ibmvnic: Return error code on TX scrq flush fail
PlaidCat Apr 8, 2025
7cb7b98
ibmvnic: Only replenish rx pool when resources are getting low
PlaidCat Apr 8, 2025
c20faec
ibmvnic: Only record tx completed bytes once per handler
PlaidCat Apr 8, 2025
67a71d3
md: fix deadlock between mddev_suspend and flush bio
PlaidCat Apr 8, 2025
0f39f6f
block: Fix lockdep warning in blk_mq_mark_tag_wait
PlaidCat Apr 8, 2025
f99c735
cppc_cpufreq: Use desired perf if feedback ctrs are 0 or unchanged
PlaidCat Apr 8, 2025
c9a2447
Rebuild rocky9_5 with kernel-5.14.0-503.35.1.el9_5
PlaidCat Apr 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion Makefile.rhelver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RHEL_MINOR = 5
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 503.29.1
RHEL_RELEASE = 503.35.1

#
# ZSTREAM
Expand Down
12 changes: 7 additions & 5 deletions arch/arm64/kernel/cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,18 @@ int populate_cache_leaves(unsigned int cpu)
unsigned int level, idx;
enum cache_type type;
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
struct cacheinfo *this_leaf = this_cpu_ci->info_list;
struct cacheinfo *infos = this_cpu_ci->info_list;

for (idx = 0, level = 1; level <= this_cpu_ci->num_levels &&
idx < this_cpu_ci->num_leaves; idx++, level++) {
idx < this_cpu_ci->num_leaves; level++) {
type = get_cache_type(level);
if (type == CACHE_TYPE_SEPARATE) {
ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level);
ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level);
if (idx + 1 >= this_cpu_ci->num_leaves)
break;
ci_leaf_init(&infos[idx++], CACHE_TYPE_DATA, level);
ci_leaf_init(&infos[idx++], CACHE_TYPE_INST, level);
} else {
ci_leaf_init(this_leaf++, type, level);
ci_leaf_init(&infos[idx++], type, level);
}
}
return 0;
Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/page_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ extern unsigned long phys_base;
extern unsigned long page_offset_base;
extern unsigned long vmalloc_base;
extern unsigned long vmemmap_base;
extern unsigned long physmem_end;

static __always_inline unsigned long __phys_addr_nodebug(unsigned long x)
{
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/include/asm/pgtable_64_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ extern unsigned int ptrs_per_p4d;
# define VMEMMAP_START __VMEMMAP_BASE_L4
#endif /* CONFIG_DYNAMIC_MEMORY_LAYOUT */

#ifdef CONFIG_RANDOMIZE_MEMORY
# define PHYSMEM_END physmem_end
#endif

/*
* End of the region for which vmalloc page tables are pre-allocated.
* For non-KMSAN builds, this is the same as VMALLOC_END.
Expand Down
27 changes: 27 additions & 0 deletions arch/x86/kernel/machine_kexec_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/setup.h>
#include <asm/set_memory.h>
#include <asm/cpu.h>
#include <asm/efi.h>

#ifdef CONFIG_ACPI
/*
Expand Down Expand Up @@ -90,6 +91,8 @@ map_efi_systab(struct x86_mapping_info *info, pgd_t *level4p)
{
#ifdef CONFIG_EFI
unsigned long mstart, mend;
void *kaddr;
int ret;

if (!efi_enabled(EFI_BOOT))
return 0;
Expand All @@ -105,6 +108,30 @@ map_efi_systab(struct x86_mapping_info *info, pgd_t *level4p)
if (!mstart)
return 0;

ret = kernel_ident_mapping_init(info, level4p, mstart, mend);
if (ret)
return ret;

kaddr = memremap(mstart, mend - mstart, MEMREMAP_WB);
if (!kaddr) {
pr_err("Could not map UEFI system table\n");
return -ENOMEM;
}

mstart = efi_config_table;

if (efi_enabled(EFI_64BIT)) {
efi_system_table_64_t *stbl = (efi_system_table_64_t *)kaddr;

mend = mstart + sizeof(efi_config_table_64_t) * stbl->nr_tables;
} else {
efi_system_table_32_t *stbl = (efi_system_table_32_t *)kaddr;

mend = mstart + sizeof(efi_config_table_32_t) * stbl->nr_tables;
}

memunmap(kaddr);

return kernel_ident_mapping_init(info, level4p, mstart, mend);
#endif
return 0;
Expand Down
23 changes: 18 additions & 5 deletions arch/x86/mm/ident_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,31 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
for (; addr < end; addr = next) {
pud_t *pud = pud_page + pud_index(addr);
pmd_t *pmd;
bool use_gbpage;

next = (addr & PUD_MASK) + PUD_SIZE;
if (next > end)
next = end;

if (info->direct_gbpages) {
pud_t pudval;
/* if this is already a gbpage, this portion is already mapped */
if (pud_leaf(*pud))
continue;

/* Is using a gbpage allowed? */
use_gbpage = info->direct_gbpages;

if (pud_present(*pud))
continue;
/* Don't use gbpage if it maps more than the requested region. */
/* at the begining: */
use_gbpage &= ((addr & ~PUD_MASK) == 0);
/* ... or at the end: */
use_gbpage &= ((next & ~PUD_MASK) == 0);

/* Never overwrite existing mappings */
use_gbpage &= !pud_present(*pud);

if (use_gbpage) {
pud_t pudval;

addr &= PUD_MASK;
pudval = __pud((addr - info->offset) | info->page_flag);
set_pud(pud, pudval);
continue;
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,12 @@ static void update_end_of_memory_vars(u64 start, u64 size)
int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
struct mhp_params *params)
{
unsigned long end = ((start_pfn + nr_pages) << PAGE_SHIFT) - 1;
int ret;

if (WARN_ON_ONCE(end > PHYSMEM_END))
return -ERANGE;

ret = __add_pages(nid, start_pfn, nr_pages, params);
WARN_ON_ONCE(ret);

Expand Down
32 changes: 26 additions & 6 deletions arch/x86/mm/kaslr.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,24 @@ static const unsigned long vaddr_end = CPU_ENTRY_AREA_BASE;
*/
static __initdata struct kaslr_memory_region {
unsigned long *base;
unsigned long *end;
unsigned long size_tb;
} kaslr_regions[] = {
{ &page_offset_base, 0 },
{ &vmalloc_base, 0 },
{ &vmemmap_base, 0 },
{
.base = &page_offset_base,
.end = &physmem_end,
},
{
.base = &vmalloc_base,
},
{
.base = &vmemmap_base,
},
};

/* The end of the possible address space for physical memory */
unsigned long physmem_end __ro_after_init;

/* Get size in bytes used by the memory region */
static inline unsigned long get_padding(struct kaslr_memory_region *region)
{
Expand Down Expand Up @@ -82,6 +93,8 @@ void __init kernel_randomize_memory(void)
BUILD_BUG_ON(vaddr_end != CPU_ENTRY_AREA_BASE);
BUILD_BUG_ON(vaddr_end > __START_KERNEL_map);

/* Preset the end of the possible address space for physical memory */
physmem_end = ((1ULL << MAX_PHYSMEM_BITS) - 1);
if (!kaslr_memory_enabled())
return;

Expand Down Expand Up @@ -128,11 +141,18 @@ void __init kernel_randomize_memory(void)
vaddr += entropy;
*kaslr_regions[i].base = vaddr;

/* Calculate the end of the region */
vaddr += get_padding(&kaslr_regions[i]);
/*
* Jump the region and add a minimum padding based on
* randomization alignment.
* KASLR trims the maximum possible size of the
* direct-map. Update the physmem_end boundary.
* No rounding required as the region starts
* PUD aligned and size is in units of TB.
*/
vaddr += get_padding(&kaslr_regions[i]);
if (kaslr_regions[i].end)
*kaslr_regions[i].end = __pa_nodebug(vaddr - 1);

/* Add a minimum padding based on randomization alignment. */
vaddr = round_up(vaddr + 1, PUD_SIZE);
remain_entropy -= entropy;
}
Expand Down
40 changes: 29 additions & 11 deletions arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,34 @@ static bool __ref pci_mmcfg_reserved(struct device *dev,
{
struct resource *conflict;

if (!early && !acpi_disabled) {
if (early) {

/*
* Don't try to do this check unless configuration type 1
* is available. How about type 2?
*/

/*
* 946f2ee5c731 ("Check that MCFG points to an e820
* reserved area") added this E820 check in 2006 to work
* around BIOS defects.
*
* Per PCI Firmware r3.3, sec 4.1.2, ECAM space must be
* reserved by a PNP0C02 resource, but it need not be
* mentioned in E820. Before the ACPI interpreter is
* available, we can't check for PNP0C02 resources, so
* there's no reliable way to verify the region in this
* early check. Keep it only for the old machines that
* motivated 946f2ee5c731.
*/
if (dmi_get_bios_year() < 2016 && raw_pci_ops)
return is_mmconf_reserved(e820__mapped_all, cfg, dev,
"E820 entry");

return true;
}

if (!acpi_disabled) {
if (is_mmconf_reserved(is_acpi_reserved, cfg, dev,
"ACPI motherboard resource"))
return true;
Expand Down Expand Up @@ -551,16 +578,7 @@ static bool __ref pci_mmcfg_reserved(struct device *dev,
* For MCFG information constructed from hotpluggable host bridge's
* _CBA method, just assume it's reserved.
*/
if (pci_mmcfg_running_state)
return true;

/* Don't try to do this check unless configuration
type 1 is available. how about type 2 ?*/
if (raw_pci_ops)
return is_mmconf_reserved(e820__mapped_all, cfg, dev,
"E820 entry");

return false;
return pci_mmcfg_running_state;
}

static void __init pci_mmcfg_reject_broken(int early)
Expand Down
5 changes: 3 additions & 2 deletions block/blk-mq-tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static void blk_mq_update_wake_batch(struct blk_mq_tags *tags,
void __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx)
{
unsigned int users;
unsigned long flags;
struct blk_mq_tags *tags = hctx->tags;

/*
Expand All @@ -56,11 +57,11 @@ void __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx)
return;
}

spin_lock_irq(&tags->lock);
spin_lock_irqsave(&tags->lock, flags);
users = tags->active_queues + 1;
WRITE_ONCE(tags->active_queues, users);
blk_mq_update_wake_batch(tags, users);
spin_unlock_irq(&tags->lock);
spin_unlock_irqrestore(&tags->lock, flags);
}

/*
Expand Down
86 changes: 86 additions & 0 deletions ciq/ciq_backports/kernel-5.14.0-503.31.1.el9_5/0840556e.failed
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
net: Protect dev->name by seqlock.

jira LE-2742
Rebuild_History Non-Buildable kernel-5.14.0-503.31.1.el9_5
commit-author Kuniyuki Iwashima <kuniyu@amazon.com>
commit 0840556e5a3a331b6932ef17dd4bc94445df3297
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-503.31.1.el9_5/0840556e.failed

We will convert ioctl(SIOCGARP) to RCU, and then we need to copy
dev->name which is currently protected by rtnl_lock().

This patch does the following:

1) Add seqlock netdev_rename_lock to protect dev->name

2) Add netdev_copy_name() that copies dev->name to buffer
under netdev_rename_lock

3) Use netdev_copy_name() in netdev_get_name() and drop
devnet_rename_sem

Suggested-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/netdev/CANn89iJEWs7AYSJqGCUABeVqOCTkErponfZdT5kV-iD=-SajnQ@mail.gmail.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20240430015813.71143-7-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 0840556e5a3a331b6932ef17dd4bc94445df3297)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>

# Conflicts:
# net/core/dev.c
diff --cc net/core/dev.c
index a4af81272b39,e02d2363347e..000000000000
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@@ -1241,9 -1270,11 +1254,11 @@@ rollback
if (err >= 0) {
err = ret;
down_write(&devnet_rename_sem);
+ write_seqlock(&netdev_rename_lock);
memcpy(dev->name, oldname, IFNAMSIZ);
+ write_sequnlock(&netdev_rename_lock);
memcpy(oldname, newname, IFNAMSIZ);
- WRITE_ONCE(dev->name_assign_type, old_assign_type);
+ dev->name_assign_type = old_assign_type;
old_assign_type = NET_NAME_RENAMED;
goto rollback;
} else {
@@@ -11075,6 -11418,19 +11090,22 @@@ int __dev_change_net_namespace(struct n
dev_net_set(dev, net);
dev->ifindex = new_ifindex;

++<<<<<<< HEAD
++=======
+ if (new_name[0]) {
+ /* Rename the netdev to prepared name */
+ write_seqlock(&netdev_rename_lock);
+ strscpy(dev->name, new_name, IFNAMSIZ);
+ write_sequnlock(&netdev_rename_lock);
+ }
+
+ /* Fixup kobjects */
+ dev_set_uevent_suppress(&dev->dev, 1);
+ err = device_rename(&dev->dev, dev->name);
+ dev_set_uevent_suppress(&dev->dev, 0);
+ WARN_ON(err);
+
++>>>>>>> 0840556e5a3a (net: Protect dev->name by seqlock.)
/* Send a netdev-add uevent to the new namespace */
kobject_uevent(&dev->dev.kobj, KOBJ_ADD);
netdev_adjacent_add_links(dev);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 46c83f63545d..de505c2ad012 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3192,6 +3192,7 @@ struct net_device *netdev_get_by_name(struct net *net, const char *name,
netdevice_tracker *tracker, gfp_t gfp);
struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
struct net_device *dev_get_by_napi_id(unsigned int napi_id);
+void netdev_copy_name(struct net_device *dev, char *name);

static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type,
* Unmerged path net/core/dev.c
Loading