projects/linux·commit 399ead3a

Merge tag 'uml-for-linux-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux

399ead3a · Linus Torvalds <[email protected]> · 2025-12-05 16:30:56 -08:00

Pull UML updates from Johannes Berg:
 "Apart from the usual small churn, we have

   - initial SMP support (only kernel)

   - major vDSO cleanups (and fixes for 32-bit)"

* tag 'uml-for-linux-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (33 commits)
  um: Disable KASAN_INLINE when STATIC_LINK is selected
  um: Don't rename vmap to kernel_vmap
  um: drivers: virtio: use string choices helper
  um: Always set up AT_HWCAP and AT_PLATFORM
  x86/um: Remove FIXADDR_USER_START and FIXADDR_USE_END
  um: Remove __access_ok_vsyscall()
  um: Remove redundant range check from __access_ok_vsyscall()
  um: Remove fixaddr_user_init()
  x86/um: Drop gate area handling
  x86/um: Do not inherit vDSO from host
  um: Split out default elf_aux_hwcap
  x86/um: Move ELF_PLATFORM fallback to x86-specific code
  um: Split out default elf_aux_platform
  um: Avoid circular dependency on asm-offsets in pgtable.h
  um: Enable SMP support on x86
  asm-generic: percpu: Add assembly guard
  um: vdso: Remove getcpu support on x86
  um: Add initial SMP support
  um: Define timers on a per-CPU basis
  um: Determine sleep based on need_resched()
  ...
Commit
399ead3a6d76cbdd29a716660db5c84a314dab70
Parents
07025b51 · a3209bb9

Merge commit. Changes below are compared with the first parent: 07025b51.

Changes

64 files changed · +972 −865

FileStatusAddDelContent
Documentation/features/core/generic-idle-thread/arch-support.txtmodified+1−1View file
arch/um/Kconfigmodified+44−9View file
arch/um/Makefilemodified+5−7View file
arch/um/drivers/Makefilemodified+0−1View file
arch/um/drivers/mmapper_kern.cdeleted+0−135View before deletion
arch/um/drivers/virtio_uml.cmodified+2−2View file
arch/um/include/asm/current.hmodified+3−2View file
arch/um/include/asm/hardirq.hmodified+23−1View file
arch/um/include/asm/irqflags.hmodified+2−2View file
arch/um/include/asm/kasan.hmodified+0−4View file
arch/um/include/asm/mmu.hmodified+10−0View file
arch/um/include/asm/page.hmodified+0−4View file
arch/um/include/asm/pgtable.hmodified+6−2View file
arch/um/include/asm/smp.hmodified+14−1View file
arch/um/include/asm/uaccess.hmodified+1−8View file
arch/um/include/linux/smp-internal.hadded+17−0View file
arch/um/include/linux/time-internal.hmodified+3−0View file
arch/um/include/shared/as-layout.hmodified+0−1View file
arch/um/include/shared/common-offsets.hdeleted+0−20View before deletion
arch/um/include/shared/kern_util.hmodified+1−4View file
arch/um/include/shared/longjmp.hmodified+1−2View file
arch/um/include/shared/mem_user.hmodified+0−13View file
arch/um/include/shared/os.hmodified+21−3View file
arch/um/include/shared/skas/mm_id.hmodified+5−0View file
arch/um/include/shared/skas/skas.hmodified+2−0View file
arch/um/include/shared/smp.hadded+20−0View file
arch/um/kernel/Makefilemodified+1−0View file
arch/um/kernel/asm-offsets.cmodified+43−1View file
arch/um/kernel/irq.cmodified+26−1View file
arch/um/kernel/ksyms.cmodified+1−1View file
arch/um/kernel/mem.cmodified+2−109View file
arch/um/kernel/physmem.cmodified+0−71View file
arch/um/kernel/process.cmodified+13−5View file
arch/um/kernel/skas/mmu.cmodified+25−8View file
arch/um/kernel/skas/process.cmodified+16−3View file
arch/um/kernel/smp.cadded+242−0View file
arch/um/kernel/time.cmodified+41−17View file
arch/um/kernel/tlb.cmodified+4−1View file
arch/um/kernel/trap.cmodified+1−1View file
arch/um/kernel/um_arch.cmodified+29−20View file
arch/um/os-Linux/Makefilemodified+3−3View file
arch/um/os-Linux/elf_aux.cmodified+6−31View file
arch/um/os-Linux/internal.hmodified+13−0View file
arch/um/os-Linux/main.cmodified+1−5View file
arch/um/os-Linux/process.cmodified+20−0View file
arch/um/os-Linux/signal.cmodified+39−7View file
arch/um/os-Linux/skas/process.cmodified+25−21View file
arch/um/os-Linux/smp.cadded+148−0View file
arch/um/os-Linux/start_up.cmodified+4−50View file
arch/um/os-Linux/time.cmodified+60−18View file
arch/um/os-Linux/user_syms.cmodified+0−6View file
arch/x86/um/Kconfigmodified+3−4View file
arch/x86/um/Makefilemodified+2−3View file
arch/x86/um/asm/elf.hmodified+5−34View file
arch/x86/um/asm/spinlock.hadded+8−0View file
arch/x86/um/elfcore.cdeleted+0−78View before deletion
arch/x86/um/mem_32.cdeleted+0−50View before deletion
arch/x86/um/shared/sysdep/kernel-offsets.hdeleted+0−17View before deletion
arch/x86/um/vdso/Makefilemodified+2−5View file
arch/x86/um/vdso/um_vdso.cmodified+3−27View file
arch/x86/um/vdso/vdso.lds.Smodified+0−2View file
arch/x86/um/vdso/vma.cmodified+1−11View file
fs/hostfs/hostfs.hmodified+1−33View file
include/asm-generic/percpu.hmodified+3−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/features/core/generic-idle-thread/arch-support.txt

