Merge tag 'asm-generic-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2022 01:03:08 +0000 (18:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2022 01:03:08 +0000 (18:03 -0700)
Pull asm-generic updates from Arnd Bergmann:
 "There are three sets of updates for 5.18 in the asm-generic tree:

   - The set_fs()/get_fs() infrastructure gets removed for good.

     This was already gone from all major architectures, but now we can
     finally remove it everywhere, which loses some particularly tricky
     and error-prone code. There is a small merge conflict against a
     parisc cleanup, the solution is to use their new version.

   - The nds32 architecture ends its tenure in the Linux kernel.

     The hardware is still used and the code is in reasonable shape, but
     the mainline port is not actively maintained any more, as all
     remaining users are thought to run vendor kernels that would never
     be updated to a future release.

   - A series from Masahiro Yamada cleans up some of the uapi header
     files to pass the compile-time checks"

* tag 'asm-generic-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (27 commits)
  nds32: Remove the architecture
  uaccess: remove CONFIG_SET_FS
  ia64: remove CONFIG_SET_FS support
  sh: remove CONFIG_SET_FS support
  sparc64: remove CONFIG_SET_FS support
  lib/test_lockup: fix kernel pointer check for separate address spaces
  uaccess: generalize access_ok()
  uaccess: fix type mismatch warnings from access_ok()
  arm64: simplify access_ok()
  m68k: fix access_ok for coldfire
  MIPS: use simpler access_ok()
  MIPS: Handle address errors for accesses above CPU max virtual user address
  uaccess: add generic __{get,put}_kernel_nofault
  nios2: drop access_ok() check from __put_user()
  x86: use more conventional access_ok() definition
  x86: remove __range_not_ok()
  sparc64: add __{get,put}_kernel_nofault()
  nds32: fix access_ok() checks in get/put_user
  uaccess: fix nios2 and microblaze get_user_8()
  sparc64: fix building assembly files
  ...

24 files changed:
1  2 
MAINTAINERS
arch/Kconfig
arch/alpha/Kconfig
arch/arm/kernel/traps.c
arch/arm64/kernel/traps.c
arch/ia64/Kconfig
arch/ia64/include/asm/thread_info.h
arch/microblaze/Kconfig
arch/parisc/Kconfig
arch/parisc/include/asm/uaccess.h
arch/parisc/kernel/signal.c
arch/powerpc/lib/sstep.c
arch/s390/Kconfig
arch/sh/Kconfig
arch/xtensa/Kconfig
drivers/clocksource/Kconfig
drivers/irqchip/Makefile
fs/exec.c
include/linux/uaccess.h
kernel/events/core.c
kernel/exit.c
kernel/kthread.c
mm/maccess.c
mm/memory.c

diff --cc MAINTAINERS
Simple merge
diff --cc arch/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -42,11 -42,8 +42,10 @@@ config MICROBLAZ
        select CPU_NO_EFFICIENT_FFS
        select MMU_GATHER_NO_RANGE
        select SPARSE_IRQ
-       select SET_FS
        select ZONE_DMA
        select TRACE_IRQFLAGS_SUPPORT
 +      select GENERIC_IRQ_MULTI_HANDLER
 +      select HANDLE_DOMAIN_IRQ
  
  # Endianness selection
  choice
Simple merge
Simple merge
@@@ -233,10 -247,11 +233,10 @@@ setup_rt_frame(struct ksignal *ksig, si
  #endif
        frame = get_sigframe(&ksig->ka, usp, sigframe_size);
  
 -      DBG(1,"SETUP_RT_FRAME: START\n");
 -      DBG(1,"setup_rt_frame: frame %p info %p\n", frame, ksig->info);
 +      DBG(1, "%s: frame %p info %p\n", __func__, frame, &ksig->info);
  
        start = (unsigned long) frame;
-       if (start >= user_addr_max() - sigframe_size)
+       if (start >= TASK_SIZE_MAX - sigframe_size)
                return -EFAULT;
        
  #ifdef CONFIG_64BIT
@@@ -497,12 -518,11 +497,12 @@@ insert_restart_trampoline(struct pt_reg
                long err = 0;
  
                /* check that we don't exceed the stack */
-               if (A(&usp[0]) >= user_addr_max() - 5 * sizeof(int))
+               if (A(&usp[0]) >= TASK_SIZE_MAX - 5 * sizeof(int))
                        return;
  
 -              /* Setup a trampoline to restart the syscall
 -               * with __NR_restart_syscall
 +              /* Call trampoline in vdso to restart the syscall
 +               * with __NR_restart_syscall.
 +               * Original return addresses are on stack like this:
                 *
                 *  0: <return address (orig r31)>
                 *  4: <2nd half for 64-bit>
Simple merge
Simple merge
diff --cc arch/sh/Kconfig
Simple merge
Simple merge
Simple merge
@@@ -92,9 -92,7 +92,8 @@@ obj-$(CONFIG_IRQ_UNIPHIER_AIDET)      += irq
  obj-$(CONFIG_ARCH_SYNQUACER)          += irq-sni-exiu.o
  obj-$(CONFIG_MESON_IRQ_GPIO)          += irq-meson-gpio.o
  obj-$(CONFIG_GOLDFISH_PIC)            += irq-goldfish-pic.o
- obj-$(CONFIG_NDS32)                   += irq-ativic32.o
  obj-$(CONFIG_QCOM_PDC)                        += qcom-pdc.o
 +obj-$(CONFIG_QCOM_MPM)                        += irq-qcom-mpm.o
  obj-$(CONFIG_CSKY_MPINTC)             += irq-csky-mpintc.o
  obj-$(CONFIG_CSKY_APB_INTC)           += irq-csky-apb-intc.o
  obj-$(CONFIG_RISCV_INTC)              += irq-riscv-intc.o
diff --cc fs/exec.c
Simple merge
Simple merge
Simple merge
diff --cc kernel/exit.c
@@@ -735,22 -735,8 +735,8 @@@ void __noreturn do_exit(long code
        struct task_struct *tsk = current;
        int group_dead;
  
 -      WARN_ON(blk_needs_flush_plug(tsk));
 +      WARN_ON(tsk->plug);
  
-       /*
-        * If do_dead is called because this processes oopsed, it's possible
-        * that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
-        * continuing. Amongst other possible reasons, this is to prevent
-        * mm_release()->clear_child_tid() from writing to a user-controlled
-        * kernel address.
-        *
-        * On uptodate architectures force_uaccess_begin is a noop.  On
-        * architectures that still have set_fs/get_fs in addition to handling
-        * oopses handles kernel threads that run as set_fs(KERNEL_DS) by
-        * default.
-        */
-       force_uaccess_begin();
        kcov_task_exit(tsk);
  
        coredump_task_exit(tsk);
Simple merge
diff --cc mm/maccess.c
Simple merge
diff --cc mm/memory.c
Simple merge