Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170803151550.GX12521@dhcp22.suse.cz>
Date: Thu, 3 Aug 2017 17:15:50 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Igor Stoppa <igor.stoppa@...wei.com>
Cc: Jerome Glisse <jglisse@...hat.com>, Linux-MM <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-security-module@...r.kernel.org,
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>,
	Kees Cook <keescook@...gle.com>
Subject: Re: [RFC] Tagging of vmalloc pages for supporting the pmalloc
 allocator

On Thu 03-08-17 18:06:11, Igor Stoppa wrote:
> 
> 
> On 03/08/17 17:47, Jerome Glisse wrote:
> > On Thu, Aug 03, 2017 at 03:55:50PM +0200, Michal Hocko wrote:
> >> On Thu 03-08-17 15:20:31, Igor Stoppa wrote:
> 
> [...]
> 
> >>> I am confused about this: if "private2" is a pointer, but when I get an
> >>> address, I do not even know if the address represents a valid pmalloc
> >>> page, how can i know when it's ok to dereference "private2"?
> >>
> >> because you can make all pages which back vmalloc mappings have vm_area
> >> pointer set.
> > 
> > Note that i think this might break some device driver that use vmap()
> > i think some of them use private field to store device driver specific
> > informations. But there likely is an unuse field in struct page that
> > can be use for that.
> 
> This increases the unease from my side ... it looks like there is no way
> to fully understand if a field is really used or not, without having
> deep intimate knowledge of lots of code that is only marginally involved :-/

welcome to the struct page heaven...
 
> Similarly, how would I be able to specify what would be the correct way
> to decide the member of the union to use for handling the field?

I would check the one where we have mapping. It is rather unlikely
vmalloc users would touch this one.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.