View file
diff --git a/Documentation/features/core/generic-idle-thread/arch-support.txt b/Documentation/features/core/generic-idle-thread/arch-support.txt
index 0735cb5..425442e 100644
--- a/Documentation/features/core/generic-idle-thread/arch-support.txt
+++ b/Documentation/features/core/generic-idle-thread/arch-support.txt
@@ -24,7 +24,7 @@
| s390: | ok |
| sh: | ok |
| sparc: | ok |
- | um: | TODO |
+ | um: | ok |
| x86: | ok |
| xtensa: | ok |
-----------------------

arch/um/Kconfig

View file
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index 49781be..8415d39 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -5,6 +5,7 @@ menu "UML-specific options"
config UML
bool
default y
+ select ARCH_DISABLE_KASAN_INLINE if STATIC_LINK
select ARCH_NEEDS_DEFER_KASAN if STATIC_LINK
select ARCH_WANTS_DYNAMIC_TASK_STRUCT
select ARCH_HAS_CACHE_LINE_SIZE
@@ -28,6 +29,7 @@ config UML
select OF_EARLY_FLATTREE if OF
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
+ select GENERIC_SMP_IDLE_THREAD
select HAVE_GCC_PLUGINS
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
@@ -81,10 +83,48 @@ config HZ
int
default 100
-config NR_CPUS
+config UML_SUBARCH_SUPPORTS_SMP
+ bool
+
+config SMP
+ bool "Symmetric multi-processing support"
+ default n
+ depends on UML_SUBARCH_SUPPORTS_SMP
+ help
+ This option enables UML SMP support.
+
+ With this enabled, users can tell UML to start multiple virtual
+ processors. Each virtual processor is represented as a separate
+ host thread.
+
+ In UML, kthreads and normal threads (when running in kernel mode)
+ can be scheduled and executed simultaneously on different virtual
+ processors. However, the userspace code of normal threads still
+ runs within their respective single-threaded stubs.
+
+ That is, SMP support is available both within the kernel and
+ across different processes, but remains limited within threads
+ of the same process in userspace.
+
+config NR_CPUS_RANGE_BEGIN
int
- range 1 1
- default 1
+ default 1 if !SMP
+ default 2
+
+config NR_CPUS_RANGE_END
+ int
+ default 1 if !SMP
+ default 64
+
+config NR_CPUS_DEFAULT
+ int
+ default 1 if !SMP
+ default 2
+
+config NR_CPUS
+ int "Maximum number of CPUs" if SMP
+ range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
+ default NR_CPUS_DEFAULT
source "arch/$(HEADER_ARCH)/um/Kconfig"
@@ -200,12 +240,6 @@ config KERNEL_STACK_ORDER
increase in the size of the state which needs to be saved when handling
signals.
-config MMAPPER
- tristate "iomem emulation driver"
- help
- This driver allows a host file to be used as emulated IO memory inside
- UML.
-
config PGTABLE_LEVELS
int
default 4 if 64BIT
@@ -260,6 +294,7 @@ source "arch/um/drivers/Kconfig"
config ARCH_SUSPEND_POSSIBLE
def_bool y
+ depends on !SMP
menu "Power management options"

