Commit 14be4c61 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 updates from Martin Schwidefsky:

 - Support for kernel address space layout randomization

 - Add support for kernel image signature verification

 - Convert s390 to the generic get_user_pages_fast code

 - Convert s390 to the stack unwind API analog to x86

 - Add support for CPU directed interrupts for PCI devices

 - Provide support for MIO instructions to the PCI base layer, this will
   allow the use of direct PCI mappings in user space code

 - Add the basic KVM guest ultravisor interface for protected VMs

 - Add AT_HWCAP bits for several new hardware capabilities

 - Update the CPU measurement facility counter definitions to SVN 6

 - Arnds cleanup patches for his quest to get LLVM compiles working

 - A vfio-ccw update with bug fixes and support for halt and clear

 - Improvements for the hardware TRNG code

 - Another round of cleanup for the QDIO layer

 - Numerous cleanups and bug fixes

* tag 's390-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (98 commits)
  s390/vdso: drop unnecessary cc-ldoption
  s390: fix clang -Wpointer-sign warnigns in boot code
  s390: drop CONFIG_VIRT_TO_BUS
  s390: boot, purgatory: pass $(CLANG_FLAGS) where needed
  s390: only build for new CPUs with clang
  s390: simplify disabled_wait
  s390/ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
  s390/unwind: introduce stack unwind API
  s390/opcodes: add missing instructions to the disassembler
  s390/bug: add entry size to the __bug_table section
  s390: use proper expoline sections for .dma code
  s390/nospec: rename assembler generated expoline thunks
  s390: add missing ENDPROC statements to assembler functions
  locking/lockdep: check for freed initmem in static_obj()
  s390/kernel: add support for kernel address space layout randomization (KASLR)
  s390/kernel: introduce .dma sections
  s390/sclp: do not use static sccbs
  s390/kprobes: use static buffer for insn_page
  s390/kernel: convert SYSCALL and PGM_CHECK handlers to .quad
  s390/kernel: build a relocatable kernel
  ...
parents ccbc2e5e ce968f60
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3429,6 +3429,8 @@
				bridges without forcing it upstream. Note:
				this removes isolation between devices and
				may put more devices in an IOMMU group.
		force_floating	[S390] Force usage of floating interrupts.
		nomio		[S390] Do not use MIO instructions.

	pcie_aspm=	[PCIE] Forcibly enable or disable PCIe Active State Power
			Management.
+55 −1
Original line number Diff line number Diff line
@@ -143,6 +143,7 @@ config S390
	select HAVE_FUNCTION_TRACER
	select HAVE_FUTEX_CMPXCHG if FUTEX
	select HAVE_GCC_PLUGINS
	select HAVE_GENERIC_GUP
	select HAVE_KERNEL_BZIP2
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZ4
@@ -184,7 +185,6 @@ config S390
	select TTY
	select VIRT_CPU_ACCOUNTING
	select ARCH_HAS_SCALED_CPUTIME
	select VIRT_TO_BUS
	select HAVE_NMI


@@ -236,6 +236,7 @@ choice

