[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110608191910.GA18698@redhat.com>
Date: Wed, 8 Jun 2011 21:19:10 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Eric Paris <eparis@...hat.com>
Cc: linux-kernel@...r.kernel.org, tony.luck@...el.com,
fenghua.yu@...el.com, monstr@...str.eu, ralf@...ux-mips.org,
benh@...nel.crashing.org, paulus@...ba.org, schwidefsky@...ibm.com,
heiko.carstens@...ibm.com, linux390@...ibm.com,
lethal@...ux-sh.org, davem@...emloft.net, jdike@...toit.com,
richard@....at, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, viro@...iv.linux.org.uk,
akpm@...ux-foundation.org, linux-ia64@...r.kernel.org,
microblaze-uclinux@...e.uq.edu.au, linux-mips@...ux-mips.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
user-mode-linux-devel@...ts.sourceforge.net
Subject: Re: [PATCH -v2] Audit: push audit success and retcode into arch
ptrace.h
On 06/08, Oleg Nesterov wrote:
>
> OK. Thanks a lot Eric for your explanations.
Yes. but may I ask another one?
Shouldn't copy_process()->audit_alloc(tsk) path do
clear_tsk_thread_flag(tsk, TIF_SYSCALL_AUDIT) if it doesn't
set tsk->audit_context?
I can be easily wrong, but afaics otherwise the child can run
with TIF_SYSCALL_AUDIT bit copied from parent's thread_info by
dup_task_struct()->setup_thread_stack() and without ->audit_context,
right? For what?
Any other reason why audit_syscall_entry() checks context != NULL?
IOW. Any reason the patch below is wrong?
I am just curious, thanks.
Oleg.
--- x/kernel/auditsc.c
+++ x/kernel/auditsc.c
@@ -885,6 +885,8 @@ int audit_alloc(struct task_struct *tsk)
if (likely(!audit_ever_enabled))
return 0; /* Return if not auditing. */
+ clear_tsk_thread_flag(tsk, TIF_SYSCALL_AUDIT);
+
state = audit_filter_task(tsk, &key);
if (likely(state == AUDIT_DISABLED))
return 0;
@@ -1591,9 +1593,7 @@ void audit_syscall_entry(int arch, int m
struct audit_context *context = tsk->audit_context;
enum audit_state state;
- if (unlikely(!context))
- return;
-
+ BUG_ON(!context);
/*
* This happens only on certain architectures that make system
* calls in kernel_thread via the entry.S interface, instead of
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists