[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100105102606.4f223990@mschwide.boeblingen.de.ibm.com>
Date: Tue, 5 Jan 2010 10:26:06 +0100
From: Martin Schwidefsky <schwidefsky@...ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: caiqian@...hat.com, Heiko Carstens <heiko.carstens@...ibm.com>,
Jan Kratochvil <jkratoch@...hat.com>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
utrace-devel@...hat.com
Subject: Re: s390 && user_enable_single_step() (Was: odd utrace testing
results on s390x)
On Mon, 4 Jan 2010 19:14:12 +0100
Oleg Nesterov <oleg@...hat.com> wrote:
> On 01/04, Martin Schwidefsky wrote:
> > Subject: [PATCH] fix loading of PER control registers for utrace.
> >
> > From: Martin Schwidefsky <schwidefsky@...ibm.com>
> >
> > If the current task enables / disables PER tracing for itself the
> > PER control registers need to be loaded in FixPerRegisters.
> >
> > Signed-off-by: Martin Schwidefsky <schwidefsky@...ibm.com>
> > ---
> > arch/s390/kernel/ptrace.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > --- a/arch/s390/kernel/ptrace.c
> > +++ b/arch/s390/kernel/ptrace.c
> > @@ -98,6 +98,9 @@ FixPerRegisters(struct task_struct *task
> > per_info->control_regs.bits.storage_alt_space_ctl = 1;
> > else
> > per_info->control_regs.bits.storage_alt_space_ctl = 0;
> > +
> > + if (task == current)
> > + __ctl_load(per_info->control_regs.words, 9, 11);
> > }
>
> Yes it does fix the problem! Thanks a lot Martin.
Ok, I will add that patch to the git390 queue.
> However. Could you please look at 6580807da14c423f0d0a708108e6df6ebc8bc83d ?
> I am worried, perhaps this commit is not enough for s390. OK, do_single_step()
> tracehook_consider_fatal_signal(), this means the forked thread will not
> be killed by SIGTRAP if it is not auto-attached, but still this may be
> wrong.
>
> IOW. I think this problem is minor and probably can be ignored, but if
> I remove tracehook_consider_fatal_signal() check from do_single_step(),
>
> --- a/arch/s390/kernel/traps.c
> +++ b/arch/s390/kernel/traps.c
> @@ -382,8 +382,7 @@ void __kprobes do_single_step(struct pt_
> SIGTRAP) == NOTIFY_STOP){
> return;
> }
> - if (tracehook_consider_fatal_signal(current, SIGTRAP))
> - force_sig(SIGTRAP, current);
> + force_sig(SIGTRAP, current);
> }
>
> static void default_trap_handler(struct pt_regs * regs, long interruption_code)
> -------------------------------------------------------------------
>
> then the test-case from 6580807da14c423f0d0a708108e6df6ebc8bc83d
> fails. This probably means that copy_process()->user_disable_single_step()
> is not enough to clear the "this task wants single-stepping" copied
> from parent.
user_disable_single_step() does not remove the TIF_SINGLE_STEP bit from the
forked task. Perhaps we should just clear the bit in the function.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
--
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