arch/um/Makefile

View file
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 7be0143..721b652 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -46,19 +46,17 @@ ARCH_INCLUDE := -I$(srctree)/$(SHARED_HEADERS)
ARCH_INCLUDE += -I$(srctree)/$(HOST_DIR)/um/shared
KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/um
-# -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
-# named - it's a common symbol in libpcap, so we get a binary which crashes.
-#
-# Same things for in6addr_loopback and mktime - found in libc. For these two we
-# only get link-time error, luckily.
+# -Dstrrchr=kernel_strrchr (as well as the various in6addr symbols) prevents
+# anything from referencing
+# libc symbols with the same name, which can cause a linker error.
#
# -Dlongjmp=kernel_longjmp prevents anything from referencing the libpthread.a
# embedded copy of longjmp, same thing for setjmp.
#
-# These apply to USER_CFLAGS to.
+# These apply to USER_CFLAGS too.
KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
- $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
+ $(ARCH_INCLUDE) $(MODE_INCLUDE) \
-Dlongjmp=kernel_longjmp -Dsetjmp=kernel_setjmp \
-Din6addr_loopback=kernel_in6addr_loopback \
-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr \

arch/um/drivers/Makefile

View file
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index 6bf8cbf..36dc578 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -29,7 +29,6 @@ obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
obj-$(CONFIG_UML_NET_VECTOR) += vector.o
obj-$(CONFIG_MCONSOLE) += mconsole.o
-obj-$(CONFIG_MMAPPER) += mmapper_kern.o
obj-$(CONFIG_BLK_DEV_UBD) += ubd.o
obj-$(CONFIG_UML_SOUND) += hostaudio.o
obj-$(CONFIG_NULL_CHAN) += null.o

arch/um/drivers/mmapper_kern.c

