Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470150
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/5] arm64: Add uprobe support |
| Date | 2016-08-25 15:40 +0200 |
| Message-ID | <sa32V-1xi-5@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <s1AAN-cO-1@gated-at.bofh.it> <s4kpP-2Ta-21@gated-at.bofh.it> <s9ADE-7nn-5@gated-at.bofh.it> <s9IKR-4jv-9@gated-at.bofh.it> <s9IKR-4jv-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/24, Will Deacon wrote:
>
> On Wed, Aug 24, 2016 at 05:47:11PM +0200, Oleg Nesterov wrote:
> > On 08/24, Pratyush Anand wrote:
> > >
> > > > I don't think we want user_{enable,disable{_single_step in the long term,
> > > > please look at 9bd1190a11c9d2 "uprobes/x86: Do not (ab)use TIF_SINGLESTEP
> > > > /user_*_single_step() for single-stepping". it seems that ARM64 sets/clears
> > > > TIF_SINGLESTEP. You can also lool at saved_tf logic, probably ARM64 needs
> > > > the same.
> > >
> > > IIUC, then you mean that TIF_SINGLESTEP is a per task flag,
> >
> > Yes, and nobody but ptrace should use it, otherwise ptrace/uprobes can confuse
> > each other. And uprobes simply doesn't need to set/clear it.
>
> We're already using it for kprobes, hw_breakpoint and kgdb as well as
> ptrace, so I'd rather uprobes either followed existing practice, or we
> converted everybody off the current code.
And perhaps this is fine for arm64, I do not know.
> In what way do things get confused?
Say, arch_uprobe_post_xol() should not blindly do user_disable_single_step(),
this can confuse ptrace if TIF_SINGLESTEP was set by debugger which wants
to step over the probed insn.
> > I can't really answer since I know nothing about arm. x86 just needs to set
> > X86_EFLAGS_TF, I guess arm needs to modify some register too?
>
> We have {user,kernel}_{enable,disable}_single_step for managing the various
> registers controlling the single-step state machine on arm64.
Yes, and perhaps uprobes can just do set_regs_spsr_ss() ? I never looked into
arch/arm64/, but it seems that we only need to ensure that call_step_hook()
will be called even if user_mode() == T, why do we need TIF_SINGLESTEP ?
Nevermind. I can be easily wrong and let me repeat that I agree with
user_{enable,disable}_single_step in the initial version in any case.
Oleg.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 5/5] arm64: Add uprobe support Pratyush Anand <panand@redhat.com> - 2016-08-24 09:20 +0200
Re: [PATCH 5/5] arm64: Add uprobe support Will Deacon <will.deacon@arm.com> - 2016-08-24 18:00 +0200
Re: [PATCH 5/5] arm64: Add uprobe support Oleg Nesterov <oleg@redhat.com> - 2016-08-25 15:40 +0200
Re: [PATCH 5/5] arm64: Add uprobe support Oleg Nesterov <oleg@redhat.com> - 2016-08-24 18:00 +0200
csiph-web