Re: svn commit: r230583 - head/sys/kern

2012-02-01 Thread Konstantin Belousov
On Tue, Jan 31, 2012 at 12:48:49PM -0500, David Schultz wrote: > On Tue, Jan 31, 2012, Konstantin Belousov wrote: > > On Mon, Jan 30, 2012 at 02:07:03PM -0500, David Schultz wrote: > > > On Mon, Jan 30, 2012, Kostik Belousov wrote: > > > > On Sun, Jan 29, 2012 at 05:39:04PM -0500, David Schultz wro

Re: svn commit: r230583 - head/sys/kern

2012-01-31 Thread David Schultz
On Tue, Jan 31, 2012, Konstantin Belousov wrote: > On Mon, Jan 30, 2012 at 02:07:03PM -0500, David Schultz wrote: > > On Mon, Jan 30, 2012, Kostik Belousov wrote: > > > On Sun, Jan 29, 2012 at 05:39:04PM -0500, David Schultz wrote: > > > > On Sun, Jan 29, 2012, Kostik Belousov wrote: > > > > > On S

Re: svn commit: r230583 - head/sys/kern

2012-01-31 Thread Bruce Evans
On Tue, 31 Jan 2012, Konstantin Belousov wrote: On Mon, Jan 30, 2012 at 02:07:03PM -0500, David Schultz wrote: That's why I'm glad I'm not committing it. :) A more conservative change (also known as "kicking the can down the road") would be to add a VFS flag, e.g., VFCF_LONGIO, and only set it

Re: svn commit: r230583 - head/sys/kern

2012-01-31 Thread Konstantin Belousov
On Mon, Jan 30, 2012 at 02:07:03PM -0500, David Schultz wrote: > On Mon, Jan 30, 2012, Kostik Belousov wrote: > > On Sun, Jan 29, 2012 at 05:39:04PM -0500, David Schultz wrote: > > > On Sun, Jan 29, 2012, Kostik Belousov wrote: > > > > On Sat, Jan 28, 2012 at 07:12:25PM -0500, David Schultz wrote:

Re: svn commit: r230583 - head/sys/kern

2012-01-30 Thread David Schultz
On Mon, Jan 30, 2012, Kostik Belousov wrote: > On Sun, Jan 29, 2012 at 05:39:04PM -0500, David Schultz wrote: > > On Sun, Jan 29, 2012, Kostik Belousov wrote: > > > On Sat, Jan 28, 2012 at 07:12:25PM -0500, David Schultz wrote: > > > > On Sat, Jan 28, 2012, Kostik Belousov wrote: > > > > > On Fri,

Re: svn commit: r230583 - head/sys/kern

2012-01-29 Thread Kostik Belousov
On Sun, Jan 29, 2012 at 05:39:04PM -0500, David Schultz wrote: > On Sun, Jan 29, 2012, Kostik Belousov wrote: > > On Sat, Jan 28, 2012 at 07:12:25PM -0500, David Schultz wrote: > > > On Sat, Jan 28, 2012, Kostik Belousov wrote: > > > > On Fri, Jan 27, 2012 at 02:42:21PM -0500, David Schultz wrote:

Re: svn commit: r230583 - head/sys/kern

2012-01-29 Thread David Schultz
On Sun, Jan 29, 2012, Kostik Belousov wrote: > On Sat, Jan 28, 2012 at 07:12:25PM -0500, David Schultz wrote: > > On Sat, Jan 28, 2012, Kostik Belousov wrote: > > > On Fri, Jan 27, 2012 at 02:42:21PM -0500, David Schultz wrote: > > > > On Fri, Jan 27, 2012, Kostik Belousov wrote: > > > > > On Fri,

Re: svn commit: r230583 - head/sys/kern

2012-01-29 Thread Bruce Evans
On Sun, 29 Jan 2012, Kostik Belousov wrote: On Sat, Jan 28, 2012 at 07:12:25PM -0500, David Schultz wrote: On Sat, Jan 28, 2012, Kostik Belousov wrote: On Fri, Jan 27, 2012 at 02:42:21PM -0500, David Schultz wrote: On Fri, Jan 27, 2012, Kostik Belousov wrote: On Fri, Jan 27, 2012 at 07:50:30

Re: svn commit: r230583 - head/sys/kern

