On Wed, Dec 24, 2003 at 07:46:32AM +0000, Brian J. Beesley wrote:
> On Tuesday 23 December 2003 20:15, Matthias Waldhauer wrote:
> >
> > Last friday I read some messages about recent kernel modifications and
> > patches for version 2.6.0. There is an "imcplicit_large_page" patch,
> > allowing applications to use large pages without modifications. I don't
> > have the time to dig into it :(
> 
> Sure. This is a much better approach than mucking about with 
> application-specific modifications which would likely involve serious 
> security hazards (leaking kernel priveleges to the application) and/or clash 
> with other applications private large-page code and/or large page enabled 
> kernels in the future.

Its also a much more invasive approach - changing something as
fundamental as the kernels page size (and the assumption that its
constant) is very hard work - don't expect it in 2.6!

As for security hazards - the hugepage implementation in 2.6 has been
very well thought out.  No extra privs are required.  The super user
must :-

a) allocate some huge pages
b) mount the hugetlbfs filesystem
c) use standard unix permissions so the right user(s) can use
   hugetlbfs

The permissioned user can then allocate huge pages using mmap out of
hugetlbfs.

You use my particular hack with a couple of LD_PRELOAD libraries which
doesn't require patching the application, eg

  LD_PRELOAD="`pwd`/intercept.so `pwd`/alloc.so" ./mprime -m

So you can use huge pages with any application that is dynamically
linked.

This seems pretty secure and non-invasive to me ;-)

(I will shortly put full instructions and code on a web page - family
duties over christmas permitting!)

-- 
Nick Craig-Wood
[EMAIL PROTECTED]
_________________________________________________________________________
Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to