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

 - Improved access control for the zcrypt driver, multiple device nodes
   can now be created with different access control lists

 - Extend the pkey API to provide random protected keys, this is useful
   for encrypted swap device with ephemeral protected keys

 - Add support for virtually mapped kernel stacks

 - Rework the early boot code, this moves the memory detection into the
   boot code that runs prior to decompression.

 - Add KASAN support

 - Bug fixes and cleanups

* tag 's390-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (83 commits)
  s390/pkey: move pckmo subfunction available checks away from module init
  s390/kasan: support preemptible kernel build
  s390/pkey: Load pkey kernel module automatically
  s390/perf: Return error when debug_register fails
  s390/sthyi: Fix machine name validity indication
  s390/zcrypt: fix broken zcrypt_send_cprb in-kernel api function
  s390/vmalloc: fix VMALLOC_START calculation
  s390/mem_detect: add missing include
  s390/dumpstack: print psw mask and address again
  s390/crypto: Enhance paes cipher to accept variable length key material
  s390/pkey: Introduce new API for transforming key blobs
  s390/pkey: Introduce new API for random protected key verification
  s390/pkey: Add sysfs attributes to emit secure key blobs
  s390/pkey: Add sysfs attributes to emit protected key blobs
  s390/pkey: Define protected key blob format
  s390/pkey: Introduce new API for random protected key generation
  s390/zcrypt: add ap_adapter_mask sysfs attribute
  s390/zcrypt: provide apfs failure code on type 86 error reply
  s390/zcrypt: zcrypt device driver cleanup
  s390/kasan: add support for mem= kernel parameter
  ...
parents 70408a99 f822ad2c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -56,6 +56,12 @@ config PCI_QUIRKS
config ARCH_SUPPORTS_UPROBES
	def_bool y

config KASAN_SHADOW_OFFSET
	hex
	depends on KASAN
	default 0x18000000000000 if KASAN_S390_4_LEVEL_PAGING
	default 0x30000000000

config S390
	def_bool y
	select ARCH_BINFMT_ELF_STATE
@@ -120,11 +126,13 @@ config S390
	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_JUMP_LABEL
	select HAVE_ARCH_KASAN
	select CPU_NO_EFFICIENT_FFS if !HAVE_MARCH_Z9_109_FEATURES
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_ARCH_SOFT_DIRTY
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
	select HAVE_ARCH_VMAP_STACK
	select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES
	select HAVE_CMPXCHG_DOUBLE
	select HAVE_CMPXCHG_LOCAL
@@ -649,6 +657,7 @@ config PACK_STACK

config CHECK_STACK
	def_bool y
	depends on !VMAP_STACK
	prompt "Detect kernel stack overflow"
	help
	  This option enables the compiler option -mstack-guard and
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding)
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
UTS_MACHINE	:= s390x
STACK_SIZE	:= 16384
STACK_SIZE	:= $(if $(CONFIG_KASAN),32768,16384)
CHECKFLAGS	+= -D__s390__ -D__s390x__

export LD_BFD
+23 −10
Original line number Diff line number Diff line
@@ -137,6 +137,14 @@ static void appldata_work_fn(struct work_struct *work)
	mutex_unlock(&appldata_ops_mutex);
}

static struct appldata_product_id appldata_id = {
	.prod_nr    = {0xD3, 0xC9, 0xD5, 0xE4,
		       0xE7, 0xD2, 0xD9},	/* "LINUXKR" */
	.prod_fn    = 0xD5D3,			/* "NL" */
	.version_nr = 0xF2F6,			/* "26" */
	.release_nr = 0xF0F1,			/* "01" */
};

/*
 * appldata_diag()
 *
@@ -145,17 +153,22 @@ static void appldata_work_fn(struct work_struct *work)
int appldata_diag(char record_nr, u16 function, unsigned long buffer,
			u16 length, char *mod_lvl)
{
	struct appldata_product_id id = {
		.prod_nr    = {0xD3, 0xC9, 0xD5, 0xE4,
			       0xE7, 0xD2, 0xD9},	/* "LINUXKR" */
		.prod_fn    = 0xD5D3,			/* "NL" */
		.version_nr = 0xF2F6,			/* "26" */
		.release_nr = 0xF0F1,			/* "01" */
	};
	struct appldata_parameter_list *parm_list;
	struct appldata_product_id *id;
	int rc;

	id.record_nr = record_nr;
	id.mod_lvl = (mod_lvl[0]) << 8 | mod_lvl[1];
	return appldata_asm(&id, function, (void *) buffer, length);
	parm_list = kmalloc(sizeof(*parm_list), GFP_KERNEL);
	id = kmemdup(&appldata_id, sizeof(appldata_id), GFP_KERNEL);
	rc = -ENOMEM;
	if (parm_list && id) {
		id->record_nr = record_nr;
		id->mod_lvl = (mod_lvl[0]) << 8 | mod_lvl[1];
		rc = appldata_asm(parm_list, id, function,
				  (void *) buffer, length);
	}
	kfree(id);
	kfree(parm_list);
	return rc;
}
/************************ timer, work, DIAG <END> ****************************/

+1 −0
Original line number Diff line number Diff line
image
bzImage
section_cmp.*
+21 −3
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
KCOV_INSTRUMENT := n
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KASAN_SANITIZE := n

KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR)
KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR)
@@ -27,15 +28,32 @@ endif

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

obj-y	:= head.o als.o ebcdic.o sclp_early_core.o mem.o
targets	:= bzImage startup.a $(obj-y)
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)
subdir-	:= compressed

OBJECTS := $(addprefix $(obj)/,$(obj-y))

$(obj)/bzImage: $(obj)/compressed/vmlinux FORCE
quiet_cmd_section_cmp = SECTCMP $*
define cmd_section_cmp
	s1=`$(OBJDUMP) -t -j "$*" "$<" | sort | \
		sed -n "/0000000000000000/! s/.*\s$*\s\+//p" | sha256sum`; \
	s2=`$(OBJDUMP) -t -j "$*" "$(word 2,$^)" | sort | \
		sed -n "/0000000000000000/! s/.*\s$*\s\+//p" | sha256sum`; \
	if [ "$$s1" != "$$s2" ]; then \
		echo "error: section $* differs between $< and $(word 2,$^)" >&2; \
		exit 1; \
	fi; \
	touch $@
endef

$(obj)/bzImage: $(obj)/compressed/vmlinux $(obj)/section_cmp.boot.data FORCE
	$(call if_changed,objcopy)

$(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE
	$(call if_changed,section_cmp)

$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE
	$(Q)$(MAKE) $(build)=$(obj)/compressed $@

Loading