config MARCH_Z900
	bool "IBM zSeries model z800 and z900"
	depends on !CC_IS_CLANG
	select HAVE_MARCH_Z900_FEATURES
	help
	  Select this to enable optimizations for model z800/z900 (2064 and
@@ -244,6 +245,7 @@ config MARCH_Z900

config MARCH_Z990
	bool "IBM zSeries model z890 and z990"
	depends on !CC_IS_CLANG
	select HAVE_MARCH_Z990_FEATURES
	help
	  Select this to enable optimizations for model z890/z990 (2084 and
@@ -252,6 +254,7 @@ config MARCH_Z990

config MARCH_Z9_109
	bool "IBM System z9"
	depends on !CC_IS_CLANG
	select HAVE_MARCH_Z9_109_FEATURES
	help
	  Select this to enable optimizations for IBM System z9 (2094 and
@@ -343,12 +346,15 @@ config TUNE_DEFAULT

config TUNE_Z900
	bool "IBM zSeries model z800 and z900"
	depends on !CC_IS_CLANG

config TUNE_Z990
	bool "IBM zSeries model z890 and z990"
	depends on !CC_IS_CLANG

config TUNE_Z9_109
	bool "IBM System z9"
	depends on !CC_IS_CLANG

config TUNE_Z10
	bool "IBM System z10"
@@ -384,6 +390,9 @@ config COMPAT
	  (and some other stuff like libraries and such) is needed for
	  executing 31 bit applications.  It is safe to say "Y".

config COMPAT_VDSO
	def_bool COMPAT && !CC_IS_CLANG

config SYSVIPC_COMPAT
	def_bool y if COMPAT && SYSVIPC

@@ -545,6 +554,17 @@ config ARCH_HAS_KEXEC_PURGATORY
	def_bool y
	depends on KEXEC_FILE

config KEXEC_VERIFY_SIG
	bool "Verify kernel signature during kexec_file_load() syscall"
	depends on KEXEC_FILE && SYSTEM_DATA_VERIFICATION
	help
	  This option makes kernel signature verification mandatory for
	  the kexec_file_load() syscall.

	  In addition to that option, you need to enable signature
	  verification for the corresponding kernel image type being
	  loaded in order for this to work.

config ARCH_RANDOM
	def_bool y
	prompt "s390 architectural random number generation API"
@@ -605,6 +625,29 @@ config EXPOLINE_FULL

endchoice

config RELOCATABLE
	bool "Build a relocatable kernel"
	select MODULE_REL_CRCS if MODVERSIONS
	default y
	help
	  This builds a kernel image that retains relocation information
	  so it can be loaded at an arbitrary address.
	  The kernel is linked as a position-independent executable (PIE)
	  and contains dynamic relocations which are processed early in the
	  bootup process.
	  The relocations make the kernel image about 15% larger (compressed
	  10%), but are discarded at runtime.

config RANDOMIZE_BASE
	bool "Randomize the address of the kernel image (KASLR)"
	depends on RELOCATABLE
	default y
	help
	  In support of Kernel Address Space Layout Randomization (KASLR),
	  this randomizes the address at which the kernel image is loaded,
	  as a security feature that deters exploit attempts relying on
	  knowledge of the location of kernel internals.

endmenu

menu "Memory setup"
@@ -833,6 +876,17 @@ config HAVE_PNETID

menu "Virtualization"

config PROTECTED_VIRTUALIZATION_GUEST
	def_bool n
	prompt "Protected virtualization guest support"
	help
	  Select this option, if you want to be able to run this
	  kernel as a protected virtualization KVM guest.
	  Protected virtualization capable machines have a mini hypervisor
	  located at machine level (an ultravisor). With help of the
	  Ultravisor, KVM will be able to run "protected" VMs, special
	  VMs whose memory and management data are unavailable to KVM.

config PFAULT
	def_bool y
	prompt "Pseudo page fault support"
+7 −3
Original line number Diff line number Diff line
@@ -16,10 +16,14 @@ KBUILD_AFLAGS_MODULE += -fPIC
KBUILD_CFLAGS_MODULE += -fPIC
KBUILD_AFLAGS	+= -m64
KBUILD_CFLAGS	+= -m64
ifeq ($(CONFIG_RELOCATABLE),y)
KBUILD_CFLAGS	+= -fPIE
LDFLAGS_vmlinux	:= -pie
endif
aflags_dwarf	:= -Wa,-gdwarf-2
KBUILD_AFLAGS_DECOMPRESSOR := -m64 -D__ASSEMBLY__
KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__
KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf))
KBUILD_CFLAGS_DECOMPRESSOR := -m64 -O2
KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2
KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float
KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables
@@ -111,7 +115,7 @@ endif
cfi := $(call as-instr,.cfi_startproc\n.cfi_val_offset 15$(comma)-160\n.cfi_endproc,-DCONFIG_AS_CFI_VAL_OFFSET=1)

KBUILD_CFLAGS	+= -mbackchain -msoft-float $(cflags-y)
KBUILD_CFLAGS	+= -pipe -fno-strength-reduce -Wno-sign-compare
KBUILD_CFLAGS	+= -pipe -Wno-sign-compare
KBUILD_CFLAGS	+= -fno-asynchronous-unwind-tables $(cfi)
KBUILD_AFLAGS	+= $(aflags-y) $(cfi)
export KBUILD_AFLAGS_DECOMPRESSOR
+21 −10
Original line number Diff line number Diff line
@@ -12,25 +12,35 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR)
KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR)

