Messages in this thread | | | From | "David Schwartz" <> | Subject | RE: Speeding up swap | Date | Sun, 24 Oct 1999 15:24:51 -0700 |
| |
> On Sun, Oct 24, 1999 at 11:40:26AM -0700, David Schwartz wrote: > > > Then one the file twice. With one fd, you can do your > buffered, random > > accesses. With the other fd, you can do your non-buffered, sequential > > accesses. > > wouldn't that defeat the purpose of restricting lseek? a malicious program > could just open the file twice.
No, because the file descriptor that they could seek on would be subject to normal buffering rules. The feature being discussed is _per_fd_ control over caching of buffers. So the malicious program could not force the hardware to keep rereading the same small set of pages.
Of course, a malicious program could cause the hardware to keep rereading the same _large_ set of pages, but they can do that now. And this would minimize the harm that would do, because it at least wouldn't blow out the buffer cache.
DS
- 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.tux.org/lkml/
| |