Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-03 Thread Hoeun Ryu
> On Mar 4, 2017, at 5:50 AM, Andy Lutomirski wrote: > >> On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: >> +unsigned long __rare_write_rw_alias_start = TASK_SIZE_64 / 4; >> + >> +__always_inline unsigned long __arch_rare_write_map(void) >> +{ >> +

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-03 Thread Hoeun Ryu
> On Mar 4, 2017, at 5:50 AM, Andy Lutomirski wrote: > >> On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: >> +unsigned long __rare_write_rw_alias_start = TASK_SIZE_64 / 4; >> + >> +__always_inline unsigned long __arch_rare_write_map(void) >> +{ >> + struct mm_struct *mm = _write_mm; >>

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-03 Thread Hoeun Ryu
> On Mar 3, 2017, at 1:02 PM, Kees Cook wrote: > >> On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: >> This RFC is a quick and dirty arm64 implementation for Kees Cook's RFC for >> rare_write infrastructure [1]. > > Awesome! :) > >> This

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-03 Thread Hoeun Ryu
> On Mar 3, 2017, at 1:02 PM, Kees Cook wrote: > >> On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: >> This RFC is a quick and dirty arm64 implementation for Kees Cook's RFC for >> rare_write infrastructure [1]. > > Awesome! :) > >> This implementation is based on Mark Rutland's

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-03 Thread Andy Lutomirski
On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: > +unsigned long __rare_write_rw_alias_start = TASK_SIZE_64 / 4; > + > +__always_inline unsigned long __arch_rare_write_map(void) > +{ > + struct mm_struct *mm = _write_mm; > + > + preempt_disable(); > + > +

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-03 Thread Andy Lutomirski
On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: > +unsigned long __rare_write_rw_alias_start = TASK_SIZE_64 / 4; > + > +__always_inline unsigned long __arch_rare_write_map(void) > +{ > + struct mm_struct *mm = _write_mm; > + > + preempt_disable(); > + > + __switch_mm(mm); ...

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-02 Thread Kees Cook
On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: > This RFC is a quick and dirty arm64 implementation for Kees Cook's RFC for > rare_write infrastructure [1]. Awesome! :) > This implementation is based on Mark Rutland's suggestions, which is that > a special userspace mm

Re: [RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-02 Thread Kees Cook
On Thu, Mar 2, 2017 at 7:00 AM, Hoeun Ryu wrote: > This RFC is a quick and dirty arm64 implementation for Kees Cook's RFC for > rare_write infrastructure [1]. Awesome! :) > This implementation is based on Mark Rutland's suggestions, which is that > a special userspace mm that maps only

[RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-02 Thread Hoeun Ryu
This RFC is a quick and dirty arm64 implementation for Kees Cook's RFC for rare_write infrastructure [1]. This implementation is based on Mark Rutland's suggestions, which is that a special userspace mm that maps only __start/end_rodata as RW permission is prepared during early boot time

[RFC] arm64: support HAVE_ARCH_RARE_WRITE

2017-03-02 Thread Hoeun Ryu
This RFC is a quick and dirty arm64 implementation for Kees Cook's RFC for rare_write infrastructure [1]. This implementation is based on Mark Rutland's suggestions, which is that a special userspace mm that maps only __start/end_rodata as RW permission is prepared during early boot time