View before deletion
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
deleted file mode 100644
index 807cd33..0000000
--- a/arch/um/drivers/mmapper_kern.c
+++ /dev/null
@@ -1,135 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * arch/um/drivers/mmapper_kern.c
- *
- * BRIEF MODULE DESCRIPTION
- *
- * Copyright (C) 2000 RidgeRun, Inc.
- * Author: RidgeRun, Inc.
- *
- */
-
-#include <linux/stddef.h>
-#include <linux/types.h>
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/miscdevice.h>
-#include <linux/module.h>
-#include <linux/mm.h>
-
-#include <linux/uaccess.h>
-#include <mem_user.h>
-
-/* These are set in mmapper_init, which is called at boot time */
-static unsigned long mmapper_size;
-static unsigned long p_buf;
-static char *v_buf;
-
-static ssize_t mmapper_read(struct file *file, char __user *buf, size_t count,
- loff_t *ppos)
-{
- return simple_read_from_buffer(buf, count, ppos, v_buf, mmapper_size);
-}
-
-static ssize_t mmapper_write(struct file *file, const char __user *buf,
- size_t count, loff_t *ppos)
-{
- if (*ppos > mmapper_size)
- return -EINVAL;
-
- return simple_write_to_buffer(v_buf, mmapper_size, ppos, buf, count);
-}
-
-static long mmapper_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
-{
- return -ENOIOCTLCMD;
-}
-
-static int mmapper_mmap(struct file *file, struct vm_area_struct *vma)
-{
- int ret = -EINVAL;
- int size;
-
- if (vma->vm_pgoff != 0)
- goto out;
-
- size = vma->vm_end - vma->vm_start;
- if (size > mmapper_size)
- return -EFAULT;
-
- /*
- * XXX A comment above remap_pfn_range says it should only be
- * called when the mm semaphore is held
- */
- if (remap_pfn_range(vma, vma->vm_start, p_buf >> PAGE_SHIFT, size,
- vma->vm_page_prot))
- goto out;
- ret = 0;
-out:
- return ret;
-}
-
-static int mmapper_open(struct inode *inode, struct file *file)
-{
- return 0;
-}
-
-static int mmapper_release(struct inode *inode, struct file *file)
-{
- return 0;
-}
-
-static const struct file_operations mmapper_fops = {
- .owner = THIS_MODULE,
- .read = mmapper_read,
- .write = mmapper_write,
- .unlocked_ioctl = mmapper_ioctl,
- .mmap = mmapper_mmap,
- .open = mmapper_open,
- .release = mmapper_release,
- .llseek = default_llseek,
-};
-
-/*
- * No locking needed - only used (and modified) by below initcall and exitcall.
- */
-static struct miscdevice mmapper_dev = {
- .minor = MISC_DYNAMIC_MINOR,
- .name = "mmapper",
- .fops = &mmapper_fops
-};
-
-static int __init mmapper_init(void)
-{
- int err;
-
- printk(KERN_INFO "Mapper v0.1\n");
-
- v_buf = (char *) find_iomem("mmapper", &mmapper_size);
- if (mmapper_size == 0) {
- printk(KERN_ERR "mmapper_init - find_iomem failed\n");
- return -ENODEV;
- }
- p_buf = __pa(v_buf);
-
- err = misc_register(&mmapper_dev);
- if (err) {
- printk(KERN_ERR "mmapper - misc_register failed, err = %d\n",
- err);
- return err;
- }
- return 0;
-}
-
-static void __exit mmapper_exit(void)
-{
- misc_deregister(&mmapper_dev);
-}
-
-module_init(mmapper_init);
-module_exit(mmapper_exit);
-
-MODULE_AUTHOR("Greg Lonnon <[email protected]>");
-MODULE_DESCRIPTION("DSPLinux simulator mmapper driver");
-MODULE_LICENSE("GPL");

arch/um/drivers/virtio_uml.c

View file
diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c
index de7867a..6cf1152 100644
--- a/arch/um/drivers/virtio_uml.c
+++ b/arch/um/drivers/virtio_uml.c
@@ -24,6 +24,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <linux/virtio.h>
#include <linux/virtio_config.h>
#include <linux/virtio_ring.h>
@@ -1151,8 +1152,7 @@ void virtio_uml_set_no_vq_suspend(struct virtio_device *vdev,
return;
vu_dev->no_vq_suspend = no_vq_suspend;
- dev_info(&vdev->dev, "%sabled VQ suspend\n",
- no_vq_suspend ? "dis" : "en");
+ dev_info(&vdev->dev, "%s VQ suspend\n", str_disabled_enabled(no_vq_suspend));
}
static void vu_of_conn_broken(struct work_struct *wk)

arch/um/include/asm/current.h

View file
diff --git a/arch/um/include/asm/current.h b/arch/um/include/asm/current.h
index 8accc6d..159a29b 100644
--- a/arch/um/include/asm/current.h
+++ b/arch/um/include/asm/current.h
@@ -7,15 +7,16 @@
#ifndef __ASSEMBLER__
+#include <shared/smp.h>
+
struct task_struct;
extern struct task_struct *cpu_tasks[NR_CPUS];
static __always_inline struct task_struct *get_current(void)
{
- return cpu_tasks[0];
+ return cpu_tasks[uml_curr_cpu()];
}
-
#define current get_current()
#endif /* __ASSEMBLER__ */

