Skip to content

Commit

Permalink
Merge tag 'v6.5.5' into 6.5
Browse files Browse the repository at this point in the history
This is the 6.5.5 stable release
  • Loading branch information
xanmod committed Sep 23, 2023
2 parents fc2b827 + 2309983 commit e6dbf51
Show file tree
Hide file tree
Showing 279 changed files with 2,255 additions and 1,018 deletions.
2 changes: 2 additions & 0 deletions Documentation/admin-guide/cgroup-v1/memory.rst
Expand Up @@ -92,6 +92,8 @@ Brief summary of control files.
memory.oom_control set/show oom controls.
memory.numa_stat show the number of memory usage per numa
node
memory.kmem.limit_in_bytes This knob is deprecated and writing to
it will return -ENOTSUPP.
memory.kmem.usage_in_bytes show current kernel memory allocation
memory.kmem.failcnt show the number of kernel memory usage
hits limits
Expand Down
3 changes: 3 additions & 0 deletions Documentation/arch/arm64/silicon-errata.rst
Expand Up @@ -198,6 +198,9 @@ stable kernels.
+----------------+-----------------+-----------------+-----------------------------+
| Hisilicon | Hip08 SMMU PMCG | #162001800 | N/A |
+----------------+-----------------+-----------------+-----------------------------+
| Hisilicon | Hip08 SMMU PMCG | #162001900 | N/A |
| | Hip09 SMMU PMCG | | |
+----------------+-----------------+-----------------+-----------------------------+
+----------------+-----------------+-----------------+-----------------------------+
| Qualcomm Tech. | Kryo/Falkor v1 | E1003 | QCOM_FALKOR_ERRATUM_1003 |
+----------------+-----------------+-----------------+-----------------------------+
Expand Down
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 5
SUBLEVEL = 4
SUBLEVEL = 5
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
8 changes: 4 additions & 4 deletions arch/arm/kernel/hw_breakpoint.c
Expand Up @@ -626,7 +626,7 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
hw->address &= ~alignment_mask;
hw->ctrl.len <<= offset;

if (is_default_overflow_handler(bp)) {
if (uses_default_overflow_handler(bp)) {
/*
* Mismatch breakpoints are required for single-stepping
* breakpoints.
Expand Down Expand Up @@ -798,7 +798,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
* Otherwise, insert a temporary mismatch breakpoint so that
* we can single-step over the watchpoint trigger.
*/
if (!is_default_overflow_handler(wp))
if (!uses_default_overflow_handler(wp))
continue;
step:
enable_single_step(wp, instruction_pointer(regs));
Expand All @@ -811,7 +811,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
info->trigger = addr;
pr_debug("watchpoint fired: address = 0x%x\n", info->trigger);
perf_bp_event(wp, regs);
if (is_default_overflow_handler(wp))
if (uses_default_overflow_handler(wp))
enable_single_step(wp, instruction_pointer(regs));
}

Expand Down Expand Up @@ -886,7 +886,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
info->trigger = addr;
pr_debug("breakpoint fired: address = 0x%x\n", addr);
perf_bp_event(bp, regs);
if (is_default_overflow_handler(bp))
if (uses_default_overflow_handler(bp))
enable_single_step(bp, addr);
goto unlock;
}
Expand Down
14 changes: 13 additions & 1 deletion arch/arm/kernel/machine_kexec.c
Expand Up @@ -94,16 +94,28 @@ static void machine_crash_nonpanic_core(void *unused)
}
}

static DEFINE_PER_CPU(call_single_data_t, cpu_stop_csd) =
CSD_INIT(machine_crash_nonpanic_core, NULL);

