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:	Mon, 8 Sep 2014 23:55:06 +0200
From:	Rabin Vincent <rabin@....in>
To:	Kees Cook <keescook@...omium.org>
Cc:	Will Deacon <will.deacon@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Laura Abbott <lauraa@...eaurora.org>,
	Rob Herring <robh@...nel.org>,
	Leif Lindholm <leif.lindholm@...aro.org>,
	"msalter@...hat.com" <msalter@...hat.com>,
	Liu hua <sdu.liu@...wei.com>,
	Nikolay Borisov <Nikolay.Borisov@....com>,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	Doug Anderson <dianders@...gle.com>,
	Jason Wessel <jason.wessel@...driver.com>,
	Catalin Marinas <Catalin.Marinas@....com>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

On Mon, Sep 08, 2014 at 12:16:34PM -0700, Kees Cook wrote:
> On Thu, Sep 04, 2014 at 06:27:48PM +0100, Will Deacon wrote:
> > On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote:
> > > Ah! If this is the case, perhaps we can get away with
> > > local_flush_tlb_kernel_range() then?
> > 
> > That's a bit tricky, since you need to ensure that preemption is disabled
> > until the mapping is put back like it was.
> 
> Okay, under both real hardware with the errata, and under QEMU, things seem
> to work with this change to the series. What do you think?

Preemption is already disabled until the mapping is put back in this
patch.c code because interrupts are disabled from before the time
set_fixmap() is called until after clear_fixmap() is called.

I'd guess that Will meant other (future) callers of set_fixmap() would
have to ensure similar behaviour with set_fixmap() / clear_fixmap().

Unless I'm missing something set/clear_fixmap() seem to be quite arch
specific and only really used on x86, so we could ensure that future
users on ARM perform the correct tlb flush:  the first user on ARM with
a non-atomic context (or you) could implement a set_fixmap() which does
the global flush and have this patch.c (and any other atomic context
callers) call __set_fixmap() directly.

The change to local_flush_tlb_kernel_range() in __set_fixmap() would of
course be needed in that case, and IIRC that was what my original patch
had (via set_top_pte()).
--
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