summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2026-01-29 12:05:40 +0000
committerWill Deacon <will@kernel.org>2026-01-29 12:05:40 +0000
commitc96f95bca1be4f924b0433ed9e518c20c7c67de1 (patch)
tree1ba0581d10e430386f91efba7f0cb687973d8540 /arch
parent2f8aed5e97fdde7e295a8f0ff0d22a5f1d41b188 (diff)
parent53f45f045cbe89024d2b71c145c782bb6a82a602 (diff)
Merge branch 'for-next/misc' into for-next/core
* for-next/misc: arm64: mm: warn once for ioremap attempts on RAM mappings arm64: Disable branch profiling for all arm64 code arm64: kernel: initialize missing kexec_buf->random field arm64: simplify arch_uprobe_xol_was_trapped return
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/Kbuild4
-rw-r--r--arch/arm64/kernel/kexec_image.c2
-rw-r--r--arch/arm64/kernel/probes/uprobes.c5
-rw-r--r--arch/arm64/mm/ioremap.c3
4 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm64/Kbuild b/arch/arm64/Kbuild
index 5bfbf7d79c99..d876bc0e5421 100644
--- a/arch/arm64/Kbuild
+++ b/arch/arm64/Kbuild
@@ -1,4 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+# Branch profiling isn't noinstr-safe
+subdir-ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING
+
obj-y += kernel/ mm/ net/
obj-$(CONFIG_KVM) += kvm/
obj-$(CONFIG_XEN) += xen/
diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c
index 532d72ea42ee..b70f4df15a1a 100644
--- a/arch/arm64/kernel/kexec_image.c
+++ b/arch/arm64/kernel/kexec_image.c
@@ -41,7 +41,7 @@ static void *image_load(struct kimage *image,
struct arm64_image_header *h;
u64 flags, value;
bool be_image, be_kernel;
- struct kexec_buf kbuf;
+ struct kexec_buf kbuf = {};
unsigned long text_offset, kernel_segment_number;
struct kexec_segment *kernel_segment;
int ret;
diff --git a/arch/arm64/kernel/probes/uprobes.c b/arch/arm64/kernel/probes/uprobes.c
index 941668800aea..c451ca17a656 100644
--- a/arch/arm64/kernel/probes/uprobes.c
+++ b/arch/arm64/kernel/probes/uprobes.c
@@ -103,10 +103,7 @@ bool arch_uprobe_xol_was_trapped(struct task_struct *t)
* insn itself is trapped, then detect the case with the help of
* invalid fault code which is being set in arch_uprobe_pre_xol
*/
- if (t->thread.fault_code != UPROBE_INV_FAULT_CODE)
- return true;
-
- return false;
+ return t->thread.fault_code != UPROBE_INV_FAULT_CODE;
}
bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
index 10e246f11271..b12cbed9b5ad 100644
--- a/arch/arm64/mm/ioremap.c
+++ b/arch/arm64/mm/ioremap.c
@@ -24,7 +24,8 @@ void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,
return NULL;
/* Don't allow RAM to be mapped. */
- if (WARN_ON(pfn_is_map_memory(__phys_to_pfn(phys_addr))))
+ if (WARN_ONCE(pfn_is_map_memory(__phys_to_pfn(phys_addr)),
+ "ioremap attempted on RAM pfn\n"))
return NULL;
/*