void crash_smp_send_stop(void)
{
static int cpus_stopped;
unsigned long msecs;
call_single_data_t *csd;
int cpu, this_cpu = raw_smp_processor_id();

if (cpus_stopped)
return;

atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
smp_call_function(machine_crash_nonpanic_core, NULL, false);
for_each_online_cpu(cpu) {
if (cpu == this_cpu)
continue;

csd = &per_cpu(cpu_stop_csd, cpu);
smp_call_function_single_async(cpu, csd);
}

msecs = 1000; /* Wait at most a second for the other cpus to stop */
while ((atomic_read(&waiting_for_crash_ipi) > 0) && msecs) {
mdelay(1);
Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
Expand Up @@ -12,6 +12,7 @@
#include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>

#include "sc8280xp.dtsi"
Expand Down Expand Up @@ -78,6 +79,21 @@
};
};

leds {
compatible = "gpio-leds";

led-camera-indicator {
label = "white:camera-indicator";
function = LED_FUNCTION_INDICATOR;
color = <LED_COLOR_ID_WHITE>;
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "none";
default-state = "off";
/* Reuse as a panic indicator until we get a "camera on" trigger */
panic-indicator;
};
};

pmic-glink {
compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";

Expand Down
Expand Up @@ -79,7 +79,7 @@
reg = <0x0 0xffc40000 0x0 0xc0000>;
record-size = <0x1000>;
console-size = <0x40000>;
msg-size = <0x20000 0x20000>;
pmsg-size = <0x20000>;
};

cmdline_mem: memory@ffd00000 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/sm6125-xiaomi-laurel-sprout.dts
Expand Up @@ -52,7 +52,7 @@
reg = <0x0 0xffc40000 0x0 0xc0000>;
record-size = <0x1000>;
console-size = <0x40000>;
msg-size = <0x20000 0x20000>;
pmsg-size = <0x20000>;
};

