Re: [kernel-hardening] Re: [PATCH v2 1/7] random: Simplify API for random address requests

2016-08-03 Thread Jason Cooper
On Tue, Aug 02, 2016 at 01:35:13PM +1000, Michael Ellerman wrote: > Jason Cooper writes: > > On Mon, Aug 01, 2016 at 12:47:59PM -0700, Kees Cook wrote: > >> On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: > >> > >> I have no new call sites in mind, but it seems safe to add a BUG_ON to > >>

Re: [kernel-hardening] Re: [PATCH v2 1/7] random: Simplify API for random address requests

2016-08-01 Thread Michael Ellerman
Jason Cooper writes: > On Mon, Aug 01, 2016 at 12:47:59PM -0700, Kees Cook wrote: >> On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: >> >> I have no new call sites in mind, but it seems safe to add a BUG_ON to >> verify we don't gain callers that don't follow the correct >> expectations. (O

Re: [PATCH v2 1/7] random: Simplify API for random address requests

2016-08-01 Thread Jason Cooper
Hi Kees, On Mon, Aug 01, 2016 at 12:47:59PM -0700, Kees Cook wrote: > On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: > > On Sun, Jul 31, 2016 at 09:46:53AM -0700, Kees Cook wrote: > >> On Sat, Jul 30, 2016 at 8:42 AM, Jason Cooper wrote: > >> > To date, all callers of randomize_range() hav

Re: [PATCH v2 1/7] random: Simplify API for random address requests

2016-08-01 Thread Kees Cook
On Sun, Jul 31, 2016 at 1:56 PM, Jason Cooper wrote: > On Sun, Jul 31, 2016 at 09:46:53AM -0700, Kees Cook wrote: >> On Sat, Jul 30, 2016 at 8:42 AM, Jason Cooper wrote: >> > To date, all callers of randomize_range() have set the length to 0, and >> > check for a zero return value. For the curre

Re: [PATCH v2 1/7] random: Simplify API for random address requests

2016-07-31 Thread Jason Cooper
On Sun, Jul 31, 2016 at 09:46:53AM -0700, Kees Cook wrote: > On Sat, Jul 30, 2016 at 8:42 AM, Jason Cooper wrote: > > To date, all callers of randomize_range() have set the length to 0, and > > check for a zero return value. For the current callers, the only way > > to get zero returned is if end

Re: [PATCH v2 1/7] random: Simplify API for random address requests

2016-07-31 Thread Kees Cook
On Sat, Jul 30, 2016 at 8:42 AM, Jason Cooper wrote: > To date, all callers of randomize_range() have set the length to 0, and > check for a zero return value. For the current callers, the only way > to get zero returned is if end <= start. Since they are all adding a > constant to the start add