#
# Use -march=z900 for als.c to be able to print an error
# Use minimum architecture for als.c to be able to print an error
# message if the kernel is started on a machine which is too old
#
ifneq ($(CC_FLAGS_MARCH),-march=z900)
ifndef CONFIG_CC_IS_CLANG
CC_FLAGS_MARCH_MINIMUM := -march=z900
else
CC_FLAGS_MARCH_MINIMUM := -march=z10
endif

ifneq ($(CC_FLAGS_MARCH),$(CC_FLAGS_MARCH_MINIMUM))
AFLAGS_REMOVE_head.o		+= $(CC_FLAGS_MARCH)
AFLAGS_head.o			+= -march=z900
AFLAGS_head.o			+= $(CC_FLAGS_MARCH_MINIMUM)
AFLAGS_REMOVE_mem.o		+= $(CC_FLAGS_MARCH)
AFLAGS_mem.o			+= -march=z900
AFLAGS_mem.o			+= $(CC_FLAGS_MARCH_MINIMUM)
CFLAGS_REMOVE_als.o		+= $(CC_FLAGS_MARCH)
CFLAGS_als.o			+= -march=z900
CFLAGS_als.o			+= $(CC_FLAGS_MARCH_MINIMUM)
CFLAGS_REMOVE_sclp_early_core.o	+= $(CC_FLAGS_MARCH)
CFLAGS_sclp_early_core.o	+= -march=z900
CFLAGS_sclp_early_core.o	+= $(CC_FLAGS_MARCH_MINIMUM)
endif

CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char

obj-y	:= head.o als.o startup.o mem_detect.o ipl_parm.o string.o ebcdic.o
obj-y	+= sclp_early_core.o mem.o ipl_vmparm.o cmdline.o ctype.o
targets	:= bzImage startup.a section_cmp.boot.data $(obj-y)
obj-y	:= head.o als.o startup.o mem_detect.o ipl_parm.o ipl_report.o
obj-y	+= string.o ebcdic.o sclp_early_core.o mem.o ipl_vmparm.o cmdline.o
obj-y	+= ctype.o text_dma.o
obj-$(CONFIG_PROTECTED_VIRTUALIZATION_GUEST)	+= uv.o
obj-$(CONFIG_RELOCATABLE)	+= machine_kexec_reloc.o
obj-$(CONFIG_RANDOMIZE_BASE)	+= kaslr.o
targets	:= bzImage startup.a section_cmp.boot.data section_cmp.boot.preserved.data $(obj-y)
subdir-	:= compressed

OBJECTS := $(addprefix $(obj)/,$(obj-y))
@@ -48,7 +58,8 @@ define cmd_section_cmp
	touch $@
endef

$(obj)/bzImage: $(obj)/compressed/vmlinux $(obj)/section_cmp.boot.data FORCE
OBJCOPYFLAGS_bzImage := --pad-to $$(readelf -s $(obj)/compressed/vmlinux | awk '/\<_end\>/ {print or(strtonum("0x"$$2),4095)+1}')
$(obj)/bzImage: $(obj)/compressed/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.boot.preserved.data FORCE
	$(call if_changed,objcopy)

$(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static void facility_mismatch(void)
	print_machine_type();
	print_missing_facilities();
	sclp_early_printk("See Principles of Operations for facility bits\n");
	disabled_wait(0x8badcccc);
	disabled_wait();
}

void verify_facilities(void)
Loading