Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Guo Ren
Hi Oleg, On Tue, May 5, 2020 at 12:47 AM Oleg Nesterov wrote: > > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > some architectures (csky, s390, and sparc) don't do this. > > We can remove the BUG_ON(

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Guo Ren
On Tue, May 5, 2020 at 2:41 AM Christian Borntraeger wrote: > > > > On 04.05.20 18:47, Oleg Nesterov wrote: > > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > > some architectures (csky, s390, and sp

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Steven Rostedt
On Tue, 9 Jun 2020 09:48:45 -0700 Linus Torvalds wrote: > On Tue, Jun 9, 2020 at 8:30 AM Oleg Nesterov wrote: > > > > Looks like this patch was forgotten... > > > > Should I resend it? > > I guess I'll just take it directly, since it was triggered by me > complaining anyway. > > I had hoped

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Linus Torvalds
On Tue, Jun 9, 2020 at 8:30 AM Oleg Nesterov wrote: > > Looks like this patch was forgotten... > > Should I resend it? I guess I'll just take it directly, since it was triggered by me complaining anyway. I had hoped it would go through the usual channels. Linus

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-06-09 Thread Oleg Nesterov
Looks like this patch was forgotten... Should I resend it? On 05/04, Oleg Nesterov wrote: > > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > some architectures (csky, s390, and sparc) don't do this. >

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-06 Thread Oleg Nesterov
On 05/06, Steven Rostedt wrote: > > As this is in the kernel/events/ directory, I'm guessing it should be taken > through the tip tree? this would be great, thanks Steven. Oleg.

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-06 Thread Steven Rostedt
On Wed, 6 May 2020 10:59:55 +0530 Srikar Dronamraju wrote: > * Oleg Nesterov [2020-05-04 18:47:25]: > > > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > > some architectures (csky, s390, and sparc

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-05 Thread Srikar Dronamraju
* Oleg Nesterov [2020-05-04 18:47:25]: > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > some architectures (csky, s390, and sparc) don't do this. > > We can remove the BUG_ON() check in prepare_uprob

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-04 Thread Sven Schnelle
Hi, On Mon, May 04, 2020 at 08:40:44PM +0200, Christian Borntraeger wrote: > > > On 04.05.20 18:47, Oleg Nesterov wrote: > > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > > some architectures (csk

Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-04 Thread Christian Borntraeger
On 04.05.20 18:47, Oleg Nesterov wrote: > uprobe_write_opcode() must not cross page boundary; prepare_uprobe() > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but > some architectures (csky, s390, and sparc) don't do this. I think the idea was that the uprobe instruction is

[PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned

2020-05-04 Thread Oleg Nesterov
uprobe_write_opcode() must not cross page boundary; prepare_uprobe() relies on arch_uprobe_analyze_insn() which should validate "vaddr" but some architectures (csky, s390, and sparc) don't do this. We can remove the BUG_ON() check in prepare_uprobe() and validate the offset early in __uprobe_regis