lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180312000522.8bfbd3d5da5fce8a5242ee84@kernel.org>
Date:   Mon, 12 Mar 2018 00:05:22 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
        Yang Bo <yangbo@...pin.com>, Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
        Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Laura Abbott <labbott@...hat.com>, Josef Bacik <jbacik@...com>,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: [RFC PATCH -tip 8/9] error-injection: Fix to not enabling
 preemption in pre_handler

On Sat, 10 Mar 2018 09:22:48 +0100
Ingo Molnar <mingo@...nel.org> wrote:

> 
> * Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > Since kprobes pre_handler doesn't need to recover preemption
> > even if it modifies regs->ip anymore, this fixes to remove
> > the preempt_enable_no_resched() from pre_handler.
> > 
> > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > ---
> >  kernel/fail_function.c |    1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/kernel/fail_function.c b/kernel/fail_function.c
> > index 21b0122cb39c..b1713521f096 100644
> > --- a/kernel/fail_function.c
> > +++ b/kernel/fail_function.c
> > @@ -176,7 +176,6 @@ static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs)
> >  		override_function_with_return(regs);
> >  		/* Kprobe specific fixup */
> >  		reset_current_kprobe();
> > -		preempt_enable_no_resched();
> >  		return 1;
> >  	}
> 
> So where did the matching preempt_disable() get removed? If it's the 6/9 patch, 
> then this patch (and 8/9) should very much be part of it.

It is 7/9, in kprobe_int3_handler() and kprobe_ftrace_handler().
The latter is a bit tricky, originally it enable preemption only when
the pre_handler returns 0, but 7/9 changes it always enables preemption.

> 
> There should be no bisection breakage in the series.

OK, I will merge 7/9-9/9 (anyway those are currently only support x86).

Thanks,

> 
> Thanks,
> 
> 	Ingo


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