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

Commit d645727b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (30 commits)
  [S390] wire up sys_perf_counter_open
  [S390] wire up sys_rt_tgsigqueueinfo
  [S390] ftrace: add system call tracer support
  [S390] ftrace: add function graph tracer support
  [S390] ftrace: add function trace mcount test support
  [S390] ftrace: add dynamic ftrace support
  [S390] kprobes: use probe_kernel_write
  [S390] maccess: arch specific probe_kernel_write() implementation
  [S390] maccess: add weak attribute to probe_kernel_write
  [S390] profile_tick called twice
  [S390] dasd: forward internal errors to dasd_sleep_on caller
  [S390] dasd: sync after async probe
  [S390] dasd: check_characteristics cleanup
  [S390] dasd: no High Performance FICON in 31-bit mode
  [S390] dcssblk: revert devt conversion
  [S390] qdio: fix access beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs
  [S390] vmalloc: add vmalloc kernel parameter support
  [S390] uaccess: use might_fault() instead of might_sleep()
  [S390] 3270: lock dependency fixes
  [S390] 3270: do not register with tty_register_device
  ...
parents cd166bd0 310d6b67
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -82,6 +82,11 @@ config S390
	select USE_GENERIC_SMP_HELPERS if SMP
	select HAVE_SYSCALL_WRAPPERS
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_TRACE_MCOUNT_TEST
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FTRACE_SYSCALLS
	select HAVE_DYNAMIC_FTRACE
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_DEFAULT_NO_SPIN_MUTEXES
	select HAVE_OPROFILE
	select HAVE_KPROBES
@@ -567,6 +572,24 @@ bool "s390 guest support for KVM (EXPERIMENTAL)"
	  the KVM hypervisor. This will add detection for KVM as well  as a
	  virtio transport. If KVM is detected, the virtio console will be
	  the default console.

config SECCOMP
	bool "Enable seccomp to safely compute untrusted bytecode"
	depends on PROC_FS
	default y
	help
	  This kernel feature is useful for number crunching applications
	  that may need to compute untrusted bytecode during their
	  execution. By using pipes or other transports made available to
	  the process as file descriptors supporting the read/write
	  syscalls, it's possible to isolate those applications in
	  their own address space using seccomp. Once seccomp is
	  enabled via /proc/<pid>/seccomp, it cannot be disabled
	  and the task is only allowed to execute a few safe syscalls
	  defined by each seccomp mode.

	  If unsure, say Y.

endmenu

source "net/Kconfig"
+18 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
 */
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/thread_info.h>

#define PSW32_MASK_PER		0x40000000UL
#define PSW32_MASK_DAT		0x04000000UL
@@ -163,12 +164,28 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr)
	return (u32)(unsigned long)uptr;
}

#ifdef CONFIG_COMPAT

static inline int is_compat_task(void)
{
	return test_thread_flag(TIF_31BIT);
}

#else

static inline int is_compat_task(void)
{
	return 0;
}

#endif

static inline void __user *compat_alloc_user_space(long len)
{
	unsigned long stack;

	stack = KSTK_ESP(current);
	if (test_thread_flag(TIF_31BIT))
	if (is_compat_task())
		stack &= 0x7fffffffUL;
	return (void __user *) (stack - len);
}

arch/s390/include/asm/cpu.h

deleted100644 → 0
+0 −32
Original line number Diff line number Diff line
/*
 *  include/asm-s390/cpu.h
 *
 *    Copyright IBM Corp. 2007
 *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
 */

#ifndef _ASM_S390_CPU_H_
#define _ASM_S390_CPU_H_

#include <linux/types.h>
#include <linux/percpu.h>
#include <linux/spinlock.h>

struct s390_idle_data {
	spinlock_t lock;
	unsigned long long idle_count;
	unsigned long long idle_enter;
	unsigned long long idle_time;
};

DECLARE_PER_CPU(struct s390_idle_data, s390_idle);

void vtime_start_cpu(void);

static inline void s390_idle_check(void)
{
	if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL)
		vtime_start_cpu();
}

#endif /* _ASM_S390_CPU_H_ */
+19 −0
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@
#ifndef _S390_CPUTIME_H
#define _S390_CPUTIME_H

#include <linux/types.h>
#include <linux/percpu.h>
#include <linux/spinlock.h>
#include <asm/div64.h>

/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */
@@ -174,8 +177,24 @@ cputime64_to_clock_t(cputime64_t cputime)
       return __div(cputime, 4096000000ULL / USER_HZ);
}

struct s390_idle_data {
	spinlock_t lock;
	unsigned long long idle_count;
	unsigned long long idle_enter;
	unsigned long long idle_time;
};

DECLARE_PER_CPU(struct s390_idle_data, s390_idle);

void vtime_start_cpu(void);
cputime64_t s390_get_idle_time(int cpu);

#define arch_idle_time(cpu) s390_get_idle_time(cpu)

static inline void s390_idle_check(void)
{
	if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL)
		vtime_start_cpu();
}

#endif /* _S390_CPUTIME_H */
+21 −0
Original line number Diff line number Diff line
@@ -2,7 +2,28 @@
#define _ASM_S390_FTRACE_H

#ifndef __ASSEMBLY__

extern void _mcount(void);
extern unsigned long ftrace_dyn_func;

struct dyn_arch_ftrace { };

#define MCOUNT_ADDR ((long)_mcount)

#ifdef CONFIG_64BIT
#define MCOUNT_OFFSET_RET 18
#define MCOUNT_INSN_SIZE  24
#define MCOUNT_OFFSET	  14
#else
#define MCOUNT_OFFSET_RET 26
#define MCOUNT_INSN_SIZE  30
#define MCOUNT_OFFSET	   8
#endif

static inline unsigned long ftrace_call_adjust(unsigned long addr)
{
	return addr - MCOUNT_OFFSET;
}

#endif /* __ASSEMBLY__ */
#endif /* _ASM_S390_FTRACE_H */
Loading