Commit 01d1dff6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more s390 updates from Vasily Gorbik:

 - Make stack unwinder reliable and suitable for livepatching. Add
   unwinder testing module.

 - Fixes for CALL_ON_STACK helper used for stack switching.

 - Fix unwinding from bpf code.

 - Fix getcpu and remove compat support in vdso code.

 - Fix address space control registers initialization.

 - Save KASLR offset for early dumps.

 - Handle new FILTERED_BY_HYPERVISOR reply code in crypto code.

 - Minor perf code cleanup and potential memory leak fix.

 - Add couple of error messages for corner cases during PCI device
   creation.

* tag 's390-5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (33 commits)
  s390: remove compat vdso code
  s390/livepatch: Implement reliable stack tracing for the consistency model
  s390/unwind: add stack pointer alignment sanity checks
  s390/unwind: filter out unreliable bogus %r14
  s390/unwind: start unwinding from reliable state
  s390/test_unwind: add program check context tests
  s390/test_unwind: add irq context tests
  s390/test_unwind: print verbose unwinding results
  s390/test_unwind: add CALL_ON_STACK tests
  s390: fix register clobbering in CALL_ON_STACK
  s390/test_unwind: require that unwinding ended successfully
  s390/unwind: add a test for the internal API
  s390/unwind: always inline get_stack_pointer
  s390/pci: add error message on device number limit
  s390/pci: add error message for UID collision
  s390/cpum_sf: Check for SDBT and SDB consistency
  s390/cpum_sf: Use TEAR_REG macro consistantly
  s390/cpum_sf: Remove unnecessary check for pending SDBs
  s390/cpum_sf: Replace function name in debug statements
  s390/kaslr: store KASLR offset for early dumps
  ...
parents 4d7048f5 2115fbf7
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ config S390
	select HAVE_PERF_EVENTS
	select HAVE_RCU_TABLE_FREE
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RELIABLE_STACKTRACE
	select HAVE_RSEQ
	select HAVE_SYSCALL_TRACEPOINTS
	select HAVE_VIRT_CPU_ACCOUNTING
@@ -426,9 +427,6 @@ 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

@@ -1018,3 +1016,17 @@ config S390_GUEST
	  the KVM hypervisor.

endmenu

menu "Selftests"

config S390_UNWIND_SELFTEST
	def_tristate n
	prompt "Test unwind functions"
	help
	  This option enables s390 specific stack unwinder testing kernel
	  module. This option is not useful for distributions or general
	  kernels, but only for kernel developers working on architecture code.

	  Say N if you are unsure.

endmenu
+0 −1
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@ zfcpdump:

vdso_install:
	$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
	$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@

archclean:
	$(Q)$(MAKE) $(clean)=$(boot)
+5 −0
Original line number Diff line number Diff line
@@ -170,6 +170,11 @@ void startup_kernel(void)
		handle_relocs(__kaslr_offset);

	if (__kaslr_offset) {
		/*
		 * Save KASLR offset for early dumps, before vmcore_info is set.
		 * Mark as uneven to distinguish from real vmcore_info pointer.
		 */
		S390_lowcore.vmcore_info = __kaslr_offset | 0x1UL;
		/* Clear non-relocated kernel */
		if (IS_ENABLED(CONFIG_KERNEL_UNCOMPRESSED))
			memset(img, 0, vmlinux.image_size);
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ static inline unsigned long *trailer_entry_ptr(unsigned long v)
	return (unsigned long *) ret;
}

/* Return if the entry in the sample data block table (sdbt)
/* Return true if the entry in the sample data block table (sdbt)
 * is a link to the next sdbt */
static inline int is_link_entry(unsigned long *s)
{
+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <linux/perf_event.h>
#include <linux/device.h>
#include <asm/stacktrace.h>

/* Per-CPU flags for PMU states */
#define PMU_F_RESERVED			0x1000
@@ -73,4 +74,10 @@ struct perf_sf_sde_regs {
#define SDB_FULL_BLOCKS(hwc)	(SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FULL_BLOCKS)
#define SAMPLE_FREQ_MODE(hwc)	(SAMPL_FLAGS(hwc) & PERF_CPUM_SF_FREQ_MODE)

#define perf_arch_fetch_caller_regs(regs, __ip) do {			\
	(regs)->psw.addr = (__ip);					\
	(regs)->gprs[15] = (unsigned long)__builtin_frame_address(0) -	\
		offsetof(struct stack_frame, back_chain);		\
} while (0)

#endif /* _ASM_S390_PERF_EVENT_H */
Loading