From owner-freebsd-current Thu Mar 4 19:45: 2 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id D111C15074 for ; Thu, 4 Mar 1999 19:44:59 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id TAA37181; Thu, 4 Mar 1999 19:43:40 -0800 (PST) (envelope-from dillon) Date: Thu, 4 Mar 1999 19:43:40 -0800 (PST) From: Matthew Dillon Message-Id: <199903050343.TAA37181@apollo.backplane.com> To: Peter Jeremy Cc: current@FreeBSD.ORG Subject: Re: Simple DOS against 3.x locks box solid References: <99Mar5.141337est.40405@border.alcanet.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Another interim solution would be to `fix' GNU grep so it doesn't :attempt to read() into mmap()'d space. (Having not looked at the :code, I don't know how difficult this would be). : :As for the general problem, is it sensible to allow a read-only file to :be mmap'd R/W (with or without MAP_PRIVATE) and then written into? It :would be fairly easy to make mmap() return EACCES if the fd was not :open for writing (or map the memory R/O and SEGV on a write). : :I would personally prefer to see a process die with an mmap failure :(or SIGSEGV), rather than cause a deadlock - ie even if we do want/ :... We really need to fix the kernel, I think. This sort of deadlock situation has been a problem for too long and it is only going to get worse as more programs use mmap(). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message