Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rayssd.UUCP Path: utzoo!linus!decvax!harpo!eagle!allegra!rayssd!dhb From: dhb@rayssd.UUCP Newsgroups: net.unix-wizards,net.wanted Subject: Need help with 4.1BSD kernel Message-ID: <234@rayssd.UUCP> Date: Wed, 9-Nov-83 14:07:42 EST Article-I.D.: rayssd.234 Posted: Wed Nov 9 14:07:42 1983 Date-Received: Fri, 11-Nov-83 05:46:42 EST Organization: Raytheon Co., Portsmouth RI Lines: 34 Does anyone know of a way to determine the end of the users address space from within the kernel on 4.1BSD? In particular, we have a locally developed device driver which massages the data being transmitted before sending it (the device on the VAX end swaps bytes around but the device on the other end does not). Every once in a while a user will develop a new program and inadvertently pass the driver an absurd number for the byte count. When this happens, the driver starts merrily swapping bytes around to get ready for the transfer and eventually blows the system out of the water. Putting restrictions on the size of transfers doesn't work because we have legimate reasons to transfer 64K at a shot and if the user specifies a buffer which is near the end of his address space and gives a byte count of 64K it will still screw up. What we need is a way to check if the sum of the start of the buffer and the byte count go past the end of the users address space. I noticed entries in a couple of the "per process" structures for the data size, stack size, and text size but it's not clear how to get from there to where I want to be. If anyone out there can help me on this (maybe somebody at UCB that worked on 4.1) I would greatly appreciate. Some of our users are starting to get annoyed (fortunately they aim their discontent at the poor fellow who is writing the new user programs). Please MAIL replies because I am three weeks behind in reading the news and I need this info right away. -- Dave Brierley Raytheon Co.; Portsmouth RI; (401)-847-8000 x4073 ...!decvax!brunix!rayssd!dhb ...!allegra!rayssd!dhb ...!linus!rayssd!dhb