Re: i386 single-step vs int $0x80 issues

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roland McGrath <roland@...>
Cc: Chuck Ebbert <cebbert@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, <linux-kernel@...>
Date: Tuesday, April 22, 2008 - 2:16 pm

Roland McGrath wrote:


It took some further time to understand what is closer to the source
of the problem.  Previously I had just bisected backwards until ptrace
started working again because I knew it had broken between 2.6.14 and
2.6.21.  The test case provided in the patch I submitted either always
fails or always succeeds.  I had a particular machine and file system
that it always failed on.  I reduced the configuration to UP i386 with
a file system that was using full kernel auditing.

It turns out that it is the _TIF_SYSCALL_AUDIT interaction in entry.S
is more likely the culprit here.  This flag was getting turned on as a
result of using kernel/user space auditing.  I found that you can turn
off CONFIG_AUDIT and use the patch below to "simulate" the same
circumstance.  Then you should be able to observe the same failure I
saw directly with a vanilla 2.6.21 i386 kernel.


diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
diff --git a/kernel/fork.c b/kernel/fork.c
index 6af959c..fb47ab9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1154,6 +1154,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
 #ifdef TIF_SYSCALL_EMU
        clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);
 #endif
+       /* HACK to always turn on syscall auditing */
+       set_tsk_thread_flag(p, TIF_SYSCALL_AUDIT);
+       /* end HACK to simulate auditing */
 
        /* Our parent execution domain becomes current domain
           These must match for thread signalling to apply */


Let me know if you need further details, and it certainly means some
further testing is in order against your newer patch.  I am also
interested in what test cases fail that you mentioned in your original
e-mail on this topic.

Thanks,
Jason.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
i386 single-step vs int $0x80 issues, Roland McGrath, (Tue Apr 15, 10:36 pm)
Re: i386 single-step vs int $0x80 issues, Jason Wessel, (Mon Apr 21, 2:00 pm)
Re: i386 single-step vs int $0x80 issues, Roland McGrath, (Mon Apr 21, 5:25 pm)
Re: i386 single-step vs int $0x80 issues, Jason Wessel, (Tue Apr 22, 2:16 pm)