From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754276AbZEOL4j (ORCPT ); Fri, 15 May 2009 07:56:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752420AbZEOL42 (ORCPT ); Fri, 15 May 2009 07:56:28 -0400 Received: from mail-fx0-f158.google.com ([209.85.220.158]:48534 "EHLO mail-fx0-f158.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbZEOL41 (ORCPT ); Fri, 15 May 2009 07:56:27 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; b=nXA5yS3txfSkawjOkS6KCyaGVW82pHvyGFKAHdokD5Zb8ycCGcGMayrySKC0Hniih6 Aqp48G4MfCB86a/fjdDG50NWjZAjpEkxSC1CLpFyISxTFe+shYWdEnTkC5SlDumGughl w1Do5DacfYgqDH3YhBTpPtHkCGAjYWOxOuAfg= Date: Fri, 15 May 2009 13:56:25 +0200 Message-ID: <87hbzmd1g6.wl%vmayatsk@redhat.com> From: Vitaly Mayatskikh To: Andi Kleen Cc: Vitaly Mayatskikh , Josef Bacik , sandeen@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Perform check in iov_iter_fault_in_readable() by check_readable_bytes() In-Reply-To: <20090515093838.GB16682@one.firstfloor.org> References: <1242317939-15392-1-git-send-email-v.mayatskih@gmail.com> <1242317939-15392-3-git-send-email-v.mayatskih@gmail.com> <87k54iq2gv.fsf@basil.nowhere.org> <871vqqkdf0.wl%vmayatsk@redhat.com> <20090515093838.GB16682@one.firstfloor.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/22.3 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 15 May 2009 11:38:38 +0200, Andi Kleen wrote: > Is that really something that users rely on? It looks like a seriously > broken user program. Which one is that? (just that I can avoid it :) IIRC, it was first noticed in some sanity test from ltp suite ;) I'm readiny POSIX spec for write() once again: http://www.opengroup.org/onlinepubs/9699919799/functions/write.html "The write() function shall attempt to write nbyte bytes from the buffer pointed to by buf to the file associated with the open file descriptor, fildes." Well, "shall attempt"... It's not clear to me, is it enough just to validate user's buffer and gave up with error, like we do now? -- wbr, Vitaly