Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Kees Cook
On Thu, Sep 11, 2014 at 9:16 AM, Will Deacon wrote: > On Thu, Sep 11, 2014 at 05:05:14PM +0100, Kees Cook wrote: >> Actually, this doesn't make sense. If we're using >> local_flush_tlb_kernel_range() in set_fixmap, we must always run under >> stop_machine. The needs-broadcast case is solved by

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Will Deacon
On Thu, Sep 11, 2014 at 05:05:14PM +0100, Kees Cook wrote: > Actually, this doesn't make sense. If we're using > local_flush_tlb_kernel_range() in set_fixmap, we must always run under > stop_machine. The needs-broadcast case is solved by using > local_flush_tlb_kernel_range(), and the

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Kees Cook
On Thu, Sep 11, 2014 at 8:27 AM, Kees Cook wrote: > On Wed, Sep 10, 2014 at 10:51 AM, Will Deacon wrote: >> Hi Kees, >> >> On Tue, Sep 09, 2014 at 03:33:11PM +0100, Kees Cook wrote: >>> On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon wrote: >>> > On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Kees Cook
On Wed, Sep 10, 2014 at 10:51 AM, Will Deacon wrote: > Hi Kees, > > On Tue, Sep 09, 2014 at 03:33:11PM +0100, Kees Cook wrote: >> On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon wrote: >> > On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: >> >> Ah, so it was, yes! Will, which version of

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Kees Cook
On Wed, Sep 10, 2014 at 10:51 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Tue, Sep 09, 2014 at 03:33:11PM +0100, Kees Cook wrote: On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon will.dea...@arm.com wrote: On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: Ah, so it was, yes!

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Kees Cook
On Thu, Sep 11, 2014 at 8:27 AM, Kees Cook keesc...@chromium.org wrote: On Wed, Sep 10, 2014 at 10:51 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Tue, Sep 09, 2014 at 03:33:11PM +0100, Kees Cook wrote: On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon will.dea...@arm.com wrote: On Mon,

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Will Deacon
On Thu, Sep 11, 2014 at 05:05:14PM +0100, Kees Cook wrote: Actually, this doesn't make sense. If we're using local_flush_tlb_kernel_range() in set_fixmap, we must always run under stop_machine. The needs-broadcast case is solved by using local_flush_tlb_kernel_range(), and the

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-11 Thread Kees Cook
On Thu, Sep 11, 2014 at 9:16 AM, Will Deacon will.dea...@arm.com wrote: On Thu, Sep 11, 2014 at 05:05:14PM +0100, Kees Cook wrote: Actually, this doesn't make sense. If we're using local_flush_tlb_kernel_range() in set_fixmap, we must always run under stop_machine. The needs-broadcast case is

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-10 Thread Will Deacon
Hi Kees, On Tue, Sep 09, 2014 at 03:33:11PM +0100, Kees Cook wrote: > On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon wrote: > > On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: > >> Ah, so it was, yes! Will, which version of this logic would you prefer? > > > > I still don't think we're

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-10 Thread Will Deacon
Hi Kees, On Tue, Sep 09, 2014 at 03:33:11PM +0100, Kees Cook wrote: On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon will.dea...@arm.com wrote: On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: Ah, so it was, yes! Will, which version of this logic would you prefer? I still don't

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-09 Thread Kees Cook
On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon wrote: > On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: >> On Mon, Sep 8, 2014 at 2:55 PM, Rabin Vincent wrote: >> > 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

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-09 Thread Will Deacon
On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: > On Mon, Sep 8, 2014 at 2:55 PM, Rabin Vincent wrote: > > 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

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-09 Thread Will Deacon
On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: On Mon, Sep 8, 2014 at 2:55 PM, Rabin Vincent ra...@rab.in wrote: 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,

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-09 Thread Kees Cook
On Tue, Sep 9, 2014 at 5:38 AM, Will Deacon will.dea...@arm.com wrote: On Mon, Sep 08, 2014 at 11:40:43PM +0100, Kees Cook wrote: On Mon, Sep 8, 2014 at 2:55 PM, Rabin Vincent ra...@rab.in wrote: On Mon, Sep 08, 2014 at 12:16:34PM -0700, Kees Cook wrote: On Thu, Sep 04, 2014 at 06:27:48PM

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Kees Cook
On Mon, Sep 8, 2014 at 2:55 PM, Rabin Vincent wrote: > 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

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Rabin Vincent
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? > > > >

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Kees Cook
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: > > On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon wrote: > > > Hi Kees, > > > > > > On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: > > >> This is used from

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Kees Cook
On Mon, Sep 8, 2014 at 3:39 AM, Will Deacon wrote: > On Fri, Sep 05, 2014 at 08:41:08PM +0100, Kees Cook wrote: >> On Thu, Sep 4, 2014 at 10:27 AM, Will Deacon wrote: >> > On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: >> >> On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon wrote: >> >>

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Will Deacon
On Fri, Sep 05, 2014 at 08:41:08PM +0100, Kees Cook wrote: > On Thu, Sep 4, 2014 at 10:27 AM, Will Deacon wrote: > > On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: > >> On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon wrote: > >> > Hi Kees, > >> > > >> > On Wed, Sep 03, 2014 at

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Will Deacon
On Fri, Sep 05, 2014 at 08:41:08PM +0100, Kees Cook wrote: On Thu, Sep 4, 2014 at 10:27 AM, Will Deacon will.dea...@arm.com wrote: On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Wed, Sep

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Kees Cook
On Mon, Sep 8, 2014 at 3:39 AM, Will Deacon will.dea...@arm.com wrote: On Fri, Sep 05, 2014 at 08:41:08PM +0100, Kees Cook wrote: On Thu, Sep 4, 2014 at 10:27 AM, Will Deacon will.dea...@arm.com wrote: On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: On Thu, Sep 4, 2014 at 10:03

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Kees Cook
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: On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: This is used from

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Rabin Vincent
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

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-08 Thread Kees Cook
On Mon, Sep 8, 2014 at 2:55 PM, Rabin Vincent ra...@rab.in wrote: 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

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-05 Thread Kees Cook
On Thu, Sep 4, 2014 at 10:27 AM, Will Deacon wrote: > On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: >> On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon wrote: >> > Hi Kees, >> > >> > On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: >> >> This is used from set_fixmap() and

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-05 Thread Kees Cook
On Thu, Sep 4, 2014 at 10:27 AM, Will Deacon will.dea...@arm.com wrote: On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: This is used from

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-04 Thread Will Deacon
On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: > On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon wrote: > > Hi Kees, > > > > On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: > >> This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. > >> Also makes sure

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-04 Thread Kees Cook
On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon wrote: > Hi Kees, > > On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: >> This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. >> Also makes sure that the fixmap allocation fits into the expected range. >> >> Based on

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-04 Thread Will Deacon
Hi Kees, On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: > This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. > Also makes sure that the fixmap allocation fits into the expected range. > > Based on patch by Rabin Vincent. [...] > +void __set_fixmap(enum

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-04 Thread Will Deacon
Hi Kees, On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. Also makes sure that the fixmap allocation fits into the expected range. Based on patch by Rabin Vincent. [...] +void __set_fixmap(enum

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-04 Thread Kees Cook
On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. Also makes sure that the fixmap allocation fits into the expected range.

Re: [PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-04 Thread Will Deacon
On Thu, Sep 04, 2014 at 06:23:42PM +0100, Kees Cook wrote: On Thu, Sep 4, 2014 at 10:03 AM, Will Deacon will.dea...@arm.com wrote: Hi Kees, On Wed, Sep 03, 2014 at 10:57:04PM +0100, Kees Cook wrote: This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. Also makes

[PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-03 Thread Kees Cook
This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. Also makes sure that the fixmap allocation fits into the expected range. Based on patch by Rabin Vincent. Signed-off-by: Kees Cook Cc: Rabin Vincent Acked-by: Nicolas Pitre --- arch/arm/include/asm/fixmap.h | 2 ++

[PATCH v5 3/8] arm: fixmap: implement __set_fixmap()

2014-09-03 Thread Kees Cook
This is used from set_fixmap() and clear_fixmap() via asm-generic/fixmap.h. Also makes sure that the fixmap allocation fits into the expected range. Based on patch by Rabin Vincent. Signed-off-by: Kees Cook keesc...@chromium.org Cc: Rabin Vincent ra...@rab.in Acked-by: Nicolas Pitre