Re: [PATCH] mm: SLAB freelist randomization

2016-04-25 Thread Andrew Morton
On Mon, 18 Apr 2016 12:52:30 -0700 Thomas Garnier wrote: > I agree, if we had a generic way to pass entropy across boots on all > architecture that would be amazing. I will let the SLAB maintainers to > decide on requiring CONFIG_ARCH_RANDOM or documenting it. In our world,

Re: [PATCH] mm: SLAB freelist randomization

2016-04-25 Thread Andrew Morton
On Mon, 18 Apr 2016 12:52:30 -0700 Thomas Garnier wrote: > I agree, if we had a generic way to pass entropy across boots on all > architecture that would be amazing. I will let the SLAB maintainers to > decide on requiring CONFIG_ARCH_RANDOM or documenting it. In our world, requiring that sort

Re: [PATCH] mm: SLAB freelist randomization

2016-04-18 Thread Thomas Garnier
I agree, if we had a generic way to pass entropy across boots on all architecture that would be amazing. I will let the SLAB maintainers to decide on requiring CONFIG_ARCH_RANDOM or documenting it. On Mon, Apr 18, 2016 at 12:36 PM, Laura Abbott wrote: > On 04/18/2016 08:59

Re: [PATCH] mm: SLAB freelist randomization

2016-04-18 Thread Thomas Garnier
I agree, if we had a generic way to pass entropy across boots on all architecture that would be amazing. I will let the SLAB maintainers to decide on requiring CONFIG_ARCH_RANDOM or documenting it. On Mon, Apr 18, 2016 at 12:36 PM, Laura Abbott wrote: > On 04/18/2016 08:59 AM, Thomas Garnier

Re: [PATCH] mm: SLAB freelist randomization

2016-04-18 Thread Laura Abbott
On 04/18/2016 08:59 AM, Thomas Garnier wrote: I will send the next version today. Note that I get_random_bytes_arch is used because at that stage we have 0 bits of entropy. It seemed like a better idea to use the arch version that will fallback on get_random_bytes sub API in the worse case.

Re: [PATCH] mm: SLAB freelist randomization

2016-04-18 Thread Laura Abbott
On 04/18/2016 08:59 AM, Thomas Garnier wrote: I will send the next version today. Note that I get_random_bytes_arch is used because at that stage we have 0 bits of entropy. It seemed like a better idea to use the arch version that will fallback on get_random_bytes sub API in the worse case.

Re: [PATCH] mm: SLAB freelist randomization

2016-04-18 Thread Thomas Garnier
I will send the next version today. Note that I get_random_bytes_arch is used because at that stage we have 0 bits of entropy. It seemed like a better idea to use the arch version that will fallback on get_random_bytes sub API in the worse case. On Fri, Apr 15, 2016 at 3:47 PM, Thomas Garnier

Re: [PATCH] mm: SLAB freelist randomization

2016-04-18 Thread Thomas Garnier
I will send the next version today. Note that I get_random_bytes_arch is used because at that stage we have 0 bits of entropy. It seemed like a better idea to use the arch version that will fallback on get_random_bytes sub API in the worse case. On Fri, Apr 15, 2016 at 3:47 PM, Thomas Garnier

Re: [PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Thomas Garnier
Thanks for the comments. I will address them in a v2 early next week. If anyone has other comments, please let me know. Thomas On Fri, Apr 15, 2016 at 3:26 PM, Joe Perches wrote: > On Fri, 2016-04-15 at 15:00 -0700, Andrew Morton wrote: >> On Fri, 15 Apr 2016 10:25:59 -0700

Re: [PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Thomas Garnier
Thanks for the comments. I will address them in a v2 early next week. If anyone has other comments, please let me know. Thomas On Fri, Apr 15, 2016 at 3:26 PM, Joe Perches wrote: > On Fri, 2016-04-15 at 15:00 -0700, Andrew Morton wrote: >> On Fri, 15 Apr 2016 10:25:59 -0700 Thomas Garnier >>

Re: [PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Joe Perches
On Fri, 2016-04-15 at 15:00 -0700, Andrew Morton wrote: > On Fri, 15 Apr 2016 10:25:59 -0700 Thomas Garnier wrote: > > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > > SLAB freelist. The list is randomized during initialization of a new set > > of

Re: [PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Joe Perches
On Fri, 2016-04-15 at 15:00 -0700, Andrew Morton wrote: > On Fri, 15 Apr 2016 10:25:59 -0700 Thomas Garnier wrote: > > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > > SLAB freelist. The list is randomized during initialization of a new set > > of pages. The order on

Re: [PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Andrew Morton
On Fri, 15 Apr 2016 10:25:59 -0700 Thomas Garnier wrote: > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > SLAB freelist. The list is randomized during initialization of a new set > of pages. The order on different freelist sizes is pre-computed at

Re: [PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Andrew Morton
On Fri, 15 Apr 2016 10:25:59 -0700 Thomas Garnier wrote: > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > SLAB freelist. The list is randomized during initialization of a new set > of pages. The order on different freelist sizes is pre-computed at boot > for performance.

[PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Thomas Garnier
Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the SLAB freelist. The list is randomized during initialization of a new set of pages. The order on different freelist sizes is pre-computed at boot for performance. This security feature reduces the predictability of the kernel SLAB

[PATCH] mm: SLAB freelist randomization

2016-04-15 Thread Thomas Garnier
Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the SLAB freelist. The list is randomized during initialization of a new set of pages. The order on different freelist sizes is pre-computed at boot for performance. This security feature reduces the predictability of the kernel SLAB