From owner-freebsd-arch Tue Jan 21 18:24:58 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DFFE37B401 for ; Tue, 21 Jan 2003 18:24:56 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DC0843E4A for ; Tue, 21 Jan 2003 18:24:55 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id h0M2Or1e088675; Tue, 21 Jan 2003 19:24:54 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 21 Jan 2003 19:23:09 -0700 (MST) Message-Id: <20030121.192309.127431911.imp@bsdimp.com> To: bright@mu.org Cc: arch@FreeBSD.ORG Subject: Re: Alfre's malloc changes: the next step From: "M. Warner Losh" In-Reply-To: <20030122004845.GM42333@elvis.mu.org> References: <20030122002758.GL42333@elvis.mu.org> <082501c2c1ae$83015c90$52557f42@errno.com> <20030122004845.GM42333@elvis.mu.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20030122004845.GM42333@elvis.mu.org> Alfred Perlstein writes: : I haven't said that. What I keep asking for is a solution other than : "back it out". Do I really need to give a message that implies premature : ejactulation as much respect as I already have? I already gave an alternative to do that. Only part of my proposal was a backout, but that was mostly to restore the M_ flags that were there prior to the commit. I don't consider that whining. I consider that proposing an alterative. : The only other solution that makes some sense would be to do this: : : restore M_WAITOK, but make it a bit, 0x02 Can't make it bit 0x2 because that's already M_USE_RESERVE, which is why I picked 0x10 and 0x20 for M_NOWAIT and M_WAITOK. I also specifically didn't make M_WAITOK and M_DOWAIT the same because they have subtly different semantics that the users of them should know. : Now either just share them with the mbuf subsystem... or make the mbuf : flags MB_WAIT/MB_NOWAIT. The MB_ flag option is appealing, but has compatibility issues with other systems. It wouldn't be a huge deal to add #ifdefs to those files that are shared, but then you get the problem in a subset of files. There was some agreement to change these, but not much when I was talking it over. If enough people think this is a good idea, I'd go with it, but I'm not sure that enough want it. : Without looking at the manpages I'd like you to try to remeber which of : the old flags went with which interface. One could argue that using an interface w/o looking at the man page is asking for problems. : Of course we'll still have people making mistakes, and if assertions are : sprinkled in to "catch" this, we'll have user or even remote DoS's when : it creeps into uncommon code paths. We already have that, except that people are silently doing the wrong thing and we only die in rare cases. : Before we even go down that path, can you show me some code that : is not completely obviously wrong that can cause a problem with the : current change? There's plenty of cvs history that shows that old : flags/interface caused problems. Sure. I'll post something later tonight. Finally, this isn't an attack on you personally. I saw a lot of people having concerns about the changes you made and went in and proposed an alternative and am working on coding it up. I'll post diffs and get a consensus (or as much of one as I can) before I change anything. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message