cmdline_mem: memory@ffd00000 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/sm6350.dtsi
Expand Up @@ -673,7 +673,7 @@
reg = <0 0xffc00000 0 0x100000>;
record-size = <0x1000>;
console-size = <0x40000>;
msg-size = <0x20000 0x20000>;
pmsg-size = <0x20000>;
ecc-size = <16>;
no-map;
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/sm8150-sony-xperia-kumano.dtsi
Expand Up @@ -222,7 +222,7 @@
reg = <0x0 0xffc00000 0x0 0x100000>;
record-size = <0x1000>;
console-size = <0x40000>;
msg-size = <0x20000 0x20000>;
pmsg-size = <0x20000>;
ecc-size = <16>;
no-map;
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
Expand Up @@ -126,7 +126,7 @@
reg = <0x0 0xffc00000 0x0 0x100000>;
record-size = <0x1000>;
console-size = <0x40000>;
msg-size = <0x20000 0x20000>;
pmsg-size = <0x20000>;
ecc-size = <16>;
no-map;
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/kernel/hw_breakpoint.c
Expand Up @@ -654,7 +654,7 @@ static int breakpoint_handler(unsigned long unused, unsigned long esr,
perf_bp_event(bp, regs);

/* Do we need to handle the stepping? */
if (is_default_overflow_handler(bp))
if (uses_default_overflow_handler(bp))
step = 1;
unlock:
rcu_read_unlock();
Expand Down Expand Up @@ -733,7 +733,7 @@ static u64 get_distance_from_watchpoint(unsigned long addr, u64 val,
static int watchpoint_report(struct perf_event *wp, unsigned long addr,
struct pt_regs *regs)
{
int step = is_default_overflow_handler(wp);
int step = uses_default_overflow_handler(wp);
struct arch_hw_breakpoint *info = counter_arch_bp(wp);

info->trigger = addr;
Expand Down
8 changes: 6 additions & 2 deletions arch/mips/cavium-octeon/octeon-usb.c
Expand Up @@ -243,11 +243,11 @@ static int dwc3_octeon_get_divider(void)
while (div < ARRAY_SIZE(clk_div)) {
uint64_t rate = octeon_get_io_clock_rate() / clk_div[div];
if (rate <= 300000000 && rate >= 150000000)
break;
return div;
div++;
}

return div;
return -EINVAL;
}

static int dwc3_octeon_config_power(struct device *dev, void __iomem *base)
Expand Down Expand Up @@ -374,6 +374,10 @@ static int dwc3_octeon_clocks_start(struct device *dev, void __iomem *base)

/* Step 4b: Select controller clock frequency. */
div = dwc3_octeon_get_divider();
if (div < 0) {
dev_err(dev, "clock divider invalid\n");
return div;
}
val = dwc3_octeon_readq(uctl_ctl_reg);
val &= ~USBDRD_UCTL_CTL_H_CLKDIV_SEL;
val |= FIELD_PREP(USBDRD_UCTL_CTL_H_CLKDIV_SEL, div);
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/ibmebus.c
Expand Up @@ -460,6 +460,7 @@ static int __init ibmebus_bus_init(void)
if (err) {
printk(KERN_WARNING "%s: device_register returned %i\n",
__func__, err);
put_device(&ibmebus_bus_device);
bus_unregister(&ibmebus_bus_type);

return err;
Expand Down
8 changes: 7 additions & 1 deletion arch/riscv/kernel/elf_kexec.c
Expand Up @@ -98,7 +98,13 @@ static int elf_find_pbase(struct kimage *image, unsigned long kernel_len,
kbuf.image = image;
kbuf.buf_min = lowest_paddr;
kbuf.buf_max = ULONG_MAX;
kbuf.buf_align = PAGE_SIZE;

/*
* Current riscv boot protocol requires 2MB alignment for
* RV64 and 4MB alignment for RV32
*
*/
kbuf.buf_align = PMD_SIZE;
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
kbuf.memsz = ALIGN(kernel_len, PAGE_SIZE);
kbuf.top_down = false;
Expand Down
9 changes: 4 additions & 5 deletions arch/s390/boot/startup.c
Expand Up @@ -176,18 +176,17 @@ static unsigned long setup_kernel_memory_layout(void)
unsigned long asce_limit;
unsigned long rte_size;
unsigned long pages;
unsigned long vsize;
unsigned long vmax;

pages = ident_map_size / PAGE_SIZE;
/* vmemmap contains a multiple of PAGES_PER_SECTION struct pages */
vmemmap_size = SECTION_ALIGN_UP(pages) * sizeof(struct page);

/* choose kernel address space layout: 4 or 3 levels. */
vmemmap_start = round_up(ident_map_size, _REGION3_SIZE);
if (IS_ENABLED(CONFIG_KASAN) ||
vmalloc_size > _REGION2_SIZE ||
vmemmap_start + vmemmap_size + vmalloc_size + MODULES_LEN >
_REGION2_SIZE) {
vsize = round_up(ident_map_size, _REGION3_SIZE) + vmemmap_size + MODULES_LEN;
vsize = size_add(vsize, vmalloc_size);
if (IS_ENABLED(CONFIG_KASAN) || (vsize > _REGION2_SIZE)) {
asce_limit = _REGION1_SIZE;
rte_size = _REGION2_SIZE;
} else {
Expand Down
8 changes: 8 additions & 0 deletions arch/x86/boot/compressed/ident_map_64.c
Expand Up @@ -59,6 +59,14 @@ static void *alloc_pgt_page(void *context)
return NULL;
}

/* Consumed more tables than expected? */
if (pages->pgt_buf_offset == BOOT_PGT_SIZE_WARN) {
debug_putstr("pgt_buf running low in " __FILE__ "\n");
debug_putstr("Need to raise BOOT_PGT_SIZE?\n");
debug_putaddr(pages->pgt_buf_offset);
debug_putaddr(pages->pgt_buf_size);
}

entry = pages->pgt_buf + pages->pgt_buf_offset;
pages->pgt_buf_offset += PAGE_SIZE;

Expand Down
45 changes: 31 additions & 14 deletions arch/x86/include/asm/boot.h
Expand Up @@ -40,23 +40,40 @@
#ifdef CONFIG_X86_64
# define BOOT_STACK_SIZE 0x4000

/*
* Used by decompressor's startup_32() to allocate page tables for identity
* mapping of the 4G of RAM in 4-level paging mode:
* - 1 level4 table;
* - 1 level3 table;
* - 4 level2 table that maps everything with 2M pages;
*
* The additional level5 table needed for 5-level paging is allocated from
* trampoline_32bit memory.
*/
# define BOOT_INIT_PGT_SIZE (6*4096)
# ifdef CONFIG_RANDOMIZE_BASE

/*
* Assuming all cross the 512GB boundary:
* 1 page for level4
* (2+2)*4 pages for kernel, param, cmd_line, and randomized kernel
* 2 pages for first 2M (video RAM: CONFIG_X86_VERBOSE_BOOTUP).
* Total is 19 pages.
* Total number of page tables kernel_add_identity_map() can allocate,
* including page tables consumed by startup_32().
*
* Worst-case scenario:
* - 5-level paging needs 1 level5 table;
* - KASLR needs to map kernel, boot_params, cmdline and randomized kernel,
* assuming all of them cross 256T boundary:
* + 4*2 level4 table;
* + 4*2 level3 table;
* + 4*2 level2 table;
* - X86_VERBOSE_BOOTUP needs to map the first 2M (video RAM):
* + 1 level4 table;
* + 1 level3 table;
* + 1 level2 table;
* Total: 28 tables
*
* Add 4 spare table in case decompressor touches anything beyond what is
* accounted above. Warn if it happens.
*/
# ifdef CONFIG_X86_VERBOSE_BOOTUP
# define BOOT_PGT_SIZE (19*4096)
# else /* !CONFIG_X86_VERBOSE_BOOTUP */
# define BOOT_PGT_SIZE (17*4096)
# endif
# else /* !CONFIG_RANDOMIZE_BASE */
# define BOOT_PGT_SIZE BOOT_INIT_PGT_SIZE
# endif
# define BOOT_PGT_SIZE_WARN (28*4096)
# define BOOT_PGT_SIZE (32*4096)

#else /* !CONFIG_X86_64 */
# define BOOT_STACK_SIZE 0x1000
Expand Down
8 changes: 8 additions & 0 deletions arch/x86/include/asm/linkage.h
Expand Up @@ -8,6 +8,14 @@
#undef notrace
#define notrace __attribute__((no_instrument_function))

#ifdef CONFIG_64BIT
/*
* The generic version tends to create spurious ENDBR instructions under
* certain conditions.
*/
#define _THIS_IP_ ({ unsigned long __here; asm ("lea 0(%%rip), %0" : "=r" (__here)); __here; })
#endif

#ifdef CONFIG_X86_32
#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
#endif /* CONFIG_X86_32 */
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/asm/uaccess_64.h
Expand Up @@ -116,7 +116,7 @@ copy_user_generic(void *to, const void *from, unsigned long len)
"2:\n"
_ASM_EXTABLE_UA(1b, 2b)
:"+c" (len), "+D" (to), "+S" (from), ASM_CALL_CONSTRAINT
: : "memory", "rax", "r8", "r9", "r10", "r11");
: : "memory", "rax");
clac();
return len;
}
Expand Down
9 changes: 2 additions & 7 deletions arch/x86/kernel/alternative.c
Expand Up @@ -720,13 +720,8 @@ void __init_or_module noinline apply_returns(s32 *start, s32 *end)
{
s32 *s;

/*
* Do not patch out the default return thunks if those needed are the
* ones generated by the compiler.
*/
if (cpu_feature_enabled(X86_FEATURE_RETHUNK) &&
(x86_return_thunk == __x86_return_thunk))
return;
if (cpu_feature_enabled(X86_FEATURE_RETHUNK))
static_call_force_reinit();

for (s = start; s < end; s++) {
void *dest = NULL, *addr = (void *)s + *s;
Expand Down

0 comments on commit e6dbf51

Please sign in to comment.