lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Dec 2006 11:45:28 -0800
From:	"Chen, Kenneth W" <kenneth.w.chen@...el.com>
To:	"'Zach Brown'" <zach.brown@...cle.com>
Cc:	"Andrew Morton" <akpm@...l.org>,
	"linux-kernel" <linux-kernel@...r.kernel.org>,
	"Christoph Hellwig" <hch@...radead.org>
Subject: RE: [patch] remove redundant iov segment check

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