diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 19:06:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 19:41:31 -0500 |
commit | f429ee3b808118591d1f3cdf3c0d0793911a5677 (patch) | |
tree | 96d848f5f677d96758ecd2aee5eb6931b75bf218 /arch/sparc | |
parent | 22b4eb5e3174efb49791c62823d0cccc35394c36 (diff) | |
parent | c158a35c8a681cf68d36f22f058f9f5466386c71 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit: (29 commits)
audit: no leading space in audit_log_d_path prefix
audit: treat s_id as an untrusted string
audit: fix signedness bug in audit_log_execve_info()
audit: comparison on interprocess fields
audit: implement all object interfield comparisons
audit: allow interfield comparison between gid and ogid
audit: complex interfield comparison helper
audit: allow interfield comparison in audit rules
Kernel: Audit Support For The ARM Platform
audit: do not call audit_getname on error
audit: only allow tasks to set their loginuid if it is -1
audit: remove task argument to audit_set_loginuid
audit: allow audit matching on inode gid
audit: allow matching on obj_uid
audit: remove audit_finish_fork as it can't be called
audit: reject entry,always rules
audit: inline audit_free to simplify the look of generic code
audit: drop audit_set_macxattr as it doesn't do anything
audit: inline checks for not needing to collect aux records
audit: drop some potentially inadvisable likely notations
...
Use evil merge to fix up grammar mistakes in Kconfig file.
Bad speling and horrible grammar (and copious swearing) is to be
expected, but let's keep it to commit messages and comments, rather than
expose it to users in config help texts or printouts.
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/ptrace.h | 10 | ||||
-rw-r--r-- | arch/sparc/kernel/ptrace_64.c | 28 |
2 files changed, 18 insertions, 20 deletions
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index a0e1bcf843a1..c00c3b5c2806 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h | |||
@@ -207,7 +207,15 @@ do { current_thread_info()->syscall_noerror = 1; \ | |||
207 | #define instruction_pointer(regs) ((regs)->tpc) | 207 | #define instruction_pointer(regs) ((regs)->tpc) |
208 | #define instruction_pointer_set(regs, val) ((regs)->tpc = (val)) | 208 | #define instruction_pointer_set(regs, val) ((regs)->tpc = (val)) |
209 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) | 209 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) |
210 | #define regs_return_value(regs) ((regs)->u_regs[UREG_I0]) | 210 | static inline int is_syscall_success(struct pt_regs *regs) |
211 | { | ||
212 | return !(regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY)); | ||
213 | } | ||
214 | |||
215 | static inline long regs_return_value(struct pt_regs *regs) | ||
216 | { | ||
217 | return regs->u_regs[UREG_I0]; | ||
218 | } | ||
211 | #ifdef CONFIG_SMP | 219 | #ifdef CONFIG_SMP |
212 | extern unsigned long profile_pc(struct pt_regs *); | 220 | extern unsigned long profile_pc(struct pt_regs *); |
213 | #else | 221 | #else |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index 96ee50a80661..9388844cd88c 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -1071,32 +1071,22 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) | |||
1071 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 1071 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
1072 | trace_sys_enter(regs, regs->u_regs[UREG_G1]); | 1072 | trace_sys_enter(regs, regs->u_regs[UREG_G1]); |
1073 | 1073 | ||
1074 | if (unlikely(current->audit_context) && !ret) | 1074 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? |
1075 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? | 1075 | AUDIT_ARCH_SPARC : |
1076 | AUDIT_ARCH_SPARC : | 1076 | AUDIT_ARCH_SPARC64), |
1077 | AUDIT_ARCH_SPARC64), | 1077 | regs->u_regs[UREG_G1], |
1078 | regs->u_regs[UREG_G1], | 1078 | regs->u_regs[UREG_I0], |
1079 | regs->u_regs[UREG_I0], | 1079 | regs->u_regs[UREG_I1], |
1080 | regs->u_regs[UREG_I1], | 1080 | regs->u_regs[UREG_I2], |
1081 | regs->u_regs[UREG_I2], | 1081 | regs->u_regs[UREG_I3]); |
1082 | regs->u_regs[UREG_I3]); | ||
1083 | 1082 | ||
1084 | return ret; | 1083 | return ret; |
1085 | } | 1084 | } |
1086 | 1085 | ||
1087 | asmlinkage void syscall_trace_leave(struct pt_regs *regs) | 1086 | asmlinkage void syscall_trace_leave(struct pt_regs *regs) |
1088 | { | 1087 | { |
1089 | #ifdef CONFIG_AUDITSYSCALL | 1088 | audit_syscall_exit(regs); |
1090 | if (unlikely(current->audit_context)) { | ||
1091 | unsigned long tstate = regs->tstate; | ||
1092 | int result = AUDITSC_SUCCESS; | ||
1093 | 1089 | ||
1094 | if (unlikely(tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) | ||
1095 | result = AUDITSC_FAILURE; | ||
1096 | |||
1097 | audit_syscall_exit(result, regs->u_regs[UREG_I0]); | ||
1098 | } | ||
1099 | #endif | ||
1100 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 1090 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
1101 | trace_sys_exit(regs, regs->u_regs[UREG_G1]); | 1091 | trace_sys_exit(regs, regs->u_regs[UREG_G1]); |
1102 | 1092 | ||