Skip to content

Commit 547ab8f

Browse files
committed
Merge tag 'loongarch-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
Pull LoongArch fixes from Huacai Chen: "Fix acpi_core_pic[] array overflow, fix earlycon parameter if KASAN enabled, disable UBSAN instrumentation for vDSO build, and two Kconfig cleanups" * tag 'loongarch-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: vDSO: Disable UBSAN instrumentation LoongArch: Fix earlycon parameter if KASAN enabled LoongArch: Change acpi_core_pic[NR_CPUS] to acpi_core_pic[MAX_CORE_PIC] LoongArch: Select HAVE_ARCH_SECCOMP to use the common SECCOMP menu LoongArch: Select ARCH_ENABLE_THP_MIGRATION instead of redefining it
2 parents 5c24ba2 + cca5efe commit 547ab8f

File tree

5 files changed

+10
-25
lines changed

5 files changed

+10
-25
lines changed

arch/loongarch/Kconfig

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ config LOONGARCH
1212
select ARCH_DISABLE_KASAN_INLINE
1313
select ARCH_ENABLE_MEMORY_HOTPLUG
1414
select ARCH_ENABLE_MEMORY_HOTREMOVE
15+
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
1516
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
1617
select ARCH_HAS_CPU_FINALIZE_INIT
1718
select ARCH_HAS_FORTIFY_SOURCE
@@ -99,6 +100,7 @@ config LOONGARCH
99100
select HAVE_ARCH_KFENCE
100101
select HAVE_ARCH_KGDB if PERF_EVENTS
101102
select HAVE_ARCH_MMAP_RND_BITS if MMU
103+
select HAVE_ARCH_SECCOMP
102104
select HAVE_ARCH_SECCOMP_FILTER
103105
select HAVE_ARCH_TRACEHOOK
104106
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
@@ -632,23 +634,6 @@ config RANDOMIZE_BASE_MAX_OFFSET
632634

633635
This is limited by the size of the lower address memory, 256MB.
634636

635-
config SECCOMP
636-
bool "Enable seccomp to safely compute untrusted bytecode"
637-
depends on PROC_FS
638-
default y
639-
help
640-
This kernel feature is useful for number crunching applications
641-
that may need to compute untrusted bytecode during their
642-
execution. By using pipes or other transports made available to
643-
the process as file descriptors supporting the read/write
644-
syscalls, it's possible to isolate those applications in
645-
their own address space using seccomp. Once seccomp is
646-
enabled via /proc/<pid>/seccomp, it cannot be disabled
647-
and the task is only allowed to execute a few safe syscalls
648-
defined by each seccomp mode.
649-
650-
If unsure, say Y. Only embedded should say N here.
651-
652637
endmenu
653638

654639
config ARCH_SELECT_MEMORY_MODEL
@@ -667,10 +652,6 @@ config ARCH_SPARSEMEM_ENABLE
667652
or have huge holes in the physical address space for other reasons.
668653
See <file:Documentation/mm/numa.rst> for more.
669654

670-
config ARCH_ENABLE_THP_MIGRATION
671-
def_bool y
672-
depends on TRANSPARENT_HUGEPAGE
673-
674655
config ARCH_MEMORY_PROBE
675656
def_bool y
676657
depends on MEMORY_HOTPLUG

arch/loongarch/include/asm/acpi.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ static inline bool acpi_has_cpu_in_madt(void)
3232
return true;
3333
}
3434

35+
#define MAX_CORE_PIC 256
36+
3537
extern struct list_head acpi_wakeup_device_list;
36-
extern struct acpi_madt_core_pic acpi_core_pic[NR_CPUS];
38+
extern struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
3739

3840
extern int __init parse_acpi_topology(void);
3941

arch/loongarch/kernel/acpi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ int disabled_cpus;
2929

3030
u64 acpi_saved_sp;
3131

32-
#define MAX_CORE_PIC 256
33-
3432
#define PREFIX "ACPI: "
3533

36-
struct acpi_madt_core_pic acpi_core_pic[NR_CPUS];
34+
struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
3735

3836
void __init __iomem * __acpi_map_table(unsigned long phys, unsigned long size)
3937
{

arch/loongarch/mm/kasan_init.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ void *kasan_mem_to_shadow(const void *addr)
4444
unsigned long xrange = (maddr >> XRANGE_SHIFT) & 0xffff;
4545
unsigned long offset = 0;
4646

47+
if (maddr >= FIXADDR_START)
48+
return (void *)(kasan_early_shadow_page);
49+
4750
maddr &= XRANGE_SHADOW_MASK;
4851
switch (xrange) {
4952
case XKPRANGE_CC_SEG:

arch/loongarch/vdso/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Objects to go into the VDSO.
33

44
KASAN_SANITIZE := n
5+
UBSAN_SANITIZE := n
56
KCOV_INSTRUMENT := n
67

78
# Include the generic Makefile to check the built vdso.

0 commit comments

Comments
 (0)