2012-01-28 Thread Kostik Belousov
On Sat, Jan 28, 2012 at 07:12:25PM -0500, David Schultz wrote: > On Sat, Jan 28, 2012, Kostik Belousov wrote: > > On Fri, Jan 27, 2012 at 02:42:21PM -0500, David Schultz wrote: > > > On Fri, Jan 27, 2012, Kostik Belousov wrote: > > > > On Fri, Jan 27, 2012 at 07:50:30PM +1100, Bruce Evans wrote: >

Re: svn commit: r230583 - head/sys/kern

2012-01-28 Thread David Schultz
On Sat, Jan 28, 2012, Kostik Belousov wrote: > On Fri, Jan 27, 2012 at 02:42:21PM -0500, David Schultz wrote: > > On Fri, Jan 27, 2012, Kostik Belousov wrote: > > > On Fri, Jan 27, 2012 at 07:50:30PM +1100, Bruce Evans wrote: > > > > On Thu, 26 Jan 2012, Gleb Smirnoff wrote: > > > > > > > > >On Th

Re: svn commit: r230583 - head/sys/kern

2012-01-28 Thread Kostik Belousov
On Fri, Jan 27, 2012 at 02:42:21PM -0500, David Schultz wrote: > On Fri, Jan 27, 2012, Kostik Belousov wrote: > > On Fri, Jan 27, 2012 at 07:50:30PM +1100, Bruce Evans wrote: > > > On Thu, 26 Jan 2012, Gleb Smirnoff wrote: > > > > > > >On Thu, Jan 26, 2012 at 11:53:57PM +1100, Bruce Evans wrote: >

Re: svn commit: r230583 - head/sys/kern

2012-01-27 Thread David Schultz
On Fri, Jan 27, 2012, Kostik Belousov wrote: > On Fri, Jan 27, 2012 at 07:50:30PM +1100, Bruce Evans wrote: > > On Thu, 26 Jan 2012, Gleb Smirnoff wrote: > > > > >On Thu, Jan 26, 2012 at 11:53:57PM +1100, Bruce Evans wrote: > > >B> > @@ -1552,6 +1552,12 @@ aio_aqueue(struct thread *td, struct aio

Re: svn commit: r230583 - head/sys/kern

2012-01-27 Thread Kostik Belousov
On Fri, Jan 27, 2012 at 07:50:30PM +1100, Bruce Evans wrote: > On Thu, 26 Jan 2012, Gleb Smirnoff wrote: > > >On Thu, Jan 26, 2012 at 11:53:57PM +1100, Bruce Evans wrote: > >B> > @@ -1552,6 +1552,12 @@ aio_aqueue(struct thread *td, struct aio > >B> > return (error); > >B> >

Re: svn commit: r230583 - head/sys/kern

2012-01-27 Thread Bruce Evans
On Thu, 26 Jan 2012, Gleb Smirnoff wrote: On Thu, Jan 26, 2012 at 11:53:57PM +1100, Bruce Evans wrote: B> > @@ -1552,6 +1552,12 @@ aio_aqueue(struct thread *td, struct aio B> > return (error); B> > } B> > B> > +/* XXX: aio_nbytes is later casted to signed types. */ B> > +

Re: svn commit: r230583 - head/sys/kern

2012-01-26 Thread Gleb Smirnoff
Bruce, On Thu, Jan 26, 2012 at 11:53:57PM +1100, Bruce Evans wrote: B> > Log: B> > Although aio_nbytes is size_t, later is is signed to B> > casted types: to ssize_t in filesystem code and to B> > int in buf code, thus supplying a negative argument B> > leads to kernel panic later. B> B> An

Re: svn commit: r230583 - head/sys/kern

2012-01-26 Thread Bruce Evans
On Thu, 26 Jan 2012, Gleb Smirnoff wrote: Log: Although aio_nbytes is size_t, later is is signed to casted types: to ssize_t in filesystem code and to int in buf code, thus supplying a negative argument leads to kernel panic later. And supplying a large positive argument leads to undefined

svn commit: r230583 - head/sys/kern

2012-01-26 Thread Gleb Smirnoff
Author: glebius Date: Thu Jan 26 11:59:48 2012 New Revision: 230583 URL: http://svn.freebsd.org/changeset/base/230583 Log: Although aio_nbytes is size_t, later is is signed to casted types: to ssize_t in filesystem code and to int in buf code, thus supplying a negative argument leads to ke