From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 18 May 2002 22:08:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 18 May 2002 22:08:12 -0400 Received: from slip-202-135-75-36.ca.au.prserv.net ([202.135.75.36]:59018 "EHLO wagner.rustcorp.com.au") by vger.kernel.org with ESMTP id ; Sat, 18 May 2002 22:08:11 -0400 From: Rusty Russell To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au, alan@lxorguk.ukuu.org.uk Subject: Re: AUDIT: copy_from_user is a deathtrap. In-Reply-To: Your message of "Sat, 18 May 2002 09:14:10 MST." Date: Sun, 19 May 2002 12:10:38 +1000 Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org In message you wr ite: > > > On 18 May 2002, Andi Kleen wrote: > > > > Are you sure they even exist ? > > Oh, like read() or write() for regular files? Yup, they exist. Huh? No, you ask for 2000 bytes into a buffer that can only take 1000 bytes without hitting an unmapped page, returning EFAULT or giving a SIGSEGV is perfectly acceptable. As a coder, I'd *really* prefer that to hiding the bug! There's only one case which really actually cares for a valid reason: the hack in copying mount options. Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell.