Re: [PATCH] New phys_addr() syscall

Tony Cook (kernel@cook.ml.org)
Mon, 20 Jul 1998 14:22:39 +1000 (EST)


On Mon, 20 Jul 1998, Richard Gooch wrote:

> Just so I'm clear on this: I'm in no way saying that phys_addr(2)
> combined with mlock(2) is the proper way to do this. I just wanted to
> point out that you *could*, if you wanted. Sigh. Maybe I shouldn't
> have mentioned that aspect at all.

I'm wondering if phys_addr(2) could be used in combination with
mlock(2) to fragment physical memory.

Could an attacker:

for() {
allocate a large block of memory and page it in (memset(base, 1, size))
scan the block with phys_addr(2) looking for blocks matching a pattern
(eg. every second block)
mlock those blocks
}

This simple version could be easily defeated with ulimit, but is it
possible a more sophisticated version wouldn't be?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html