Re: user malloc from kernel
From: Pawel Jakub Dawidek (nick_at_garage.freebsd.pl)
Date: 09/29/03
- Previous message: Peter Pentchev: "Re: user malloc from kernel"
- In reply to: Peter Pentchev: "Re: user malloc from kernel"
- Next in thread: Terry Lambert: "Re: user malloc from kernel"
- Reply: Terry Lambert: "Re: user malloc from kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Sep 2003 21:12:58 +0200 To: earthman <earthman@inbox.ru>, freebsd-hackers@freebsd.org
On Mon, Sep 29, 2003 at 06:56:13PM +0300, Peter Pentchev wrote:
+> I mean, won't the application's memory manager attempt to allocate the
+> next chunk of memory right over the region that you have stolen with
+> this brk(2) invocation? Thus, when the application tries to write into
+> its newly-allocated memory, it will overwrite the data that the kernel
+> has placed there, and any attempt to access the kernel's data later will
+> fail in wonderfully unpredictable ways :)
I'm not sure if newly allocated memory will overwrite memory allocated
in kernel, but for sure process is able to write to this memory.
Sometime ago I proposed model which will allow to remove all copyin(9)
calls and many copyout(9), but I'm not so skilled in VM to implement it.
-- Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net
- application/pgp-signature attachment: stored
- Previous message: Peter Pentchev: "Re: user malloc from kernel"
- In reply to: Peter Pentchev: "Re: user malloc from kernel"
- Next in thread: Terry Lambert: "Re: user malloc from kernel"
- Reply: Terry Lambert: "Re: user malloc from kernel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [ANNOUNCE] Linux 2.4.32-hf32.7
... I finally put together my the remaining fixes for kernel 2.4.32. ... would read
kernel memory beyond the allocation size, ... If SCTP receives a badly formatted HB-ACK
chunk, ... same inode on ext3 filesystem. ... (Linux-Kernel) - Linux 2.4: Allocation of >1GB in one chunk
... machine has 4GB memory and 4GB swap. ... is 1.3GB in one whole chunk.
... Will allocate 2621440000 bytes in 1MB chunks... ... unfortunately I don't know
_where_ it fails. ... (Linux-Kernel) - Re: kernel memory
... Kernel virtual address space is used for a number of things. ... Pat of this
are the memory pools, from which you can allocate memory for your drivers. ... You can
allocate physical memory using a DDI like MmAllocatePagesForMdl and then map those into the system
address space. ... That's probably the easiest way to explain why you cannot allocate 1GB of non-paged
pool for yourself:) ... (microsoft.public.development.device.drivers) - Re: PAE Slowdown
... Richard Todd wrote: ... When I compile the PAE kernel, ... This
cause a chunk ... of your main memory ... (freebsd-stable) - Re: Allocating kernel memory
... The kernel have a disk cache, ... > memory available within the kernel
does not imply I do not understand ... >> to allocate high memory pages and map them
into kernel ... > So you are saying that the kernel does not map all of physical memory
... (comp.os.linux.development.system)