Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68e37028 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 updates from Martin Schwidefsky:
 - wire up the system calls seccomp, getrandom and memfd_create
 - use static system information as input to add_device_randomness
 - .. and three bug fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/sclp: remove unnecessary XTABS flag
  s390/3215: fix tty output containing tabs
  s390: wire up memfd_create syscall
  s390: add system information as device randomness
  s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL
  s390: wire up seccomp and getrandom syscalls
parents ac490f4d b8a2bbdf
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -283,7 +283,10 @@
#define __NR_sched_setattr	345
#define __NR_sched_getattr	346
#define __NR_renameat2		347
#define NR_syscalls 348
#define __NR_seccomp		348
#define __NR_getrandom		349
#define __NR_memfd_create	350
#define NR_syscalls 351

/* 
 * There are some system calls that are not present on 64 bit, some
+3 −0
Original line number Diff line number Diff line
@@ -214,3 +214,6 @@ COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, fla
COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags);
COMPAT_SYSCALL_WRAP4(sched_getattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, size, unsigned int, flags);
COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags);
COMPAT_SYSCALL_WRAP3(seccomp, unsigned int, op, unsigned int, flags, const char __user *, uargs)
COMPAT_SYSCALL_WRAP3(getrandom, char __user *, buf, size_t, count, unsigned int, flags)
COMPAT_SYSCALL_WRAP2(memfd_create, const char __user *, uname, unsigned int, flags)
+7 −0
Original line number Diff line number Diff line
@@ -2060,6 +2060,13 @@ void s390_reset_system(void (*func)(void *), void *data)
	S390_lowcore.program_new_psw.addr =
		PSW_ADDR_AMODE | (unsigned long) s390_base_pgm_handler;

	/*
	 * Clear subchannel ID and number to signal new kernel that no CCW or
	 * SCSI IPL has been done (for kexec and kdump)
	 */
	S390_lowcore.subchannel_id = 0;
	S390_lowcore.subchannel_nr = 0;

	/* Store status at absolute zero */
	store_status();

+19 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/random.h>
#include <linux/user.h>
#include <linux/tty.h>
#include <linux/ioport.h>
@@ -61,6 +62,7 @@
#include <asm/diag.h>
#include <asm/os_info.h>
#include <asm/sclp.h>
#include <asm/sysinfo.h>
#include "entry.h"

/*
@@ -766,6 +768,7 @@ static void __init setup_hwcaps(void)
#endif

	get_cpu_id(&cpu_id);
	add_device_randomness(&cpu_id, sizeof(cpu_id));
	switch (cpu_id.machine) {
	case 0x9672:
#if !defined(CONFIG_64BIT)
@@ -803,6 +806,19 @@ static void __init setup_hwcaps(void)
	}
}

/*
 * Add system information as device randomness
 */
static void __init setup_randomness(void)
{
	struct sysinfo_3_2_2 *vmms;

	vmms = (struct sysinfo_3_2_2 *) alloc_page(GFP_KERNEL);
	if (vmms && stsi(vmms, 3, 2, 2) == 0 && vmms->count)
		add_device_randomness(&vmms, vmms->count);
	free_page((unsigned long) vmms);
}

/*
 * Setup function called from init/main.c just after the banner
 * was printed.
@@ -901,6 +917,9 @@ void __init setup_arch(char **cmdline_p)

	/* Setup zfcpdump support */
	setup_zfcpdump();

	/* Add system specific data to the random pool */
	setup_randomness();
}

#ifdef CONFIG_32BIT
+3 −0
Original line number Diff line number Diff line
@@ -356,3 +356,6 @@ SYSCALL(sys_finit_module,sys_finit_module,compat_sys_finit_module)
SYSCALL(sys_sched_setattr,sys_sched_setattr,compat_sys_sched_setattr) /* 345 */
SYSCALL(sys_sched_getattr,sys_sched_getattr,compat_sys_sched_getattr)
SYSCALL(sys_renameat2,sys_renameat2,compat_sys_renameat2)
SYSCALL(sys_seccomp,sys_seccomp,compat_sys_seccomp)
SYSCALL(sys_getrandom,sys_getrandom,compat_sys_getrandom)
SYSCALL(sys_memfd_create,sys_memfd_create,compat_sys_memfd_create) /* 350 */
Loading