arch/um/include/asm/hardirq.h

View file
diff --git a/arch/um/include/asm/hardirq.h b/arch/um/include/asm/hardirq.h
index 52e2c36..8de7175 100644
--- a/arch/um/include/asm/hardirq.h
+++ b/arch/um/include/asm/hardirq.h
@@ -2,8 +2,30 @@
#ifndef __ASM_UM_HARDIRQ_H
#define __ASM_UM_HARDIRQ_H
-#include <asm-generic/hardirq.h>
+#include <linux/cache.h>
+#include <linux/threads.h>
#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
+typedef struct {
+ unsigned int __softirq_pending;
+#if IS_ENABLED(CONFIG_SMP)
+ unsigned int irq_resched_count;
+ unsigned int irq_call_count;
+#endif
+} ____cacheline_aligned irq_cpustat_t;
+
+DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
+
+#define __ARCH_IRQ_STAT
+
+#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
+
+#include <linux/irq.h>
+
+static inline void ack_bad_irq(unsigned int irq)
+{
+ pr_crit("unexpected IRQ trap at vector %02x\n", irq);
+}
+
#endif /* __ASM_UM_HARDIRQ_H */

arch/um/include/asm/irqflags.h

View file
diff --git a/arch/um/include/asm/irqflags.h b/arch/um/include/asm/irqflags.h
index 1e69ef5..31e49e0 100644
--- a/arch/um/include/asm/irqflags.h
+++ b/arch/um/include/asm/irqflags.h
@@ -2,7 +2,7 @@
#ifndef __UM_IRQFLAGS_H
#define __UM_IRQFLAGS_H
-extern int signals_enabled;
+int um_get_signals(void);
int um_set_signals(int enable);
void block_signals(void);
void unblock_signals(void);
@@ -10,7 +10,7 @@ void unblock_signals(void);
#define arch_local_save_flags arch_local_save_flags
static inline unsigned long arch_local_save_flags(void)
{
- return signals_enabled;
+ return um_get_signals();
}
#define arch_local_irq_restore arch_local_irq_restore

arch/um/include/asm/kasan.h

View file
diff --git a/arch/um/include/asm/kasan.h b/arch/um/include/asm/kasan.h
index b54a4e9..81bcdc0 100644
--- a/arch/um/include/asm/kasan.h
+++ b/arch/um/include/asm/kasan.h
@@ -24,10 +24,6 @@
#ifdef CONFIG_KASAN
void kasan_init(void);
-
-#if defined(CONFIG_STATIC_LINK) && defined(CONFIG_KASAN_INLINE)
-#error UML does not work in KASAN_INLINE mode with STATIC_LINK enabled!
-#endif
#else
static inline void kasan_init(void) { }
#endif /* CONFIG_KASAN */

arch/um/include/asm/mmu.h

View file
diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h
index 4d0e423..07d4873 100644
--- a/arch/um/include/asm/mmu.h
+++ b/arch/um/include/asm/mmu.h
@@ -7,16 +7,26 @@
#define __ARCH_UM_MMU_H
#include "linux/types.h"
+#include <linux/mutex.h>
+#include <linux/spinlock.h>
#include <mm_id.h>
typedef struct mm_context {
struct mm_id id;
+ struct mutex turnstile;
struct list_head list;
/* Address range in need of a TLB sync */
+ spinlock_t sync_tlb_lock;
unsigned long sync_tlb_range_from;
unsigned long sync_tlb_range_to;
} mm_context_t;
+#define INIT_MM_CONTEXT(mm) \
+ .context = { \
+ .turnstile = __MUTEX_INITIALIZER(mm.context.turnstile), \
+ .sync_tlb_lock = __SPIN_LOCK_INITIALIZER(mm.context.sync_tlb_lock), \
+ }
+
#endif

arch/um/include/asm/page.h

View file
diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
index 6f54254..2d36346 100644
--- a/arch/um/include/asm/page.h
+++ b/arch/um/include/asm/page.h
@@ -96,8 +96,4 @@ extern unsigned long uml_physmem;
#endif /* __ASSEMBLER__ */
-#ifdef CONFIG_X86_32
-#define __HAVE_ARCH_GATE_AREA 1
-#endif
-
#endif /* __UM_PAGE_H */

