lkml.org 
[lkml]   [2016]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v15 04/10] arm64: Kprobes with single stepping support
On Wed, Jul 20, 2016 at 05:09:28PM +0100, Marc Zyngier wrote:
> +static inline unsigned long min_stack_size(unsigned long addr)
> +{
> + unsigned long size;
> + struct kprobe_ctlblk *ctl;
> +
> + if (on_irq_stack(addr, raw_smp_processor_id()))
> + size = IRQ_STACK_PTR(raw_smp_processor_id()) - addr;
> + else
> + size = (unsigned long)current_thread_info() + THREAD_START_SP - addr;
> +
> + return min(size, sizeof(ctl->jprobes_stack));
> +}

We could drop the local ctl pointer:

return min(size, sizeof(((struct kprobe_ctlblk *)0)->jprobes_stack));

If you add a log, I'll push the patch on top of the kprobes branch.

Thanks.

--
Catalin

\
 
 \ /
  Last update: 2016-07-20 19:01    [W:0.202 / U:1.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site