Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752544Ab0ARBwk (ORCPT ); Sun, 17 Jan 2010 20:52:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752197Ab0ARBwj (ORCPT ); Sun, 17 Jan 2010 20:52:39 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:60301 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932088Ab0ARBwi (ORCPT ); Sun, 17 Jan 2010 20:52:38 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Mon, 18 Jan 2010 10:49:13 +0900 From: KAMEZAWA Hiroyuki To: OGAWA Hirofumi Cc: Wu Fengguang , Andrew Morton , Al Viro , Heiko Carstens , Christoph Hellwig , LKML , Eric Paris , Nick Piggin , Andi Kleen , David Howells , Jonathan Corbet , Subject: Re: [PATCH 6/6] vfs: introduce FMODE_NEG_OFFSET for allowing negative f_pos Message-Id: <20100118104913.66c8d90c.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <873a24mc3i.fsf@devron.myhome.or.jp> References: <20100115013954.311049665@intel.com> <20100115014422.959401729@intel.com> <87bpgurz00.fsf@devron.myhome.or.jp> <20100118091527.7a0e2c6e.kamezawa.hiroyu@jp.fujitsu.com> <87y6jwnrcz.fsf@devron.myhome.or.jp> <873a24mc3i.fsf@devron.myhome.or.jp> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.7.1 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 37 On Mon, 18 Jan 2010 10:32:49 +0900 OGAWA Hirofumi wrote: > OGAWA Hirofumi writes: > > >>> Um... How do lseek() work? It sounds like to violate error code range. > >> > >> This is for read-write. As far as I know, > >> - generic_file_llseek, > >> - default_llseek > >> - no_llseek > >> > >> doesn't call this function. > > > > It seems to allow to set negative value to ->f_pos, right? So, lseek() > > returns (uses) it? > > BTW, another concern by negative "pos" value is, the following like code > > pos >> shift_bits > > it will break the above. So, I think it should be checked if not yet. Where do we check ? FMODE_NEG_OFFSET is just used by /dev/mem and /proc//mem. And I don't think there are no additonal users. So, I myself don't have has such concerns... Thanks, -Kame -- 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/