arch/um/include/asm/pgtable.h

View file
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 24fdea6..3b42b0f 100644
--- a/arch/um/include/asm/pgtable.h
+++ b/arch/um/include/asm/pgtable.h
@@ -45,10 +45,12 @@ extern unsigned long *empty_zero_page;
* area for the same reason. ;)
*/
-extern unsigned long end_iomem;
+#ifndef COMPILE_OFFSETS
+#include <as-layout.h> /* for high_physmem */
+#endif
#define VMALLOC_OFFSET (__va_space)
-#define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
+#define VMALLOC_START ((high_physmem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_END (TASK_SIZE-2*PAGE_SIZE)
#define MODULES_VADDR VMALLOC_START
#define MODULES_END VMALLOC_END
@@ -225,6 +227,8 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval)
static inline void um_tlb_mark_sync(struct mm_struct *mm, unsigned long start,
unsigned long end)
{
+ guard(spinlock_irqsave)(&mm->context.sync_tlb_lock);
+
if (!mm->context.sync_tlb_range_to) {
mm->context.sync_tlb_range_from = start;
mm->context.sync_tlb_range_to = end;

arch/um/include/asm/smp.h

View file
diff --git a/arch/um/include/asm/smp.h b/arch/um/include/asm/smp.h
index a8cc1d4..be1743a 100644
--- a/arch/um/include/asm/smp.h
+++ b/arch/um/include/asm/smp.h
@@ -2,6 +2,19 @@
#ifndef __UM_SMP_H
#define __UM_SMP_H
-#define hard_smp_processor_id() 0
+#if IS_ENABLED(CONFIG_SMP)
+
+#include <linux/cpumask.h>
+#include <shared/smp.h>
+
+#define raw_smp_processor_id() uml_curr_cpu()
+
+void arch_smp_send_reschedule(int cpu);
+
+void arch_send_call_function_single_ipi(int cpu);
+
+void arch_send_call_function_ipi_mask(const struct cpumask *mask);
+
+#endif /* CONFIG_SMP */
#endif

arch/um/include/asm/uaccess.h

View file
diff --git a/arch/um/include/asm/uaccess.h b/arch/um/include/asm/uaccess.h
index 1c6e0ae..0df9ea4 100644
--- a/arch/um/include/asm/uaccess.h
+++ b/arch/um/include/asm/uaccess.h
@@ -15,11 +15,6 @@
(((unsigned long) (addr) < TASK_SIZE) && \
(((unsigned long) (addr) + (size)) < TASK_SIZE))
-#define __access_ok_vsyscall(addr, size) \
- (((unsigned long) (addr) >= FIXADDR_USER_START) && \
- ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
- ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))
-
#define __addr_range_nowrap(addr, size) \
((unsigned long) (addr) <= ((unsigned long) (addr) + (size)))
@@ -40,9 +35,7 @@ static inline int __access_ok(const void __user *ptr, unsigned long size);
static inline int __access_ok(const void __user *ptr, unsigned long size)
{
unsigned long addr = (unsigned long)ptr;
- return __addr_range_nowrap(addr, size) &&
- (__under_task_size(addr, size) ||
- __access_ok_vsyscall(addr, size));
+ return __addr_range_nowrap(addr, size) && __under_task_size(addr, size);
}
#define __get_kernel_nofault(dst, src, type, err_label) \

arch/um/include/linux/smp-internal.h

View file
diff --git a/arch/um/include/linux/smp-internal.h b/arch/um/include/linux/smp-internal.h
new file mode 100644
index 0000000..1dbcbc2
--- /dev/null
+++ b/arch/um/include/linux/smp-internal.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __UM_SMP_INTERNAL_H
+#define __UM_SMP_INTERNAL_H
+
+#if IS_ENABLED(CONFIG_SMP)
+
+void prefill_possible_map(void);
+
+#else /* !CONFIG_SMP */
+
+static inline void prefill_possible_map(void) { }
+
+#endif /* CONFIG_SMP */
+
+extern char cpu_irqstacks[NR_CPUS][THREAD_SIZE] __aligned(THREAD_SIZE);
+
+#endif /* __UM_SMP_INTERNAL_H */

arch/um/include/linux/time-internal.h

View file
diff --git a/arch/um/include/linux/time-internal.h b/arch/um/include/linux/time-internal.h
index 138908b..c274eb5 100644
--- a/arch/um/include/linux/time-internal.h
+++ b/arch/um/include/linux/time-internal.h
@@ -90,4 +90,7 @@ extern unsigned long tt_extra_sched_jiffies;
* which is intentional since we really shouldn't link it in that case.
*/
void time_travel_ndelay(unsigned long nsec);
+
+int um_setup_timer(void);
+
#endif /* __TIMER_INTERNAL_H__ */

arch/um/include/shared/as-layout.h

View file
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
index 7c7e17b..02ef258 100644
--- a/arch/um/include/shared/as-layout.h
+++ b/arch/um/include/shared/as-layout.h
@@ -44,7 +44,6 @@ extern unsigned long start_vm;
extern unsigned long brk_start;
-extern unsigned long host_task_size;
extern unsigned long stub_start;
extern int linux_main(int argc, char **argv, char **envp);

arch/um/include/shared/common-offsets.h

View before deletion
diff --git a/arch/um/include/shared/common-offsets.h b/arch/um/include/shared/common-offsets.h
deleted file mode 100644
index 8ca66a1..0000000
--- a/arch/um/include/shared/common-offsets.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* for use by sys-$SUBARCH/kernel-offsets.c */
-
-DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
-
-DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE);
-DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK);
-DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT);
-
-DEFINE(UM_GFP_KERNEL, GFP_KERNEL);
-DEFINE(UM_GFP_ATOMIC, GFP_ATOMIC);
-
-DEFINE(UM_THREAD_SIZE, THREAD_SIZE);
-
-DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
-DEFINE(UM_NSEC_PER_USEC, NSEC_PER_USEC);
-

