Commit 831c1926 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull UML updates from Richard Weinberger:

 - Lots of cleanups, mostly from Benjamin Berg and Tiwei Bie

 - Removal of unused code

 - Fix for sparse warnings

 - Cleanup around stub_exe()

* tag 'uml-for-linus-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (68 commits)
  hostfs: Fix the NULL vs IS_ERR() bug for __filemap_get_folio()
  um: move thread info into task
  um: Always dump trace for specified task in show_stack
  um: vector: Do not use drvdata in release
  um: net: Do not use drvdata in release
  um: ubd: Do not use drvdata in release
  um: ubd: Initialize ubd's disk pointer in ubd_add
  um: virtio_uml: query the number of vqs if supported
  um: virtio_uml: fix call_fd IRQ allocation
  um: virtio_uml: send SET_MEM_TABLE message with the exact size
  um: remove broken double fault detection
  um: remove duplicate UM_NSEC_PER_SEC definition
  um: remove file sync for stub data
  um: always include kconfig.h and compiler-version.h
  um: set DONTDUMP and DONTFORK flags on KASAN shadow memory
  um: fix sparse warnings in signal code
  um: fix sparse warnings from regset refactor
  um: Remove double zero check
  um: fix stub exe build with CONFIG_GCOV
  um: Use os_set_pdeathsig helper in winch thread/process
  ...
parents 04b43ea3 bed2cc48
Loading
Loading
Loading
Loading
+21 −3
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ menu "UML-specific options"
config UML
	bool
	default y
	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
	select ARCH_HAS_CPU_FINALIZE_INIT
	select ARCH_HAS_FORTIFY_SOURCE
	select ARCH_HAS_GCOV_PROFILE_ALL
@@ -32,6 +33,8 @@ config UML
	select HAVE_ARCH_VMAP_STACK
	select HAVE_RUST
	select ARCH_HAS_UBSAN
	select HAVE_ARCH_TRACEHOOK
	select THREAD_INFO_IN_TASK

config MMU
	bool
@@ -94,7 +97,7 @@ config MAY_HAVE_RUNTIME_DEPS

config STATIC_LINK
	bool "Force a static link"
	depends on CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS || !MAY_HAVE_RUNTIME_DEPS
	depends on !MAY_HAVE_RUNTIME_DEPS
	help
	  This option gives you the ability to force a static link of UML.
	  Normally, UML is linked as a shared binary.  This is inconvenient for
@@ -209,8 +212,8 @@ config MMAPPER

config PGTABLE_LEVELS
	int
	default 3 if 3_LEVEL_PGTABLES
	default 2
	default 4 if 64BIT
	default 2 if !64BIT

config UML_TIME_TRAVEL_SUPPORT
	bool
@@ -227,6 +230,21 @@ config UML_TIME_TRAVEL_SUPPORT

	  It is safe to say Y, but you probably don't need this.

config UML_MAX_USERSPACE_ITERATIONS
	int
	prompt "Maximum number of unscheduled userspace iterations"
	default 10000
	depends on UML_TIME_TRAVEL_SUPPORT
	help
	  In UML inf-cpu and ext time-travel mode userspace can run without being
	  interrupted. This will eventually overwhelm the kernel and create OOM
	  situations (mainly RCU not running). This setting specifies the number
	  of kernel/userspace switches (minor/major page fault, signal or syscall)
	  for the same userspace thread before the sched_clock is advanced by a
	  jiffie to trigger scheduling.

	  Setting it to zero disables the feature.

config KASAN_SHADOW_OFFSET
	hex
	depends on KASAN
+5 −2
Original line number Diff line number Diff line
@@ -61,7 +61,8 @@ KBUILD_CFLAGS += $(CFLAGS) $(CFLAGS-y) -D__arch_um__ \
	$(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap	\
	-Dlongjmp=kernel_longjmp -Dsetjmp=kernel_setjmp \
	-Din6addr_loopback=kernel_in6addr_loopback \
	-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr
	-Din6addr_any=kernel_in6addr_any -Dstrrchr=kernel_strrchr \
	-D__close_range=kernel__close_range

KBUILD_RUSTFLAGS += -Crelocation-model=pie

@@ -70,7 +71,9 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE)
USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \
		$(ARCH_INCLUDE) $(MODE_INCLUDE) $(filter -I%,$(CFLAGS)) \
		-D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \
		-idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__
		-idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ \
		-include $(srctree)/include/linux/compiler-version.h \
		-include $(srctree)/include/linux/kconfig.h

#This will adjust *FLAGS accordingly to the platform.
include $(srctree)/$(ARCH_DIR)/Makefile-os-Linux
+7 −7
Original line number Diff line number Diff line
@@ -3,15 +3,15 @@
# Licensed under the GPL
#

GPROF_OPT += -pg
export UM_GPROF_OPT += -pg

ifdef CONFIG_CC_IS_CLANG
GCOV_OPT += -fprofile-instr-generate -fcoverage-mapping
export UM_GCOV_OPT += -fprofile-instr-generate -fcoverage-mapping
else
GCOV_OPT += -fprofile-arcs -ftest-coverage
export UM_GCOV_OPT += -fprofile-arcs -ftest-coverage
endif

CFLAGS-$(CONFIG_GCOV) += $(GCOV_OPT)
CFLAGS-$(CONFIG_GPROF) += $(GPROF_OPT)
LINK-$(CONFIG_GCOV) += $(GCOV_OPT)
LINK-$(CONFIG_GPROF) += $(GPROF_OPT)
CFLAGS-$(CONFIG_GCOV) += $(UM_GCOV_OPT)
CFLAGS-$(CONFIG_GPROF) += $(UM_GPROF_OPT)
LINK-$(CONFIG_GCOV) += $(UM_GCOV_OPT)
LINK-$(CONFIG_GPROF) += $(UM_GPROF_OPT)
+0 −1
Original line number Diff line number Diff line
CONFIG_3_LEVEL_PGTABLES=y
# CONFIG_COMPACTION is not set
CONFIG_BINFMT_MISC=m
CONFIG_HOSTFS=y
+2 −0
Original line number Diff line number Diff line
@@ -161,6 +161,8 @@ static __noreturn int winch_thread(void *arg)
	int count;
	char c = 1;

	os_set_pdeathsig();

	pty_fd = data->pty_fd;
	pipe_fd = data->pipe_fd;
	count = write(pipe_fd, &c, sizeof(c));
Loading