Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-04 Thread John S. Dyson
Matthew Dillon said: :Matt, : :Does datasize limit the number of backed pages, or the amount of address :space used by a process? I.e., can I grow myself a large chunk of address :space using mmap to the same region of a file, and then read into that :large chunk (presumably larger than the

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-02 Thread Brian Feldman
On Mon, 1 Feb 1999, Matthew Dillon wrote: :So, never do stupid things as root; that's always my moto. Well, so I did :something stupid as root, but it wasn't inherrently *that* stupid, at :least not stupid enough to require a hard boot :). Below is the source :... :Except I decided to test

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-02 Thread Robert Watson
On Mon, 1 Feb 1999, Matthew Dillon wrote: :So this probably works for non-root users on files like /dev/zero that can :produce as much data as you might be interested in, suggesting a fun :denial of service attack for the bored and/or insane. Presumably the datasize limit can be used

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-02 Thread Matthew Dillon
:Matt, : :Does datasize limit the number of backed pages, or the amount of address :space used by a process? I.e., can I grow myself a large chunk of address :space using mmap to the same region of a file, and then read into that :large chunk (presumably larger than the cache size if I want to be

swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-01 Thread Robert Watson
So, never do stupid things as root; that's always my moto. Well, so I did something stupid as root, but it wasn't inherrently *that* stupid, at least not stupid enough to require a hard boot :). Below is the source code for the beginnings of an audit daemon--all it does is disable auditing on

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-01 Thread Matthew Dillon
:So, never do stupid things as root; that's always my moto. Well, so I did :something stupid as root, but it wasn't inherrently *that* stupid, at :least not stupid enough to require a hard boot :). Below is the source :... :Except I decided to test that feature that overrides the device filename

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-01 Thread Robert Watson
On Mon, 1 Feb 1999, Matthew Dillon wrote: Uh. Mm.. Hmm :-) i = read(fd, size, sizeof(size)); ... malloc(bufsize * sizeof(char)) i = read(fd, buf, bufsize); When you are reading /dev/mem, 'size' can turn out to be anything. You are then

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-01 Thread Matthew Dillon
: :So this probably works for non-root users on files like /dev/zero that can :produce as much data as you might be interested in, suggesting a fun :denial of service attack for the bored and/or insane. : : Robert N Watson : :Carnegie Mellon Universityhttp://www.cmu.edu/ :TIS Labs at

Re: swap_page_getswapspace failed (don't do stupid things with /dev/mem)

1999-02-01 Thread Kris Kennaway
On Mon, 1 Feb 1999, Robert Watson wrote: On Mon, 1 Feb 1999, Matthew Dillon wrote: Uh. Mm.. Hmm :-) i = read(fd, size, sizeof(size)); ... malloc(bufsize * sizeof(char)) i = read(fd, buf, bufsize); When you are reading /dev/mem, 'size' can