Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964780AbWCTNar (ORCPT ); Mon, 20 Mar 2006 08:30:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964777AbWCTNar (ORCPT ); Mon, 20 Mar 2006 08:30:47 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:49281 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S964775AbWCTNaq (ORCPT ); Mon, 20 Mar 2006 08:30:46 -0500 Subject: Re: DoS with POSIX file locks? From: Arjan van de Ven To: Miklos Szeredi Cc: matthew@wil.cx, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: <20060320121107.GE8980@parisc-linux.org> <20060320123950.GF8980@parisc-linux.org> <1142860423.3114.41.camel@laptopd505.fenrus.org> Content-Type: text/plain Date: Mon, 20 Mar 2006 14:30:41 +0100 Message-Id: <1142861441.3114.45.camel@laptopd505.fenrus.org> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1316 Lines: 30 On Mon, 2006-03-20 at 14:24 +0100, Miklos Szeredi wrote: > > > > Right. Um. I took it out back in March 2003 after enough people > > > > convinced me it wasn't worth trying to account for all the memory > > > > processes use, and the userbeans project would take care of it anyway. > > > > Haha. > > > > > > > > It's hard to fix the accounting. You have to deal with one thread > > > > allocating the lock, and then a different thread freeing it. We never > > > > actually accounted for posix locks (which are the ones we really needed > > > > to!) and on occasion had current->locks go negative, with all kinds of > > > > associated badness. > > > > > > Things look fairly straightforward if the accounting is done in > > > files_struct instead of task_struct. > > > > that's the wrong place; you can send fd's over unix sockets to other > > processes.... > > POSIX locks have no association with fd's. Only the inode and the > "owner" is relevant but the point is that with unix sockets you can send inodes to other processes.. who don't share files_struct - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/