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: <1315753729.455.56.camel@pasglop>
Date:	Sun, 11 Sep 2011 12:08:49 -0300
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Richard Kuo <rkuo@...eaurora.org>
Cc:	linux-arch@...r.kernel.org, linux-hexagon@...r.kernel.org,
	linux-kernel@...r.kernel.org, Linas Vepstas <linas@...eaurora.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [patch v3 30/36] Hexagon: Add page-fault support.

On Thu, 2011-09-08 at 20:09 -0500, Richard Kuo wrote:

> +/*
> + * Canonical page fault handler
> + */
> +void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
> +{
> +	struct vm_area_struct *vma;
> +	struct mm_struct *mm = current->mm;
> +	siginfo_t info;
> +	int si_code;
> +	int fault;
> +	const struct exception_table_entry *fixup;
> +
> +	si_code = SEGV_MAPERR;
> +	local_irq_enable();
> +
> +	/*
> +	 * If we're in an interrupt or have no user context,
> +	 * then must not take the fault.
> +	 */
> +	if (unlikely(in_interrupt() || !mm))
> +		goto no_context;

Are you sure about enabling interrupts before going to "no_context" ?

If somebody does a user access "in atomic" with interrupt disabled (with
the expectation that a fault would be caught by search_exception_tables
and returned as -EFAULT), such code probably doesn't expect interrupts
to be re-enabled implicitely.

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