Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760972AbYJITXd (ORCPT ); Thu, 9 Oct 2008 15:23:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757993AbYJITXU (ORCPT ); Thu, 9 Oct 2008 15:23:20 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:57049 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758965AbYJITXT (ORCPT ); Thu, 9 Oct 2008 15:23:19 -0400 Date: Thu, 9 Oct 2008 12:22:23 -0700 (PDT) From: Linus Torvalds To: Miklos Szeredi cc: jens.axboe@oracle.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: splice vs O_APPEND In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1140 Lines: 27 On Thu, 9 Oct 2008, Miklos Szeredi wrote: > > We know that nobody is currently relying on O_APPEND semantics with > splice, so this should be OK. Having now realized that apparently you can't rely on O_APPEND for anything but plain write _anyway_ (ie pwrite shouldn't honor it), I'm going to drop this thing as "let's think about it more". Maybe the right thing to do is to just say that O_APPEND (and IS_APPEND) is really not as reliable as people might expect, and just say that the only thing it affects is a plain write() system call. Of course, I think POSIX is crazy, and we probably _should_ always honor O_APPEND, and returning -EINVAL is the right thing for both pwrite and splice, but this is all a murkier issue than it looked like originally, and any possible "security" implications are dubious in that you cannot really depend on O_APPEND/IS_APPEND anyway. Linus -- 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/