Re: Correct way to access the physmap? - Was: Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-05-03 Thread Igor Stoppa
On 04/05/18 01:55, Dave Hansen wrote: On 05/03/2018 02:52 PM, Igor Stoppa wrote: At the end of the summit, we agreed that I would go through the physmap. Do you mean the kernel linear map? Apparently I did mean it. It was confusing, because I couldn't find a single place stating it

Re: Correct way to access the physmap? - Was: Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-05-03 Thread Igor Stoppa
On 04/05/18 01:55, Dave Hansen wrote: On 05/03/2018 02:52 PM, Igor Stoppa wrote: At the end of the summit, we agreed that I would go through the physmap. Do you mean the kernel linear map? Apparently I did mean it. It was confusing, because I couldn't find a single place stating it

Re: Correct way to access the physmap? - Was: Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-05-03 Thread Dave Hansen
On 05/03/2018 02:52 PM, Igor Stoppa wrote: > At the end of the summit, we agreed that I would go through the physmap. Do you mean the kernel linear map? That's just another name for the virtual address that you get back from page_to_virt(): int *j = page_to_virt(vmalloc_to_page(i));

Re: Correct way to access the physmap? - Was: Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-05-03 Thread Dave Hansen
On 05/03/2018 02:52 PM, Igor Stoppa wrote: > At the end of the summit, we agreed that I would go through the physmap. Do you mean the kernel linear map? That's just another name for the virtual address that you get back from page_to_virt(): int *j = page_to_virt(vmalloc_to_page(i));

Correct way to access the physmap? - Was: Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-05-03 Thread Igor Stoppa
On 24/04/18 15:50, Matthew Wilcox wrote: On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to support a separate class of data,

Correct way to access the physmap? - Was: Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-05-03 Thread Igor Stoppa
On 24/04/18 15:50, Matthew Wilcox wrote: On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to support a separate class of data,

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-25 Thread Igor Stoppa
On 24/04/18 18:44, Matthew Wilcox wrote: On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: On 4/24/18 1:50 PM, Matthew Wilcox wrote: struct modifiable_data { struct immutable_data *d; ... }; Then allocate a new pool, change d and destroy the old pool. With the

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-25 Thread Igor Stoppa
On 24/04/18 18:44, Matthew Wilcox wrote: On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: On 4/24/18 1:50 PM, Matthew Wilcox wrote: struct modifiable_data { struct immutable_data *d; ... }; Then allocate a new pool, change d and destroy the old pool. With the

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 16:33, Igor Stoppa wrote: On 24/04/18 15:50, Matthew Wilcox wrote: On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 16:33, Igor Stoppa wrote: On 24/04/18 15:50, Matthew Wilcox wrote: On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 19:03, lazytyped wrote: On 4/24/18 4:44 PM, Matthew Wilcox wrote: On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: On 4/24/18 1:50 PM, Matthew Wilcox wrote: struct modifiable_data { struct immutable_data *d; ... }; Then allocate a new pool, change d

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 19:03, lazytyped wrote: On 4/24/18 4:44 PM, Matthew Wilcox wrote: On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: On 4/24/18 1:50 PM, Matthew Wilcox wrote: struct modifiable_data { struct immutable_data *d; ... }; Then allocate a new pool, change d

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread lazytyped
On 4/24/18 4:44 PM, Matthew Wilcox wrote: > On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: >> On 4/24/18 1:50 PM, Matthew Wilcox wrote: >>> struct modifiable_data { >>> struct immutable_data *d; >>> ... >>> }; >>> >>> Then allocate a new pool, change d and destroy the old

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread lazytyped
On 4/24/18 4:44 PM, Matthew Wilcox wrote: > On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: >> On 4/24/18 1:50 PM, Matthew Wilcox wrote: >>> struct modifiable_data { >>> struct immutable_data *d; >>> ... >>> }; >>> >>> Then allocate a new pool, change d and destroy the old

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Matthew Wilcox
On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: > On 4/24/18 1:50 PM, Matthew Wilcox wrote: > > struct modifiable_data { > > struct immutable_data *d; > > ... > > }; > > > > Then allocate a new pool, change d and destroy the old pool. > > With the above, you have just shifted

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Matthew Wilcox
On Tue, Apr 24, 2018 at 02:32:36PM +0200, lazytyped wrote: > On 4/24/18 1:50 PM, Matthew Wilcox wrote: > > struct modifiable_data { > > struct immutable_data *d; > > ... > > }; > > > > Then allocate a new pool, change d and destroy the old pool. > > With the above, you have just shifted

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 16:32, lazytyped wrote: On 4/24/18 1:50 PM, Matthew Wilcox wrote: struct modifiable_data { struct immutable_data *d; ... }; Then allocate a new pool, change d and destroy the old pool. With the above, you have just shifted the target of the arbitrary write

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 16:32, lazytyped wrote: On 4/24/18 1:50 PM, Matthew Wilcox wrote: struct modifiable_data { struct immutable_data *d; ... }; Then allocate a new pool, change d and destroy the old pool. With the above, you have just shifted the target of the arbitrary write

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 15:50, Matthew Wilcox wrote: On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to support a separate class of data,

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Igor Stoppa
On 24/04/18 15:50, Matthew Wilcox wrote: On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to support a separate class of data,

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread lazytyped
On 4/24/18 1:50 PM, Matthew Wilcox wrote: > struct modifiable_data { > struct immutable_data *d; > ... > }; > > Then allocate a new pool, change d and destroy the old pool. With the above, you have just shifted the target of the arbitrary write from the immutable data itself to the

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread lazytyped
On 4/24/18 1:50 PM, Matthew Wilcox wrote: > struct modifiable_data { > struct immutable_data *d; > ... > }; > > Then allocate a new pool, change d and destroy the old pool. With the above, you have just shifted the target of the arbitrary write from the immutable data itself to the

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: > While the vanilla version of pmalloc provides support for permanently > transitioning between writable and read-only of a memory pool, this > patch seeks to support a separate class of data, which would still > benefit from write

Re: [PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-24 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 04:54:56PM +0400, Igor Stoppa wrote: > While the vanilla version of pmalloc provides support for permanently > transitioning between writable and read-only of a memory pool, this > patch seeks to support a separate class of data, which would still > benefit from write

[PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-23 Thread Igor Stoppa
While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to support a separate class of data, which would still benefit from write protection, most of the time, but it still needs to be modifiable. Maybe

[PATCH 7/9] Pmalloc Rare Write: modify selected pools

2018-04-23 Thread Igor Stoppa
While the vanilla version of pmalloc provides support for permanently transitioning between writable and read-only of a memory pool, this patch seeks to support a separate class of data, which would still benefit from write protection, most of the time, but it still needs to be modifiable. Maybe