Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-29 Thread Kees Cook
On Thu, Jun 29, 2017 at 7:42 PM, Li Kun wrote: > > > on 2017/6/30 6:05, Kees Cook wrote: >> >> On Wed, Jun 28, 2017 at 9:13 PM, Li Kun wrote: >>> >>> 在 2017/5/31 5:39, Kees Cook 写道: +bool ex_handler_refcount(const struct exception_table_entry

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-29 Thread Kees Cook
On Thu, Jun 29, 2017 at 7:42 PM, Li Kun wrote: > > > on 2017/6/30 6:05, Kees Cook wrote: >> >> On Wed, Jun 28, 2017 at 9:13 PM, Li Kun wrote: >>> >>> 在 2017/5/31 5:39, Kees Cook 写道: +bool ex_handler_refcount(const struct exception_table_entry *fixup, +

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-29 Thread Li Kun
on 2017/6/30 6:05, Kees Cook wrote: On Wed, Jun 28, 2017 at 9:13 PM, Li Kun wrote: 在 2017/5/31 5:39, Kees Cook 写道: +bool ex_handler_refcount(const struct exception_table_entry *fixup, +struct pt_regs *regs, int trapnr) +{ + int reset; + +

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-29 Thread Li Kun
on 2017/6/30 6:05, Kees Cook wrote: On Wed, Jun 28, 2017 at 9:13 PM, Li Kun wrote: 在 2017/5/31 5:39, Kees Cook 写道: +bool ex_handler_refcount(const struct exception_table_entry *fixup, +struct pt_regs *regs, int trapnr) +{ + int reset; + + /* +* If

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-29 Thread Kees Cook
On Wed, Jun 28, 2017 at 9:13 PM, Li Kun wrote: > 在 2017/5/31 5:39, Kees Cook 写道: >> +bool ex_handler_refcount(const struct exception_table_entry *fixup, >> +struct pt_regs *regs, int trapnr) >> +{ >> + int reset; >> + >> + /* >> +*

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-29 Thread Kees Cook
On Wed, Jun 28, 2017 at 9:13 PM, Li Kun wrote: > 在 2017/5/31 5:39, Kees Cook 写道: >> +bool ex_handler_refcount(const struct exception_table_entry *fixup, >> +struct pt_regs *regs, int trapnr) >> +{ >> + int reset; >> + >> + /* >> +* If we crossed from

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-28 Thread Li Kun
Hi Kees, 在 2017/5/31 5:39, Kees Cook 写道: This protection is a modified version of the x86 PAX_REFCOUNT defense from PaX/grsecurity. This speeds up the refcount_t API by duplicating the existing atomic_t implementation with a single instruction added to detect if the refcount has wrapped past

Re: [kernel-hardening] [PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-06-28 Thread Li Kun
Hi Kees, 在 2017/5/31 5:39, Kees Cook 写道: This protection is a modified version of the x86 PAX_REFCOUNT defense from PaX/grsecurity. This speeds up the refcount_t API by duplicating the existing atomic_t implementation with a single instruction added to detect if the refcount has wrapped past