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]
Date:   Sat, 3 Mar 2018 10:58:23 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Masami Hiramatsu <mhiramat@...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>
Subject: Re: [PATCH -tip] x86: kprobes: Cleanup preempt disabling and enabling


* Masami Hiramatsu <mhiramat@...nel.org> wrote:

> +/*
> + * Interrupts are disabled on entry as trap3 is an interrupt gate and they
> + * remain disabled throughout this function.
> + */
> +int kprobe_int3_handler(struct pt_regs *regs)
> +{
> +	struct kprobe_ctlblk *kcb;
> +	int ret;
> +
> +	if (user_mode(regs))
> +		return 0;
> +
> +	/*
> +	 * We don't want to be preempted for the entire
> +	 * duration of kprobe processing.
> +	 */
> +	preempt_disable();
> +
> +	kcb = get_kprobe_ctlblk();
> +	ret = kprobe_int3_dispatcher(regs, kcb);
> +
> +	if (!kprobe_ready_for_singlestep(regs))
> +		preempt_enable_no_resched();
> +
> +	return ret;

What's the point of disabling preemption, if IRQs are disabled already?

There's no preemption when IRQs are off...

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