# \[PATCH 3/6\] struct page: add field for vm\_struct

- From: Christopher Lameter \<hidden\>
- Date: 2018-02-01 00:00:36 
- List: linux-security-module
- Page: https://ratatoskr.run/linux-security-module/2018/02/5183218
- Thread: https://ratatoskr.run/linux-security-module/2018/01/5183216/t.md

```text
On Tue, 30 Jan 2018, Igor Stoppa wrote:

> @@ -1769,6 +1774,9 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
>
>  	kmemleak_vmalloc(area, size, gfp_mask);
>
> +	for (page_counter = 0; page_counter < area->nr_pages; page_counter++)
> +		area->pages[page_counter]->area = area;
> +
>  	return addr;

Well this introduces significant overhead for large sized allocation. Does
this not matter because the areas are small?

Would it not be better to use compound page allocations here?
page_head(whatever) gets you the head page where you can store all sorts
of information about the chunk of memory.


--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
