On Thu, 30 Aug 2007 23:41:09 +0200, Clemens Kolbitsch said: > On Thursday 30 August 2007 23:34:52 you wrote: > > On Thu, 30 Aug 2007, Clemens Kolbitsch wrote: > > > is there no way to tell the kernel, that a certain mapping must not be > > > removed, no matter what (except of course an explicit call to sys_unmap, > > > of course)? > > > > I don't seem to get what is the issue here. Your mapping is not removed, > > only the VMAs are merged together into one larger VMA if they have > > neighbouring address ranges and compatible protection bits. See > > vma_merge(). > > the thing is that they are not. the kernel chooses to REPLACE my mapping. > > consider the user-space code: > > mmap(0xaaaa0000, 0x3000, MAP_FIXED, ...); > mmap(0xaaaa1000, 0x4000, MAP_FIXED, ...); > > here, the second call to mmap will shorten the first mapping to 0x1000 bytes > and create one big vma with size 0x5000 bytes. > > is there a way to tell it that the second mmap MUST fail? There's an LSM exit point for mmap, you could perhaps do something there. What are you trying to achieve by forcing the second one to fail?
Attachment:
pgpYcS4lxsFkK.pgp
Description: PGP signature
- Follow-Ups:
- Re: Forbid deletion of memory mappings
- From: Clemens Kolbitsch <[email protected]>
- Re: Forbid deletion of memory mappings
- References:
- Forbid deletion of memory mappings
- From: Clemens Kolbitsch <[email protected]>
- Re: Forbid deletion of memory mappings
- From: Clemens Kolbitsch <[email protected]>
- Re: Forbid deletion of memory mappings
- From: Jiri Kosina <[email protected]>
- Re: Forbid deletion of memory mappings
- From: Clemens Kolbitsch <[email protected]>
- Forbid deletion of memory mappings
- Prev by Date: Re: NFS4 authentification / fsuid
- Next by Date: Re: [PATCH] Version2 Smack: Simplified Mandatory Access Control Kernel
- Previous by thread: Re: Forbid deletion of memory mappings
- Next by thread: Re: Forbid deletion of memory mappings
- Index(es):