diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-11 13:09:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-11 13:09:59 -0400 |
commit | f43a64c5e1a65d12b9b53a35ed2d5db441fcb64c (patch) | |
tree | 64e83b3cce9d8e659a48cd706c59c09dc183b6dc | |
parent | 5c23804a0941a111752fdacefe0bea2db1b4d93f (diff) | |
parent | f7ceba360cce9af3fbc4e5a5b1bd40b570b7021c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
-rw-r--r-- | arch/sparc/kernel/systbls.S | 4 | ||||
-rw-r--r-- | arch/sparc64/Kconfig | 17 | ||||
-rw-r--r-- | arch/sparc64/kernel/entry.S | 42 | ||||
-rw-r--r-- | arch/sparc64/kernel/power.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/ptrace.c | 46 | ||||
-rw-r--r-- | arch/sparc64/kernel/smp.c | 10 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/sys32.S | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/systbls.S | 8 | ||||
-rw-r--r-- | arch/sparc64/kernel/time.c | 24 | ||||
-rw-r--r-- | arch/sparc64/kernel/vmlinux.lds.S | 2 | ||||
-rw-r--r-- | arch/sparc64/mm/fault.c | 16 | ||||
-rw-r--r-- | arch/sparc64/solaris/entry64.S | 7 | ||||
-rw-r--r-- | include/asm-sparc/unistd.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/thread_info.h | 11 | ||||
-rw-r--r-- | include/asm-sparc64/unistd.h | 4 | ||||
-rw-r--r-- | include/linux/audit.h | 2 | ||||
-rw-r--r-- | include/linux/cache.h | 2 | ||||
-rw-r--r-- | init/Kconfig | 2 |
19 files changed, 111 insertions, 97 deletions
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 928ffeb0fabb..025f4516e651 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -57,11 +57,11 @@ sys_call_table: | |||
57 | /*180*/ .long sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_sigpending, sys_ni_syscall | 57 | /*180*/ .long sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_sigpending, sys_ni_syscall |
58 | /*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname | 58 | /*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname |
59 | /*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl | 59 | /*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl |
60 | /*195*/ .long sys_epoll_wait, sys_nis_syscall, sys_getppid, sparc_sigaction, sys_sgetmask | 60 | /*195*/ .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sparc_sigaction, sys_sgetmask |
61 | /*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, old_readdir | 61 | /*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, old_readdir |
62 | /*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 | 62 | /*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 |
63 | /*210*/ .long sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo | 63 | /*210*/ .long sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo |
64 | /*215*/ .long sys_ipc, sys_sigreturn, sys_clone, sys_nis_syscall, sys_adjtimex | 64 | /*215*/ .long sys_ipc, sys_sigreturn, sys_clone, sys_ioprio_get, sys_adjtimex |
65 | /*220*/ .long sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid | 65 | /*220*/ .long sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid |
66 | /*225*/ .long sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16 | 66 | /*225*/ .long sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16 |
67 | /*230*/ .long sys_select, sys_time, sys_nis_syscall, sys_stime, sys_statfs64 | 67 | /*230*/ .long sys_select, sys_time, sys_nis_syscall, sys_stime, sys_statfs64 |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 4b1329286242..6a4733683f0f 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -43,6 +43,23 @@ config SPARC64_PAGE_SIZE_4MB | |||
43 | 43 | ||
44 | endchoice | 44 | endchoice |
45 | 45 | ||
46 | config SECCOMP | ||
47 | bool "Enable seccomp to safely compute untrusted bytecode" | ||
48 | depends on PROC_FS | ||
49 | default y | ||
50 | help | ||
51 | This kernel feature is useful for number crunching applications | ||
52 | that may need to compute untrusted bytecode during their | ||
53 | execution. By using pipes or other transports made available to | ||
54 | the process as file descriptors supporting the read/write | ||
55 | syscalls, it's possible to isolate those applications in | ||
56 | their own address space using seccomp. Once seccomp is | ||
57 | enabled via /proc/<pid>/seccomp, it cannot be disabled | ||
58 | and the task is only allowed to execute a few safe syscalls | ||
59 | defined by each seccomp mode. | ||
60 | |||
61 | If unsure, say Y. Only embedded should say N here. | ||
62 | |||
46 | source kernel/Kconfig.hz | 63 | source kernel/Kconfig.hz |
47 | 64 | ||
48 | source "init/Kconfig" | 65 | source "init/Kconfig" |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index d3973d8a7195..d781f10adc52 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -22,8 +22,6 @@ | |||
22 | #include <asm/estate.h> | 22 | #include <asm/estate.h> |
23 | #include <asm/auxio.h> | 23 | #include <asm/auxio.h> |
24 | 24 | ||
25 | /* #define SYSCALL_TRACING 1 */ | ||
26 | |||
27 | #define curptr g6 | 25 | #define curptr g6 |
28 | 26 | ||
29 | #define NR_SYSCALLS 284 /* Each OS is different... */ | 27 | #define NR_SYSCALLS 284 /* Each OS is different... */ |
@@ -1554,11 +1552,12 @@ sys_ptrace: add %sp, PTREGS_OFF, %o0 | |||
1554 | nop | 1552 | nop |
1555 | .align 32 | 1553 | .align 32 |
1556 | 1: ldx [%curptr + TI_FLAGS], %l5 | 1554 | 1: ldx [%curptr + TI_FLAGS], %l5 |
1557 | andcc %l5, _TIF_SYSCALL_TRACE, %g0 | 1555 | andcc %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 |
1558 | be,pt %icc, rtrap | 1556 | be,pt %icc, rtrap |
1559 | clr %l6 | 1557 | clr %l6 |
1558 | add %sp, PTREGS_OFF, %o0 | ||
1560 | call syscall_trace | 1559 | call syscall_trace |
1561 | nop | 1560 | mov 1, %o1 |
1562 | 1561 | ||
1563 | ba,pt %xcc, rtrap | 1562 | ba,pt %xcc, rtrap |
1564 | clr %l6 | 1563 | clr %l6 |
@@ -1642,18 +1641,20 @@ linux_sparc_ni_syscall: | |||
1642 | or %l7, %lo(sys_ni_syscall), %l7 | 1641 | or %l7, %lo(sys_ni_syscall), %l7 |
1643 | 1642 | ||
1644 | linux_syscall_trace32: | 1643 | linux_syscall_trace32: |
1644 | add %sp, PTREGS_OFF, %o0 | ||
1645 | call syscall_trace | 1645 | call syscall_trace |
1646 | nop | 1646 | clr %o1 |
1647 | srl %i0, 0, %o0 | 1647 | srl %i0, 0, %o0 |
1648 | mov %i4, %o4 | 1648 | srl %i4, 0, %o4 |
1649 | srl %i1, 0, %o1 | 1649 | srl %i1, 0, %o1 |
1650 | srl %i2, 0, %o2 | 1650 | srl %i2, 0, %o2 |
1651 | b,pt %xcc, 2f | 1651 | b,pt %xcc, 2f |
1652 | srl %i3, 0, %o3 | 1652 | srl %i3, 0, %o3 |
1653 | 1653 | ||
1654 | linux_syscall_trace: | 1654 | linux_syscall_trace: |
1655 | add %sp, PTREGS_OFF, %o0 | ||
1655 | call syscall_trace | 1656 | call syscall_trace |
1656 | nop | 1657 | clr %o1 |
1657 | mov %i0, %o0 | 1658 | mov %i0, %o0 |
1658 | mov %i1, %o1 | 1659 | mov %i1, %o1 |
1659 | mov %i2, %o2 | 1660 | mov %i2, %o2 |
@@ -1671,11 +1672,6 @@ linux_sparc_syscall32: | |||
1671 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | 1672 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI |
1672 | srl %i0, 0, %o0 ! IEU0 | 1673 | srl %i0, 0, %o0 ! IEU0 |
1673 | sll %g1, 2, %l4 ! IEU0 Group | 1674 | sll %g1, 2, %l4 ! IEU0 Group |
1674 | #ifdef SYSCALL_TRACING | ||
1675 | call syscall_trace_entry | ||
1676 | add %sp, PTREGS_OFF, %o0 | ||
1677 | srl %i0, 0, %o0 | ||
1678 | #endif | ||
1679 | srl %i4, 0, %o4 ! IEU1 | 1675 | srl %i4, 0, %o4 ! IEU1 |
1680 | lduw [%l7 + %l4], %l7 ! Load | 1676 | lduw [%l7 + %l4], %l7 ! Load |
1681 | srl %i1, 0, %o1 ! IEU0 Group | 1677 | srl %i1, 0, %o1 ! IEU0 Group |
@@ -1683,7 +1679,7 @@ linux_sparc_syscall32: | |||
1683 | 1679 | ||
1684 | srl %i5, 0, %o5 ! IEU1 | 1680 | srl %i5, 0, %o5 ! IEU1 |
1685 | srl %i2, 0, %o2 ! IEU0 Group | 1681 | srl %i2, 0, %o2 ! IEU0 Group |
1686 | andcc %l0, _TIF_SYSCALL_TRACE, %g0 ! IEU0 Group | 1682 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 |
1687 | bne,pn %icc, linux_syscall_trace32 ! CTI | 1683 | bne,pn %icc, linux_syscall_trace32 ! CTI |
1688 | mov %i0, %l5 ! IEU1 | 1684 | mov %i0, %l5 ! IEU1 |
1689 | call %l7 ! CTI Group brk forced | 1685 | call %l7 ! CTI Group brk forced |
@@ -1699,11 +1695,6 @@ linux_sparc_syscall: | |||
1699 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI | 1695 | bgeu,pn %xcc, linux_sparc_ni_syscall ! CTI |
1700 | mov %i0, %o0 ! IEU0 | 1696 | mov %i0, %o0 ! IEU0 |
1701 | sll %g1, 2, %l4 ! IEU0 Group | 1697 | sll %g1, 2, %l4 ! IEU0 Group |
1702 | #ifdef SYSCALL_TRACING | ||
1703 | call syscall_trace_entry | ||
1704 | add %sp, PTREGS_OFF, %o0 | ||
1705 | mov %i0, %o0 | ||
1706 | #endif | ||
1707 | mov %i1, %o1 ! IEU1 | 1698 | mov %i1, %o1 ! IEU1 |
1708 | lduw [%l7 + %l4], %l7 ! Load | 1699 | lduw [%l7 + %l4], %l7 ! Load |
1709 | 4: mov %i2, %o2 ! IEU0 Group | 1700 | 4: mov %i2, %o2 ! IEU0 Group |
@@ -1711,7 +1702,7 @@ linux_sparc_syscall: | |||
1711 | 1702 | ||
1712 | mov %i3, %o3 ! IEU1 | 1703 | mov %i3, %o3 ! IEU1 |
1713 | mov %i4, %o4 ! IEU0 Group | 1704 | mov %i4, %o4 ! IEU0 Group |
1714 | andcc %l0, _TIF_SYSCALL_TRACE, %g0 ! IEU1 Group+1 bubble | 1705 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %g0 |
1715 | bne,pn %icc, linux_syscall_trace ! CTI Group | 1706 | bne,pn %icc, linux_syscall_trace ! CTI Group |
1716 | mov %i0, %l5 ! IEU0 | 1707 | mov %i0, %l5 ! IEU0 |
1717 | 2: call %l7 ! CTI Group brk forced | 1708 | 2: call %l7 ! CTI Group brk forced |
@@ -1720,12 +1711,6 @@ linux_sparc_syscall: | |||
1720 | 1711 | ||
1721 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 1712 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
1722 | ret_sys_call: | 1713 | ret_sys_call: |
1723 | #ifdef SYSCALL_TRACING | ||
1724 | mov %o0, %o1 | ||
1725 | call syscall_trace_exit | ||
1726 | add %sp, PTREGS_OFF, %o0 | ||
1727 | mov %o1, %o0 | ||
1728 | #endif | ||
1729 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 | 1714 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 |
1730 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc | 1715 | ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc |
1731 | sra %o0, 0, %o0 | 1716 | sra %o0, 0, %o0 |
@@ -1745,7 +1730,7 @@ ret_sys_call: | |||
1745 | 1: | 1730 | 1: |
1746 | cmp %o0, -ERESTART_RESTARTBLOCK | 1731 | cmp %o0, -ERESTART_RESTARTBLOCK |
1747 | bgeu,pn %xcc, 1f | 1732 | bgeu,pn %xcc, 1f |
1748 | andcc %l0, _TIF_SYSCALL_TRACE, %l6 | 1733 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 |
1749 | 80: | 1734 | 80: |
1750 | /* System call success, clear Carry condition code. */ | 1735 | /* System call success, clear Carry condition code. */ |
1751 | andn %g3, %g2, %g3 | 1736 | andn %g3, %g2, %g3 |
@@ -1760,7 +1745,7 @@ ret_sys_call: | |||
1760 | /* System call failure, set Carry condition code. | 1745 | /* System call failure, set Carry condition code. |
1761 | * Also, get abs(errno) to return to the process. | 1746 | * Also, get abs(errno) to return to the process. |
1762 | */ | 1747 | */ |
1763 | andcc %l0, _TIF_SYSCALL_TRACE, %l6 | 1748 | andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 |
1764 | sub %g0, %o0, %o0 | 1749 | sub %g0, %o0, %o0 |
1765 | or %g3, %g2, %g3 | 1750 | or %g3, %g2, %g3 |
1766 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 1751 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
@@ -1773,8 +1758,9 @@ ret_sys_call: | |||
1773 | b,pt %xcc, rtrap | 1758 | b,pt %xcc, rtrap |
1774 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | 1759 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] |
1775 | linux_syscall_trace2: | 1760 | linux_syscall_trace2: |
1761 | add %sp, PTREGS_OFF, %o0 | ||
1776 | call syscall_trace | 1762 | call syscall_trace |
1777 | nop | 1763 | mov 1, %o1 |
1778 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] | 1764 | stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC] |
1779 | ba,pt %xcc, rtrap | 1765 | ba,pt %xcc, rtrap |
1780 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] | 1766 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] |
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c index 52f14e399b1c..533104c7907d 100644 --- a/arch/sparc64/kernel/power.c +++ b/arch/sparc64/kernel/power.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define __KERNEL_SYSCALLS__ | ||
8 | |||
7 | #include <linux/config.h> | 9 | #include <linux/config.h> |
8 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 11 | #include <linux/module.h> |
@@ -17,7 +19,6 @@ | |||
17 | #include <asm/ebus.h> | 19 | #include <asm/ebus.h> |
18 | #include <asm/auxio.h> | 20 | #include <asm/auxio.h> |
19 | 21 | ||
20 | #define __KERNEL_SYSCALLS__ | ||
21 | #include <linux/unistd.h> | 22 | #include <linux/unistd.h> |
22 | 23 | ||
23 | /* | 24 | /* |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index 80a76e2ad732..23ad839d113f 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/security.h> | 21 | #include <linux/security.h> |
22 | #include <linux/seccomp.h> | ||
23 | #include <linux/audit.h> | ||
22 | #include <linux/signal.h> | 24 | #include <linux/signal.h> |
23 | 25 | ||
24 | #include <asm/asi.h> | 26 | #include <asm/asi.h> |
@@ -628,15 +630,27 @@ out: | |||
628 | unlock_kernel(); | 630 | unlock_kernel(); |
629 | } | 631 | } |
630 | 632 | ||
631 | asmlinkage void syscall_trace(void) | 633 | asmlinkage void syscall_trace(struct pt_regs *regs, int syscall_exit_p) |
632 | { | 634 | { |
633 | #ifdef DEBUG_PTRACE | 635 | /* do the secure computing check first */ |
634 | printk("%s [%d]: syscall_trace\n", current->comm, current->pid); | 636 | secure_computing(regs->u_regs[UREG_G1]); |
635 | #endif | 637 | |
636 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 638 | if (unlikely(current->audit_context) && syscall_exit_p) { |
637 | return; | 639 | unsigned long tstate = regs->tstate; |
640 | int result = AUDITSC_SUCCESS; | ||
641 | |||
642 | if (unlikely(tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) | ||
643 | result = AUDITSC_FAILURE; | ||
644 | |||
645 | audit_syscall_exit(current, result, regs->u_regs[UREG_I0]); | ||
646 | } | ||
647 | |||
638 | if (!(current->ptrace & PT_PTRACED)) | 648 | if (!(current->ptrace & PT_PTRACED)) |
639 | return; | 649 | goto out; |
650 | |||
651 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||
652 | goto out; | ||
653 | |||
640 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 654 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) |
641 | ? 0x80 : 0)); | 655 | ? 0x80 : 0)); |
642 | 656 | ||
@@ -645,12 +659,20 @@ asmlinkage void syscall_trace(void) | |||
645 | * for normal use. strace only continues with a signal if the | 659 | * for normal use. strace only continues with a signal if the |
646 | * stopping signal is not SIGTRAP. -brl | 660 | * stopping signal is not SIGTRAP. -brl |
647 | */ | 661 | */ |
648 | #ifdef DEBUG_PTRACE | ||
649 | printk("%s [%d]: syscall_trace exit= %x\n", current->comm, | ||
650 | current->pid, current->exit_code); | ||
651 | #endif | ||
652 | if (current->exit_code) { | 662 | if (current->exit_code) { |
653 | send_sig (current->exit_code, current, 1); | 663 | send_sig(current->exit_code, current, 1); |
654 | current->exit_code = 0; | 664 | current->exit_code = 0; |
655 | } | 665 | } |
666 | |||
667 | out: | ||
668 | if (unlikely(current->audit_context) && !syscall_exit_p) | ||
669 | audit_syscall_entry(current, | ||
670 | (test_thread_flag(TIF_32BIT) ? | ||
671 | AUDIT_ARCH_SPARC : | ||
672 | AUDIT_ARCH_SPARC64), | ||
673 | regs->u_regs[UREG_G1], | ||
674 | regs->u_regs[UREG_I0], | ||
675 | regs->u_regs[UREG_I1], | ||
676 | regs->u_regs[UREG_I2], | ||
677 | regs->u_regs[UREG_I3]); | ||
656 | } | 678 | } |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index e5b9c7a27789..441fc2e52ce6 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -45,8 +45,8 @@ extern void calibrate_delay(void); | |||
45 | /* Please don't make this stuff initdata!!! --DaveM */ | 45 | /* Please don't make this stuff initdata!!! --DaveM */ |
46 | static unsigned char boot_cpu_id; | 46 | static unsigned char boot_cpu_id; |
47 | 47 | ||
48 | cpumask_t cpu_online_map = CPU_MASK_NONE; | 48 | cpumask_t cpu_online_map = CPU_MASK_NONE __read_mostly; |
49 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | 49 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE __read_mostly; |
50 | static cpumask_t smp_commenced_mask; | 50 | static cpumask_t smp_commenced_mask; |
51 | static cpumask_t cpu_callout_map; | 51 | static cpumask_t cpu_callout_map; |
52 | 52 | ||
@@ -155,7 +155,7 @@ void cpu_panic(void) | |||
155 | panic("SMP bolixed\n"); | 155 | panic("SMP bolixed\n"); |
156 | } | 156 | } |
157 | 157 | ||
158 | static unsigned long current_tick_offset; | 158 | static unsigned long current_tick_offset __read_mostly; |
159 | 159 | ||
160 | /* This tick register synchronization scheme is taken entirely from | 160 | /* This tick register synchronization scheme is taken entirely from |
161 | * the ia64 port, see arch/ia64/kernel/smpboot.c for details and credit. | 161 | * the ia64 port, see arch/ia64/kernel/smpboot.c for details and credit. |
@@ -1193,8 +1193,8 @@ void smp_send_stop(void) | |||
1193 | { | 1193 | { |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | unsigned long __per_cpu_base; | 1196 | unsigned long __per_cpu_base __read_mostly; |
1197 | unsigned long __per_cpu_shift; | 1197 | unsigned long __per_cpu_shift __read_mostly; |
1198 | 1198 | ||
1199 | EXPORT_SYMBOL(__per_cpu_base); | 1199 | EXPORT_SYMBOL(__per_cpu_base); |
1200 | EXPORT_SYMBOL(__per_cpu_shift); | 1200 | EXPORT_SYMBOL(__per_cpu_shift); |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 56cd96f4a5cd..9202d925a9ce 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -79,7 +79,7 @@ extern void linux_sparc_syscall(void); | |||
79 | extern void rtrap(void); | 79 | extern void rtrap(void); |
80 | extern void show_regs(struct pt_regs *); | 80 | extern void show_regs(struct pt_regs *); |
81 | extern void solaris_syscall(void); | 81 | extern void solaris_syscall(void); |
82 | extern void syscall_trace(void); | 82 | extern void syscall_trace(struct pt_regs *, int); |
83 | extern u32 sunos_sys_table[], sys_call_table32[]; | 83 | extern u32 sunos_sys_table[], sys_call_table32[]; |
84 | extern void tl0_solaris(void); | 84 | extern void tl0_solaris(void); |
85 | extern void sys_sigsuspend(void); | 85 | extern void sys_sigsuspend(void); |
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S index 5a95e98c5317..5f9e4fae612e 100644 --- a/arch/sparc64/kernel/sys32.S +++ b/arch/sparc64/kernel/sys32.S | |||
@@ -135,6 +135,8 @@ SIGN2(sys32_shutdown, sys_shutdown, %o0, %o1) | |||
135 | SIGN3(sys32_socketpair, sys_socketpair, %o0, %o1, %o2) | 135 | SIGN3(sys32_socketpair, sys_socketpair, %o0, %o1, %o2) |
136 | SIGN1(sys32_getpeername, sys_getpeername, %o0) | 136 | SIGN1(sys32_getpeername, sys_getpeername, %o0) |
137 | SIGN1(sys32_getsockname, sys_getsockname, %o0) | 137 | SIGN1(sys32_getsockname, sys_getsockname, %o0) |
138 | SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1) | ||
139 | SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2) | ||
138 | 140 | ||
139 | .globl sys32_mmap2 | 141 | .globl sys32_mmap2 |
140 | sys32_mmap2: | 142 | sys32_mmap2: |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index a5e36a4c8924..bceb91a8a2bd 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -59,11 +59,11 @@ sys_call_table32: | |||
59 | /*180*/ .word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall | 59 | /*180*/ .word sys32_flistxattr, sys_removexattr, sys_lremovexattr, compat_sys_sigpending, sys_ni_syscall |
60 | .word sys32_setpgid, sys32_fremovexattr, sys32_tkill, sys32_exit_group, sparc64_newuname | 60 | .word sys32_setpgid, sys32_fremovexattr, sys32_tkill, sys32_exit_group, sparc64_newuname |
61 | /*190*/ .word sys32_init_module, sparc64_personality, sys_remap_file_pages, sys32_epoll_create, sys32_epoll_ctl | 61 | /*190*/ .word sys32_init_module, sparc64_personality, sys_remap_file_pages, sys32_epoll_create, sys32_epoll_ctl |
62 | .word sys32_epoll_wait, sys_nis_syscall, sys_getppid, sys32_sigaction, sys_sgetmask | 62 | .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask |
63 | /*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir | 63 | /*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir |
64 | .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64 | 64 | .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64 |
65 | /*210*/ .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, sys32_sysinfo | 65 | /*210*/ .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, sys32_sysinfo |
66 | .word sys32_ipc, sys32_sigreturn, sys_clone, sys_nis_syscall, sys32_adjtimex | 66 | .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, sys32_adjtimex |
67 | /*220*/ .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid | 67 | /*220*/ .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid |
68 | .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16 | 68 | .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16 |
69 | /*230*/ .word sys32_select, compat_sys_time, sys_nis_syscall, compat_sys_stime, compat_sys_statfs64 | 69 | /*230*/ .word sys32_select, compat_sys_time, sys_nis_syscall, compat_sys_stime, compat_sys_statfs64 |
@@ -125,11 +125,11 @@ sys_call_table: | |||
125 | /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall | 125 | /*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall |
126 | .word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sparc64_newuname | 126 | .word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sparc64_newuname |
127 | /*190*/ .word sys_init_module, sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl | 127 | /*190*/ .word sys_init_module, sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl |
128 | .word sys_epoll_wait, sys_nis_syscall, sys_getppid, sys_nis_syscall, sys_sgetmask | 128 | .word sys_epoll_wait, sys_ioprio_set, sys_getppid, sys_nis_syscall, sys_sgetmask |
129 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall | 129 | /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall |
130 | .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 | 130 | .word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 |
131 | /*210*/ .word sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo | 131 | /*210*/ .word sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo |
132 | .word sys_ipc, sys_nis_syscall, sys_clone, sys_nis_syscall, sys_adjtimex | 132 | .word sys_ipc, sys_nis_syscall, sys_clone, sys_ioprio_get, sys_adjtimex |
133 | /*220*/ .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid | 133 | /*220*/ .word sys_nis_syscall, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid |
134 | .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid | 134 | .word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid, sys_setfsgid |
135 | /*230*/ .word sys_select, sys_nis_syscall, sys_nis_syscall, sys_stime, sys_statfs64 | 135 | /*230*/ .word sys_select, sys_nis_syscall, sys_nis_syscall, sys_stime, sys_statfs64 |
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index b40db389f90b..362b9c26871b 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -73,7 +73,7 @@ static __initdata struct sparc64_tick_ops dummy_tick_ops = { | |||
73 | .get_tick = dummy_get_tick, | 73 | .get_tick = dummy_get_tick, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct sparc64_tick_ops *tick_ops = &dummy_tick_ops; | 76 | struct sparc64_tick_ops *tick_ops __read_mostly = &dummy_tick_ops; |
77 | 77 | ||
78 | #define TICK_PRIV_BIT (1UL << 63) | 78 | #define TICK_PRIV_BIT (1UL << 63) |
79 | 79 | ||
@@ -195,7 +195,7 @@ static unsigned long tick_add_tick(unsigned long adj, unsigned long offset) | |||
195 | return new_tick; | 195 | return new_tick; |
196 | } | 196 | } |
197 | 197 | ||
198 | static struct sparc64_tick_ops tick_operations = { | 198 | static struct sparc64_tick_ops tick_operations __read_mostly = { |
199 | .init_tick = tick_init_tick, | 199 | .init_tick = tick_init_tick, |
200 | .get_tick = tick_get_tick, | 200 | .get_tick = tick_get_tick, |
201 | .get_compare = tick_get_compare, | 201 | .get_compare = tick_get_compare, |
@@ -276,7 +276,7 @@ static unsigned long stick_add_compare(unsigned long adj) | |||
276 | return new_compare; | 276 | return new_compare; |
277 | } | 277 | } |
278 | 278 | ||
279 | static struct sparc64_tick_ops stick_operations = { | 279 | static struct sparc64_tick_ops stick_operations __read_mostly = { |
280 | .init_tick = stick_init_tick, | 280 | .init_tick = stick_init_tick, |
281 | .get_tick = stick_get_tick, | 281 | .get_tick = stick_get_tick, |
282 | .get_compare = stick_get_compare, | 282 | .get_compare = stick_get_compare, |
@@ -422,7 +422,7 @@ static unsigned long hbtick_add_compare(unsigned long adj) | |||
422 | return val; | 422 | return val; |
423 | } | 423 | } |
424 | 424 | ||
425 | static struct sparc64_tick_ops hbtick_operations = { | 425 | static struct sparc64_tick_ops hbtick_operations __read_mostly = { |
426 | .init_tick = hbtick_init_tick, | 426 | .init_tick = hbtick_init_tick, |
427 | .get_tick = hbtick_get_tick, | 427 | .get_tick = hbtick_get_tick, |
428 | .get_compare = hbtick_get_compare, | 428 | .get_compare = hbtick_get_compare, |
@@ -437,10 +437,9 @@ static struct sparc64_tick_ops hbtick_operations = { | |||
437 | * NOTE: On SUN5 systems the ticker interrupt comes in using 2 | 437 | * NOTE: On SUN5 systems the ticker interrupt comes in using 2 |
438 | * interrupts, one at level14 and one with softint bit 0. | 438 | * interrupts, one at level14 and one with softint bit 0. |
439 | */ | 439 | */ |
440 | unsigned long timer_tick_offset; | 440 | unsigned long timer_tick_offset __read_mostly; |
441 | unsigned long timer_tick_compare; | ||
442 | 441 | ||
443 | static unsigned long timer_ticks_per_nsec_quotient; | 442 | static unsigned long timer_ticks_per_nsec_quotient __read_mostly; |
444 | 443 | ||
445 | #define TICK_SIZE (tick_nsec / 1000) | 444 | #define TICK_SIZE (tick_nsec / 1000) |
446 | 445 | ||
@@ -464,7 +463,7 @@ static inline void timer_check_rtc(void) | |||
464 | 463 | ||
465 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) | 464 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) |
466 | { | 465 | { |
467 | unsigned long ticks, pstate; | 466 | unsigned long ticks, compare, pstate; |
468 | 467 | ||
469 | write_seqlock(&xtime_lock); | 468 | write_seqlock(&xtime_lock); |
470 | 469 | ||
@@ -483,14 +482,14 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) | |||
483 | : "=r" (pstate) | 482 | : "=r" (pstate) |
484 | : "i" (PSTATE_IE)); | 483 | : "i" (PSTATE_IE)); |
485 | 484 | ||
486 | timer_tick_compare = tick_ops->add_compare(timer_tick_offset); | 485 | compare = tick_ops->add_compare(timer_tick_offset); |
487 | ticks = tick_ops->get_tick(); | 486 | ticks = tick_ops->get_tick(); |
488 | 487 | ||
489 | /* Restore PSTATE_IE. */ | 488 | /* Restore PSTATE_IE. */ |
490 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" | 489 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" |
491 | : /* no outputs */ | 490 | : /* no outputs */ |
492 | : "r" (pstate)); | 491 | : "r" (pstate)); |
493 | } while (time_after_eq(ticks, timer_tick_compare)); | 492 | } while (time_after_eq(ticks, compare)); |
494 | 493 | ||
495 | timer_check_rtc(); | 494 | timer_check_rtc(); |
496 | 495 | ||
@@ -506,11 +505,6 @@ void timer_tick_interrupt(struct pt_regs *regs) | |||
506 | 505 | ||
507 | do_timer(regs); | 506 | do_timer(regs); |
508 | 507 | ||
509 | /* | ||
510 | * Only keep timer_tick_offset uptodate, but don't set TICK_CMPR. | ||
511 | */ | ||
512 | timer_tick_compare = tick_ops->get_compare() + timer_tick_offset; | ||
513 | |||
514 | timer_check_rtc(); | 508 | timer_check_rtc(); |
515 | 509 | ||
516 | write_sequnlock(&xtime_lock); | 510 | write_sequnlock(&xtime_lock); |
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S index 382fd6798bb9..950423da8a6a 100644 --- a/arch/sparc64/kernel/vmlinux.lds.S +++ b/arch/sparc64/kernel/vmlinux.lds.S | |||
@@ -32,6 +32,8 @@ SECTIONS | |||
32 | .data1 : { *(.data1) } | 32 | .data1 : { *(.data1) } |
33 | . = ALIGN(64); | 33 | . = ALIGN(64); |
34 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | 34 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } |
35 | . = ALIGN(64); | ||
36 | .data.read_mostly : { *(.data.read_mostly) } | ||
35 | _edata = .; | 37 | _edata = .; |
36 | PROVIDE (edata = .); | 38 | PROVIDE (edata = .); |
37 | .fixup : { *(.fixup) } | 39 | .fixup : { *(.fixup) } |
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 3ffee7b51aed..52e9375288a9 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -34,22 +34,6 @@ | |||
34 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | 34 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * To debug kernel during syscall entry. | ||
38 | */ | ||
39 | void syscall_trace_entry(struct pt_regs *regs) | ||
40 | { | ||
41 | printk("scall entry: %s[%d]/cpu%d: %d\n", current->comm, current->pid, smp_processor_id(), (int) regs->u_regs[UREG_G1]); | ||
42 | } | ||
43 | |||
44 | /* | ||
45 | * To debug kernel during syscall exit. | ||
46 | */ | ||
47 | void syscall_trace_exit(struct pt_regs *regs) | ||
48 | { | ||
49 | printk("scall exit: %s[%d]/cpu%d: %d\n", current->comm, current->pid, smp_processor_id(), (int) regs->u_regs[UREG_G1]); | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * To debug kernel to catch accesses to certain virtual/physical addresses. | 37 | * To debug kernel to catch accesses to certain virtual/physical addresses. |
54 | * Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints. | 38 | * Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints. |
55 | * flags = VM_READ watches memread accesses, flags = VM_WRITE watches memwrite accesses. | 39 | * flags = VM_READ watches memread accesses, flags = VM_WRITE watches memwrite accesses. |
diff --git a/arch/sparc64/solaris/entry64.S b/arch/sparc64/solaris/entry64.S index 0cc9dad75c5e..4b6ae583c0a3 100644 --- a/arch/sparc64/solaris/entry64.S +++ b/arch/sparc64/solaris/entry64.S | |||
@@ -24,8 +24,9 @@ | |||
24 | 24 | ||
25 | .text | 25 | .text |
26 | solaris_syscall_trace: | 26 | solaris_syscall_trace: |
27 | add %sp, PTREGS_OFF, %o0 | ||
27 | call syscall_trace | 28 | call syscall_trace |
28 | nop | 29 | mov 0, %o1 |
29 | srl %i0, 0, %o0 | 30 | srl %i0, 0, %o0 |
30 | mov %i4, %o4 | 31 | mov %i4, %o4 |
31 | srl %i1, 0, %o1 | 32 | srl %i1, 0, %o1 |
@@ -159,8 +160,10 @@ ret_from_solaris: | |||
159 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] !npc = npc+4 | 160 | stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] !npc = npc+4 |
160 | 161 | ||
161 | solaris_syscall_trace2: | 162 | solaris_syscall_trace2: |
163 | add %sp, PTREGS_OFF, %o0 | ||
162 | call syscall_trace | 164 | call syscall_trace |
163 | add %l1, 0x4, %l2 /* npc = npc+4 */ | 165 | mov 1, %o1 |
166 | add %l1, 0x4, %l2 /* npc = npc+4 */ | ||
164 | andcc %l1, 1, %g0 | 167 | andcc %l1, 1, %g0 |
165 | bne,pn %icc, 2b | 168 | bne,pn %icc, 2b |
166 | nop | 169 | nop |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 846708403900..aee17d7e2e44 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -212,7 +212,7 @@ | |||
212 | #define __NR_epoll_create 193 /* Linux Specific */ | 212 | #define __NR_epoll_create 193 /* Linux Specific */ |
213 | #define __NR_epoll_ctl 194 /* Linux Specific */ | 213 | #define __NR_epoll_ctl 194 /* Linux Specific */ |
214 | #define __NR_epoll_wait 195 /* Linux Specific */ | 214 | #define __NR_epoll_wait 195 /* Linux Specific */ |
215 | /* #define __NR_ulimit 196 Linux Specific */ | 215 | #define __NR_ioprio_set 196 /* Linux Specific */ |
216 | #define __NR_getppid 197 /* Linux Specific */ | 216 | #define __NR_getppid 197 /* Linux Specific */ |
217 | #define __NR_sigaction 198 /* Linux Specific */ | 217 | #define __NR_sigaction 198 /* Linux Specific */ |
218 | #define __NR_sgetmask 199 /* Linux Specific */ | 218 | #define __NR_sgetmask 199 /* Linux Specific */ |
@@ -234,7 +234,7 @@ | |||
234 | #define __NR_ipc 215 /* Linux Specific */ | 234 | #define __NR_ipc 215 /* Linux Specific */ |
235 | #define __NR_sigreturn 216 /* Linux Specific */ | 235 | #define __NR_sigreturn 216 /* Linux Specific */ |
236 | #define __NR_clone 217 /* Linux Specific */ | 236 | #define __NR_clone 217 /* Linux Specific */ |
237 | /* #define __NR_modify_ldt 218 Linux Specific - i386 specific, unused */ | 237 | #define __NR_ioprio_get 218 /* Linux Specific */ |
238 | #define __NR_adjtimex 219 /* Linux Specific */ | 238 | #define __NR_adjtimex 219 /* Linux Specific */ |
239 | #define __NR_sigprocmask 220 /* Linux Specific */ | 239 | #define __NR_sigprocmask 220 /* Linux Specific */ |
240 | #define __NR_create_module 221 /* Linux Specific */ | 240 | #define __NR_create_module 221 /* Linux Specific */ |
diff --git a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h index 0cd652956929..a1d25c06f92a 100644 --- a/include/asm-sparc64/thread_info.h +++ b/include/asm-sparc64/thread_info.h | |||
@@ -220,8 +220,8 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
220 | #define TIF_NEWSIGNALS 6 /* wants new-style signals */ | 220 | #define TIF_NEWSIGNALS 6 /* wants new-style signals */ |
221 | #define TIF_32BIT 7 /* 32-bit binary */ | 221 | #define TIF_32BIT 7 /* 32-bit binary */ |
222 | #define TIF_NEWCHILD 8 /* just-spawned child process */ | 222 | #define TIF_NEWCHILD 8 /* just-spawned child process */ |
223 | /* TIF_* value 9 is available */ | 223 | #define TIF_SECCOMP 9 /* secure computing */ |
224 | #define TIF_POLLING_NRFLAG 10 | 224 | #define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */ |
225 | #define TIF_SYSCALL_SUCCESS 11 | 225 | #define TIF_SYSCALL_SUCCESS 11 |
226 | /* NOTE: Thread flags >= 12 should be ones we have no interest | 226 | /* NOTE: Thread flags >= 12 should be ones we have no interest |
227 | * in using in assembly, else we can't use the mask as | 227 | * in using in assembly, else we can't use the mask as |
@@ -229,6 +229,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
229 | */ | 229 | */ |
230 | #define TIF_ABI_PENDING 12 | 230 | #define TIF_ABI_PENDING 12 |
231 | #define TIF_MEMDIE 13 | 231 | #define TIF_MEMDIE 13 |
232 | #define TIF_POLLING_NRFLAG 14 | ||
232 | 233 | ||
233 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 234 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
234 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 235 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -239,9 +240,11 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
239 | #define _TIF_NEWSIGNALS (1<<TIF_NEWSIGNALS) | 240 | #define _TIF_NEWSIGNALS (1<<TIF_NEWSIGNALS) |
240 | #define _TIF_32BIT (1<<TIF_32BIT) | 241 | #define _TIF_32BIT (1<<TIF_32BIT) |
241 | #define _TIF_NEWCHILD (1<<TIF_NEWCHILD) | 242 | #define _TIF_NEWCHILD (1<<TIF_NEWCHILD) |
242 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 243 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
243 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 244 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
244 | #define _TIF_SYSCALL_SUCCESS (1<<TIF_SYSCALL_SUCCESS) | 245 | #define _TIF_SYSCALL_SUCCESS (1<<TIF_SYSCALL_SUCCESS) |
246 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | ||
247 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
245 | 248 | ||
246 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ | 249 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ |
247 | (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 250 | (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 5b8dcf5786a5..f59144c6b76a 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -212,7 +212,7 @@ | |||
212 | #define __NR_epoll_create 193 /* Linux Specific */ | 212 | #define __NR_epoll_create 193 /* Linux Specific */ |
213 | #define __NR_epoll_ctl 194 /* Linux Specific */ | 213 | #define __NR_epoll_ctl 194 /* Linux Specific */ |
214 | #define __NR_epoll_wait 195 /* Linux Specific */ | 214 | #define __NR_epoll_wait 195 /* Linux Specific */ |
215 | /* #define __NR_ulimit 196 Linux Specific */ | 215 | #define __NR_ioprio_set 196 /* Linux Specific */ |
216 | #define __NR_getppid 197 /* Linux Specific */ | 216 | #define __NR_getppid 197 /* Linux Specific */ |
217 | #define __NR_sigaction 198 /* Linux Specific */ | 217 | #define __NR_sigaction 198 /* Linux Specific */ |
218 | #define __NR_sgetmask 199 /* Linux Specific */ | 218 | #define __NR_sgetmask 199 /* Linux Specific */ |
@@ -234,7 +234,7 @@ | |||
234 | #define __NR_ipc 215 /* Linux Specific */ | 234 | #define __NR_ipc 215 /* Linux Specific */ |
235 | #define __NR_sigreturn 216 /* Linux Specific */ | 235 | #define __NR_sigreturn 216 /* Linux Specific */ |
236 | #define __NR_clone 217 /* Linux Specific */ | 236 | #define __NR_clone 217 /* Linux Specific */ |
237 | /* #define __NR_modify_ldt 218 Linux Specific - i386 specific, unused */ | 237 | #define __NR_ioprio_get 218 /* Linux Specific */ |
238 | #define __NR_adjtimex 219 /* Linux Specific */ | 238 | #define __NR_adjtimex 219 /* Linux Specific */ |
239 | #define __NR_sigprocmask 220 /* Linux Specific */ | 239 | #define __NR_sigprocmask 220 /* Linux Specific */ |
240 | #define __NR_create_module 221 /* Linux Specific */ | 240 | #define __NR_create_module 221 /* Linux Specific */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index bf2ad3ba72eb..68aba0c02e49 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -165,7 +165,7 @@ | |||
165 | #define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT) | 165 | #define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT) |
166 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 166 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
167 | #define AUDIT_ARCH_SPARC (EM_SPARC) | 167 | #define AUDIT_ARCH_SPARC (EM_SPARC) |
168 | #define AUDIT_ARCH_SPARC64 (EM_SPARC64|__AUDIT_ARCH_64BIT) | 168 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) |
169 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | 169 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) |
170 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 170 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
171 | 171 | ||
diff --git a/include/linux/cache.h b/include/linux/cache.h index 2b66a36d85f0..f6b5a46c5f82 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #ifdef CONFIG_X86 | 16 | #if defined(CONFIG_X86) || defined(CONFIG_SPARC64) |
17 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | 17 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) |
18 | #else | 18 | #else |
19 | #define __read_mostly | 19 | #define __read_mostly |
diff --git a/init/Kconfig b/init/Kconfig index b1091d7542ce..75755ef50c89 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -174,7 +174,7 @@ config AUDIT | |||
174 | 174 | ||
175 | config AUDITSYSCALL | 175 | config AUDITSYSCALL |
176 | bool "Enable system-call auditing support" | 176 | bool "Enable system-call auditing support" |
177 | depends on AUDIT && (X86 || PPC || PPC64 || ARCH_S390 || IA64 || UML) | 177 | depends on AUDIT && (X86 || PPC || PPC64 || ARCH_S390 || IA64 || UML || SPARC64) |
178 | default y if SECURITY_SELINUX | 178 | default y if SECURITY_SELINUX |
179 | help | 179 | help |
180 | Enable low-overhead system-call auditing infrastructure that | 180 | Enable low-overhead system-call auditing infrastructure that |