lkml.org 
[lkml]   [2011]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/3]: Staging: hv: Use native page allocation/free functions
Date


> -----Original Message-----
> And then KY Srinivasan spoke on Friday, February 11, 2011 12:56 PM
> > From: Greg KH [mailto:gregkh@suse.de]
> > Sent: Friday, February 11, 2011 1:30 PM
> > > - virtaddr = osd_virtual_alloc_exec(PAGE_SIZE);
> > > +#ifdef __x86_64__
> > > + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL,
> PAGE_KERNEL_EXEC);
> > #else
> > > + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL,
> > > + __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); #endif
> >
> > I'm not saying this patch is wrong at all, but I still don't
> > understand why this is different depending on the architecture of the
> > machine. Why is this necessary, it should be ok to do the same type
> > of allocation no matter what the processor is, right?
>
> You are right Greg; I don't think there is a need to specify different page
> protection bits based on the architecture - PAGE_KERNEL_EXEC should be
> enough.
> However, this is the code that is currently in the tree - refer to osd.c.
> If it is ok with you, I could submit an additional patch to clean this up.
>

I seem to recall that we did it for very old versions of Linux (pre 2.6.18)
But I cannot for the life of me remember why.

Hank.



\
 
 \ /
  Last update: 2011-02-11 22:29    [W:0.043 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site