Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459065

Re: [PATCH 5/5] arm64: Add uprobe support

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/5] arm64: Add uprobe support
Date 2016-08-09 21:00 +0200
Message-ID <s4kpP-2Ta-21@gated-at.bofh.it> (permalink)
References <s1AAN-cO-3@gated-at.bofh.it> <s1AAN-cO-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/02, Pratyush Anand wrote:
>
> This patch adds support for uprobe on ARM64 architecture.

I know nothing about ARM, so I can't actually review this change.
But it looks good to me ;)

Just one note,

> +int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
> +{
> +	struct uprobe_task *utask = current->utask;
> +
> +	/* saved fault code is restored in post_xol */
> +	utask->autask.saved_fault_code = current->thread.fault_code;
> +
> +	/* An invalid fault code between pre/post xol event */
> +	current->thread.fault_code = UPROBE_INV_FAULT_CODE;
> +
> +	/* Instruction point to execute ol */
> +	instruction_pointer_set(regs, utask->xol_vaddr);
> +
> +	user_enable_single_step(current);

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.

However, I agree we can do this later and initial version can use these
ptrace helpers.

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 5/5] arm64: Add uprobe support Pratyush Anand <panand@redhat.com> - 2016-08-02 07:40 +0200
  Re: [PATCH 5/5] arm64: Add uprobe support Oleg Nesterov <oleg@redhat.com> - 2016-08-09 21:00 +0200

csiph-web