Skip to content

Commit

Permalink
Merge tag 'v6.1.94' into 6.1-main
Browse files Browse the repository at this point in the history
This is the 6.1.94 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIyBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmZuz8EACgkQONu9yGCS
# aT4YXw/4jfUDI5QTQiD7h176b8YZQlDG0XqFl2YcfZfk3QlP8kvBOxFreUCORI8P
# lzsI0azmlNPbkIQt/B4PZ2g+TWOdty/qsNWX5rWKe1H4/S6rBqgC7J4ppTDn+rGw
# MeUiFCSqBz0Twku+EOxGWqVS4gs9+OPll2fqCGSzN8+6Ku4uhmrKvz0sNHgej5ct
# B8KqvznVN8sitBquVwoTcW2fUWAt/98Dhh/+0E0Q28P2KhVyqrt5TwkI1rsNXVA3
# ZYHONT4k4ItPMGMw2gyeEo9avlyjIdd4BQ696ePrqFaGWHTUIEbw/ZLw/cb8AbWn
# YVv3PcgAZoX10vHZmwqBEklt8cM6B3L55o5gHoO1bSKKqmJQO/a4WTdzgGNFdOLe
# hvN+chrt6y3R7naT8Q5xdt5DVa59f+drw4AX2vnK3Siv3u1J7k4Iq6WT8Ij/FSUH
# cL5UtQ9/iWPeEg1221WidoCttFySwFfUixg+Fc8sX71PFkraAOvJmV/Eiqo79d3t
# VbCY1MWoTkieeu2AGffA3IXWEL6yTdVTw2zfPkd5kKv584yCwlvsV4GhV16ygqJK
# e08I3vjiCO9hLjpplrYkFFxE97gqq2IQuwZbxgOhdKfpo+tTTZrS7p00AZRPIpvL
# RQK5ogSTkNQr15pjDY1SdqXpOntZxp5RFaPXwLJ28qUByZsUGw==
# =nofp
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun Jun 16 13:42:57 2024 CEST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Jun 29, 2024
2 parents 7973ea8 + eb44d83 commit 8ae242c
Show file tree
Hide file tree
Showing 103 changed files with 1,025 additions and 689 deletions.
6 changes: 4 additions & 2 deletions Documentation/mm/arch_pgtable_helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ PMD Page Table Helpers
+---------------------------+--------------------------------------------------+
| pmd_swp_clear_soft_dirty | Clears a soft dirty swapped PMD |
+---------------------------+--------------------------------------------------+
| pmd_mkinvalid | Invalidates a mapped PMD [1] |
| pmd_mkinvalid | Invalidates a present PMD; do not call for |
| | non-present PMD [1] |
+---------------------------+--------------------------------------------------+
| pmd_set_huge | Creates a PMD huge mapping |
+---------------------------+--------------------------------------------------+
Expand Down Expand Up @@ -192,7 +193,8 @@ PUD Page Table Helpers
+---------------------------+--------------------------------------------------+
| pud_mkdevmap | Creates a ZONE_DEVICE mapped PUD |
+---------------------------+--------------------------------------------------+
| pud_mkinvalid | Invalidates a mapped PUD [1] |
| pud_mkinvalid | Invalidates a present PUD; do not call for |
| | non-present PUD [1] |
+---------------------------+--------------------------------------------------+
| pud_set_huge | Creates a PUD huge mapping |
+---------------------------+--------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 1
SUBLEVEL = 93
SUBLEVEL = 94
EXTRAVERSION =
NAME = Curry Ramen

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
gic: interrupt-controller@f1001000 {
compatible = "arm,gic-400";
reg = <0x0 0xf1001000 0x0 0x1000>, /* GICD */
<0x0 0xf1002000 0x0 0x100>; /* GICC */
<0x0 0xf1002000 0x0 0x2000>; /* GICC */
#address-cells = <0>;
#interrupt-cells = <3>;
interrupt-controller;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
compatible = "nvidia,norrin", "nvidia,tegra132", "nvidia,tegra124";

aliases {
rtc0 = "/i2c@7000d000/as3722@40";
rtc1 = "/rtc@7000e000";
rtc0 = &as3722;
rtc1 = &tegra_rtc;
serial0 = &uarta;
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/nvidia/tegra132.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@
status = "disabled";
};

rtc@7000e000 {
tegra_rtc: rtc@7000e000 {
compatible = "nvidia,tegra124-rtc", "nvidia,tegra20-rtc";
reg = <0x0 0x7000e000 0x0 0x100>;
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/qcs404-evb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
vddrf-supply = <&vreg_l1_1p3>;
vddch0-supply = <&vdd_ch0_3p3>;

local-bd-address = [ 02 00 00 00 5a ad ];
local-bd-address = [ 00 00 00 00 00 00 ];

max-speed = <3200000>;
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/kvm/guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
case PSR_AA32_MODE_SVC:
case PSR_AA32_MODE_ABT:
case PSR_AA32_MODE_UND:
case PSR_AA32_MODE_SYS:
if (!vcpu_el1_is_32bit(vcpu))
return -EINVAL;
break;
Expand All @@ -270,7 +271,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
if (*vcpu_cpsr(vcpu) & PSR_MODE32_BIT) {
int i, nr_reg;

switch (*vcpu_cpsr(vcpu)) {
switch (*vcpu_cpsr(vcpu) & PSR_AA32_MODE_MASK) {
/*
* Either we are dealing with user mode, and only the
* first 15 registers (+ PC) must be narrowed to 32bit.
Expand Down
18 changes: 16 additions & 2 deletions arch/arm64/kvm/hyp/aarch32.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,23 @@ bool kvm_condition_valid32(const struct kvm_vcpu *vcpu)
u32 cpsr_cond;
int cond;

/* Top two bits non-zero? Unconditional. */
if (kvm_vcpu_get_esr(vcpu) >> 30)
/*
* These are the exception classes that could fire with a
* conditional instruction.
*/
switch (kvm_vcpu_trap_get_class(vcpu)) {
case ESR_ELx_EC_CP15_32:
case ESR_ELx_EC_CP15_64:
case ESR_ELx_EC_CP14_MR:
case ESR_ELx_EC_CP14_LS:
case ESR_ELx_EC_FP_ASIMD:
case ESR_ELx_EC_CP10_ID:
case ESR_ELx_EC_CP14_64:
case ESR_ELx_EC_SVC32:
break;
default:
return true;
}

/* Is condition field valid? */
cond = kvm_vcpu_get_condition(vcpu);
Expand Down
1 change: 1 addition & 0 deletions arch/parisc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))

#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA

#ifndef __ASSEMBLY__

Expand Down
12 changes: 0 additions & 12 deletions arch/parisc/include/asm/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,11 @@

#include <uapi/asm/signal.h>

#define _NSIG 64
/* bits-per-word, where word apparently means 'long' not 'int' */
#define _NSIG_BPW BITS_PER_LONG
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)

# ifndef __ASSEMBLY__

/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */

typedef unsigned long old_sigset_t; /* at least 32 bits */

typedef struct {
/* next_signal() assumes this is a long - no choice */
unsigned long sig[_NSIG_WORDS];
} sigset_t;

#include <asm/sigcontext.h>

#endif /* !__ASSEMBLY */
Expand Down
10 changes: 10 additions & 0 deletions arch/parisc/include/uapi/asm/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,20 @@

#include <asm-generic/signal-defs.h>

#define _NSIG 64
#define _NSIG_BPW (sizeof(unsigned long) * 8)
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)

# ifndef __ASSEMBLY__

# include <linux/types.h>

typedef unsigned long old_sigset_t; /* at least 32 bits */

typedef struct {
unsigned long sig[_NSIG_WORDS];
} sigset_t;

/* Avoid too many header ordering problems. */
struct siginfo;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/mm/book3s64/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ pmd_t pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
{
unsigned long old_pmd;

VM_WARN_ON_ONCE(!pmd_present(*pmdp));
old_pmd = pmd_hugepage_update(vma->vm_mm, address, pmdp, _PAGE_PRESENT, _PAGE_INVALID);
flush_pmd_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
return __pmd(old_pmd);
Expand Down
12 changes: 12 additions & 0 deletions arch/powerpc/net/bpf_jit_comp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,15 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context *

/* Get offset into TMP_REG */
EMIT(PPC_RAW_LI(tmp_reg, off));
/*
* Enforce full ordering for operations with BPF_FETCH by emitting a 'sync'
* before and after the operation.
*
* This is a requirement in the Linux Kernel Memory Model.
* See __cmpxchg_u32() in asm/cmpxchg.h as an example.
*/
if ((imm & BPF_FETCH) && IS_ENABLED(CONFIG_SMP))
EMIT(PPC_RAW_SYNC());
tmp_idx = ctx->idx * 4;
/* load value from memory into r0 */
EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0));
Expand Down Expand Up @@ -867,6 +876,9 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context *

/* For the BPF_FETCH variant, get old data into src_reg */
if (imm & BPF_FETCH) {
/* Emit 'sync' to enforce full ordering */
if (IS_ENABLED(CONFIG_SMP))
EMIT(PPC_RAW_SYNC());
EMIT(PPC_RAW_MR(ret_reg, ax_reg));
if (!fp->aux->verifier_zext)
EMIT(PPC_RAW_LI(ret_reg - 1, 0)); /* higher 32-bit */
Expand Down
12 changes: 12 additions & 0 deletions arch/powerpc/net/bpf_jit_comp64.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,15 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context *

/* Get offset into TMP_REG_1 */
EMIT(PPC_RAW_LI(tmp1_reg, off));
/*
* Enforce full ordering for operations with BPF_FETCH by emitting a 'sync'
* before and after the operation.
*
* This is a requirement in the Linux Kernel Memory Model.
* See __cmpxchg_u64() in asm/cmpxchg.h as an example.
*/
if ((imm & BPF_FETCH) && IS_ENABLED(CONFIG_SMP))
EMIT(PPC_RAW_SYNC());
tmp_idx = ctx->idx * 4;
/* load value from memory into TMP_REG_2 */
if (size == BPF_DW)
Expand Down Expand Up @@ -846,6 +855,9 @@ int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context *
PPC_BCC_SHORT(COND_NE, tmp_idx);

if (imm & BPF_FETCH) {
/* Emit 'sync' to enforce full ordering */
if (IS_ENABLED(CONFIG_SMP))
EMIT(PPC_RAW_SYNC());
EMIT(PPC_RAW_MR(ret_reg, _R0));
/*
* Skip unnecessary zero-extension for 32-bit cmpxchg.
Expand Down
85 changes: 46 additions & 39 deletions arch/riscv/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,30 +246,6 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
sigset_t *oldset = sigmask_to_save();
int ret;

/* Are we from a system call? */
if (regs->cause == EXC_SYSCALL) {
/* Avoid additional syscall restarting via ret_from_exception */
regs->cause = -1UL;
/* If so, check system call restarting.. */
switch (regs->a0) {
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
regs->a0 = -EINTR;
break;

case -ERESTARTSYS:
if (!(ksig->ka.sa.sa_flags & SA_RESTART)) {
regs->a0 = -EINTR;
break;
}
fallthrough;
case -ERESTARTNOINTR:
regs->a0 = regs->orig_a0;
regs->epc -= 0x4;
break;
}
}

rseq_signal_deliver(ksig, regs);

/* Set up the stack frame */
Expand All @@ -283,35 +259,66 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)

static void do_signal(struct pt_regs *regs)
{
unsigned long continue_addr = 0, restart_addr = 0;
int retval = 0;
struct ksignal ksig;
bool syscall = (regs->cause == EXC_SYSCALL);

if (get_signal(&ksig)) {
/* Actually deliver the signal */
handle_signal(&ksig, regs);
return;
}
/* If we were from a system call, check for system call restarting */
if (syscall) {
continue_addr = regs->epc;
restart_addr = continue_addr - 4;
retval = regs->a0;

/* Did we come from a system call? */
if (regs->cause == EXC_SYSCALL) {
/* Avoid additional syscall restarting via ret_from_exception */
regs->cause = -1UL;

/* Restart the system call - no handlers present */
switch (regs->a0) {
/*
* Prepare for system call restart. We do this here so that a
* debugger will see the already changed PC.
*/
switch (retval) {
case -ERESTARTNOHAND:
case -ERESTARTSYS:
case -ERESTARTNOINTR:
regs->a0 = regs->orig_a0;
regs->epc -= 0x4;
break;
case -ERESTART_RESTARTBLOCK:
regs->a0 = regs->orig_a0;
regs->a7 = __NR_restart_syscall;
regs->epc -= 0x4;
regs->a0 = regs->orig_a0;
regs->epc = restart_addr;
break;
}
}

/*
* Get the signal to deliver. When running under ptrace, at this point
* the debugger may change all of our registers.
*/
if (get_signal(&ksig)) {
/*
* Depending on the signal settings, we may need to revert the
* decision to restart the system call, but skip this if a
* debugger has chosen to restart at a different PC.
*/
if (regs->epc == restart_addr &&
(retval == -ERESTARTNOHAND ||
retval == -ERESTART_RESTARTBLOCK ||
(retval == -ERESTARTSYS &&
!(ksig.ka.sa.sa_flags & SA_RESTART)))) {
regs->a0 = -EINTR;
regs->epc = continue_addr;
}

/* Actually deliver the signal */
handle_signal(&ksig, regs);
return;
}

/*
* Handle restarting a different system call. As above, if a debugger
* has chosen to restart at a different PC, ignore the restart.
*/
if (syscall && regs->epc == restart_addr && retval == -ERESTART_RESTARTBLOCK)
regs->a7 = __NR_restart_syscall;

/*
* If there is no signal to deliver, we just put the saved
* sigmask back.
Expand Down
Loading

0 comments on commit 8ae242c

Please sign in to comment.