This diff is incomplete. Download the complete patch.

arch/um/include/shared/kern_util.h

View file

This diff is incomplete. Download the complete patch.

arch/um/include/shared/longjmp.h

View file

This diff is incomplete. Download the complete patch.

arch/um/include/shared/mem_user.h

View file

This diff is incomplete. Download the complete patch.

arch/um/include/shared/os.h

View file

This diff is incomplete. Download the complete patch.

arch/um/include/shared/skas/mm_id.h

View file

This diff is incomplete. Download the complete patch.

arch/um/include/shared/skas/skas.h

View file

This diff is incomplete. Download the complete patch.

arch/um/include/shared/smp.h

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/asm-offsets.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/irq.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/ksyms.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/mem.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/physmem.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/process.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/skas/mmu.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/skas/process.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/time.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/tlb.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/trap.c

View file

This diff is incomplete. Download the complete patch.

arch/um/kernel/um_arch.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/elf_aux.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/internal.h

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/main.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/process.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/signal.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/skas/process.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/start_up.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/time.c

View file

This diff is incomplete. Download the complete patch.

arch/um/os-Linux/user_syms.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/Kconfig

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/asm/elf.h

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/asm/spinlock.h

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/elfcore.c

View before deletion

This diff is incomplete. Download the complete patch.

arch/x86/um/mem_32.c

View before deletion

This diff is incomplete. Download the complete patch.

arch/x86/um/shared/sysdep/kernel-offsets.h

View before deletion

This diff is incomplete. Download the complete patch.

arch/x86/um/vdso/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/vdso/um_vdso.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/vdso/vdso.lds.S

View file

This diff is incomplete. Download the complete patch.

arch/x86/um/vdso/vma.c

View file

This diff is incomplete. Download the complete patch.

fs/hostfs/hostfs.h

View file

This diff is incomplete. Download the complete patch.

include/asm-generic/percpu.h

View file

This diff is incomplete. Download the complete patch.