mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'Zach Brown'" <zach.brown@oracle.com>
Cc: "Andrew Morton" <akpm@osdl.org>,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	"Christoph Hellwig" <hch@infradead.org>
Subject: RE: [patch] remove redundant iov segment check
Date: Mon, 4 Dec 2006 11:45:28 -0800	[thread overview]
Message-ID: <000401c717dc$bff0c5e0$2589030a@amr.corp.intel.com> (raw)
In-Reply-To: <28F99581-3A2A-45BD-8F00-B554313E2C26@oracle.com>

Zach Brown wrote on Monday, December 04, 2006 11:19 AM
> On Dec 4, 2006, at 8:26 AM, Chen, Kenneth W wrote:
> 
> > The access_ok() and negative length check on each iov segment in  
> > function
> > generic_file_aio_read/write are redundant.  They are all already  
> > checked
> > before calling down to these low level generic functions.
> 
> ...
> 
> > So it's not possible to call down to generic_file_aio_read/write  
> > with invalid
> > iov segment.
> 
> Well, generic_file_aio_{read,write}() are exported to modules, so  
> anything's *possible*. :)
> 
> This change makes me nervous because it relies on our ability to  
> audit all code paths to ensure that it's correct.  It'd be nice if  
> the code enforced the rules.

Maybe we should create another internal generic_file_aio_read/write
for in-core function? fs/read_write.c and fs/aio.c are not module-able
and the check is already there.  For external module, we can do the
check and then calls down to the internal one.

I hate to see iov is being walked multiple times ....  And this is
part of my effort to bring back O_DIRECT performance compares to a
3-years old vendor kernel based on 2.4 kernel.

- Ken

  reply	other threads:[~2006-12-04 19:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-04 16:26 Chen, Kenneth W
2006-12-04 19:18 ` Zach Brown
2006-12-04 19:45   ` Chen, Kenneth W [this message]
2006-12-04 19:50     ` Zach Brown
2007-01-02 11:01   ` Christoph Hellwig
2007-01-02 18:22     ` Zach Brown
2007-01-02 18:25       ` Chen, Kenneth W
2006-12-04 19:36 ` Andrew Morton
2006-12-04 19:50   ` Chen, Kenneth W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000401c717dc$bff0c5e0$2589030a@amr.corp.intel.com' \
    --to=kenneth.w.chen@intel.com \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zach.brown@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome