Subject: Re: UBC problems
To: Chuck Silvers <>
From: Steven M. Bellovin <>
List: tech-kern
Date: 01/15/2005 11:27:11
In message <>, Chuck Silvers writes:
>On Sat, Jan 15, 2005 at 10:36:39AM -0500, Steven M. Bellovin wrote:
>> In message <>, Chuck Silvers writes:
>> >hi,
>> >
>> >
>> >> -I now believe that the best way to deal with this would be to
>> >>  have UBC reads just return zero filled pages if the file is
>> >>  not backed with real data, and let upper layers (above the
>> >>  trap handler) check whether the read is legal. Just commenting
>> >>  out the range check in genfs_getpages() isn't enough,
>> >>  unfortunately. That's a pretty complex matter...
>> >
>> >creating pages for offsets past EOF is to be avoided in general, since
>> >it's pretty nonsensical.  I checked in a different fix for this issue,
>> >update uvm_bio.c.
>> >
>> I don't understand -- are you trying to bar files with holes in them?  
>> That's been part of Unix since the beginning.
>no, seeking past EOF and write()ing still works.  we just don't want to
>allow read operations for offsets past EOF.

That sounds reasonable, though I'd like to check against classical Unix 
semantics or POSIX.

		--Prof. Steven M. Bellovin,