All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: wrong order of arguments of ->readdir()
       [not found] <200707152359.l6FNx3oN023117@hera.kernel.org>
@ 2007-07-16 20:44 ` Andrew Morton
  2007-07-16 20:49   ` Al Viro
  2007-07-16 21:47   ` Jan Harkes
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Morton @ 2007-07-16 20:44 UTC (permalink / raw)
  To: Al Viro, Jan Harkes; +Cc: Linux Kernel Mailing List

On Sun, 15 Jul 2007 23:59:03 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c9e3c2e3b0437d10a09b77769baf325b94aa436
> Commit:     7c9e3c2e3b0437d10a09b77769baf325b94aa436
> Parent:     53b67950026ee642b43615f46df22ec3d36b4a53
> Author:     Al Viro <viro@ftp.linux.org.uk>
> AuthorDate: Sun Jul 15 20:59:31 2007 +0100
> Committer:  Linus Torvalds <torvalds@woody.linux-foundation.org>
> CommitDate: Sun Jul 15 16:40:51 2007 -0700
> 
>     wrong order of arguments of ->readdir()
>     
>     Shows how many people are testing coda - the bug had been there for 5 years
>     and results of stepping on it are not subtle.
>     
>     Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> ---
>  fs/coda/dir.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/coda/dir.c b/fs/coda/dir.c
> index 9ddf5ed..898a86d 100644
> --- a/fs/coda/dir.c
> +++ b/fs/coda/dir.c
> @@ -470,7 +470,7 @@ int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir)
>  
>  		ret = -ENOENT;
>  		if (!IS_DEADDIR(host_inode)) {
> -			ret = host_file->f_op->readdir(host_file, filldir, dirent);
> +			ret = host_file->f_op->readdir(host_file, dirent, filldir);
>  			file_accessed(host_file);
>  		}
>  	}

Today is not being a good day.

This bug was already fixed.   The following mistakes were made:

a) Jan's patch was misleadingly titled "coda: avoid lockdep warning in
   coda_readdir"

b) Jan's patch had no changelog

c) Jen's patch was not cc'ed to any mailing list

d) Al's patch was not sent to the maintainer.  Nor to me.  Nor was it
   staged in any tree which I can get at so that I could inform people of
   the upcoming conflict/duplication/etc.


Guys (and I mean all guys): things are really shit at present.  Please try
to do better.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wrong order of arguments of ->readdir()
  2007-07-16 20:44 ` wrong order of arguments of ->readdir() Andrew Morton
@ 2007-07-16 20:49   ` Al Viro
  2007-07-16 21:01     ` Andrew Morton
  2007-07-16 23:04     ` Jan Harkes
  2007-07-16 21:47   ` Jan Harkes
  1 sibling, 2 replies; 5+ messages in thread
From: Al Viro @ 2007-07-16 20:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Al Viro, Jan Harkes, Linux Kernel Mailing List

On Mon, Jul 16, 2007 at 01:44:24PM -0700, Andrew Morton wrote:
> Today is not being a good day.
> 
> This bug was already fixed.   The following mistakes were made:
> 
> a) Jan's patch was misleadingly titled "coda: avoid lockdep warning in
>    coda_readdir"
> 
> b) Jan's patch had no changelog
> 
> c) Jen's patch was not cc'ed to any mailing list
 
... said patch (presumably being an obvious fix of obvious roothole)
had not been sent to mainline immediately.

> d) Al's patch was not sent to the maintainer.  Nor to me.  Nor was it
>    staged in any tree which I can get at so that I could inform people of
>    the upcoming conflict/duplication/etc.
 
Coda is still maintained?  That's certainly news to me - I'm not being
sarcastic, but my impression had been that coda got abandoned several
years ago.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wrong order of arguments of ->readdir()
  2007-07-16 20:49   ` Al Viro
@ 2007-07-16 21:01     ` Andrew Morton
  2007-07-16 23:04     ` Jan Harkes
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2007-07-16 21:01 UTC (permalink / raw)
  To: Al Viro; +Cc: Jan Harkes, Linux Kernel Mailing List, stable

On Mon, 16 Jul 2007 21:49:30 +0100
Al Viro <viro@ftp.linux.org.uk> wrote:

> On Mon, Jul 16, 2007 at 01:44:24PM -0700, Andrew Morton wrote:
> > Today is not being a good day.
> > 
> > This bug was already fixed.   The following mistakes were made:
> > 
> > a) Jan's patch was misleadingly titled "coda: avoid lockdep warning in
> >    coda_readdir"
> > 
> > b) Jan's patch had no changelog
> > 
> > c) Jen's patch was not cc'ed to any mailing list
>  
> ... said patch (presumably being an obvious fix of obvious roothole)
> had not been sent to mainline immediately.

Please send a copy to stable@kernel.org

> > d) Al's patch was not sent to the maintainer.  Nor to me.  Nor was it
> >    staged in any tree which I can get at so that I could inform people of
> >    the upcoming conflict/duplication/etc.
>  
> Coda is still maintained?  That's certainly news to me - I'm not being
> sarcastic, but my impression had been that coda got abandoned several
> years ago.

Jan does stuff occasionally.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wrong order of arguments of ->readdir()
  2007-07-16 20:44 ` wrong order of arguments of ->readdir() Andrew Morton
  2007-07-16 20:49   ` Al Viro
@ 2007-07-16 21:47   ` Jan Harkes
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Harkes @ 2007-07-16 21:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Al Viro, Linux Kernel Mailing List

On Mon, Jul 16, 2007 at 01:44:24PM -0700, Andrew Morton wrote:
> On Sun, 15 Jul 2007 23:59:03 GMT
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
> > 
> >     wrong order of arguments of ->readdir()
> >     
> >     Shows how many people are testing coda - the bug had been there for 5 years
> >     and results of stepping on it are not subtle.
> >     
> >     Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> >     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> > ---
> >  fs/coda/dir.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/fs/coda/dir.c b/fs/coda/dir.c
> > index 9ddf5ed..898a86d 100644
> > --- a/fs/coda/dir.c
> > +++ b/fs/coda/dir.c
> > @@ -470,7 +470,7 @@ int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir)
> >  
> >  		ret = -ENOENT;
> >  		if (!IS_DEADDIR(host_inode)) {
> > -			ret = host_file->f_op->readdir(host_file, filldir, dirent);
> > +			ret = host_file->f_op->readdir(host_file, dirent, filldir);
> >  			file_accessed(host_file);
> >  		}
> >  	}
> 
> Today is not being a good day.
> 
> This bug was already fixed.   The following mistakes were made:

This bug never affected Coda clients, the relevant code path was used by
'potemkin' which was an extremely stripped down client that was used to
test the kernel module during it's initial development. It simply
exported an existing directory tree under the /coda namespace.

I noticed the bug when I moved the place where we lock the container
file which was triggering the lockdep warning and corrected the code. It
isn't a code path that our userspace uses, and considering how long the
bug has been present nobody else used either so I actually didn't even
remember fixing that bug when I was cherry picking patches out of my
development tree to pass upstream.

> a) Jan's patch was misleadingly titled "coda: avoid lockdep warning in
>    coda_readdir"
> 
> b) Jan's patch had no changelog
> 
> c) Jen's patch was not cc'ed to any mailing list
>
> d) Al's patch was not sent to the maintainer.  Nor to me.  Nor was it
>    staged in any tree which I can get at so that I could inform people of
>    the upcoming conflict/duplication/etc.

I didn't realize that as the maintainer for Coda and only touching code
within fs/coda, I was expected to CC' the mailing lists. Especially
surprising since there have been quite a few patches to fs/coda on which
I haven't even been CC'd and which were never sent any mailing list
either. I see them only after they appear in the main kernel during the
merge window, which means I pretty much don't get a chance to update and
retest my development work before the window is closed again.

My patches weren't written last week, several of them have been around
since at least June 2005 and are probably even older than that,

http://www.coda.cs.cmu.edu/cgi-bin/gitweb.cgi?p=linux-coda.git;a=shortlog

Yes that is an externally built Coda kernel module, which most Coda
users who have a problem with the in-kernel one switch to. Even with
some of the known bugs, the in-kernel version works fine for most use
cases.

So this time I cherrypicked a limited subset of fixes and cleanups that
I think should go upstream. The cherry picks were for the most part
rewrites by looking at diffs between 2.6.22-rc and the external module
code that I maintain (which is why I didn't have nice changelogs).

> Guys (and I mean all guys): things are really shit at present.  Please try
> to do better.

You can check with git how many patches went into fs/coda that I have
not been CC'd on, this problem has been ongoing for a while. I don't
mind it too much, clearly the patches were mostly minor changes which
did not break Coda.

Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wrong order of arguments of ->readdir()
  2007-07-16 20:49   ` Al Viro
  2007-07-16 21:01     ` Andrew Morton
@ 2007-07-16 23:04     ` Jan Harkes
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Harkes @ 2007-07-16 23:04 UTC (permalink / raw)
  To: Al Viro; +Cc: Andrew Morton, Linux Kernel Mailing List

On Mon, Jul 16, 2007 at 09:49:30PM +0100, Al Viro wrote:
> > c) Jan's patch was not cc'ed to any mailing list
>  
> ... said patch (presumably being an obvious fix of obvious roothole)
> had not been sent to mainline immediately.

The exploiting application would have to run in the role of the
userspace cache manager. In other words, you need to,

  - open /dev/cfs0
  - mount the Coda filesystem and pass the file handle of the opened
    cfs0 device as one of the mount options

Both of these actions already require root, and if you can get this far
without root priviledges it would be considerably easier to just hand a
setuid root shell through the mounted Coda file system.

So I didn't consider this a critical root hole.

> > d) Al's patch was not sent to the maintainer.  Nor to me.  Nor was it
> >    staged in any tree which I can get at so that I could inform people of
> >    the upcoming conflict/duplication/etc.
>  
> Coda is still maintained?  That's certainly news to me - I'm not being
> sarcastic, but my impression had been that coda got abandoned several
> years ago.

Well, in that case someone forgot to update the MAINTAINERS file.

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-16 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200707152359.l6FNx3oN023117@hera.kernel.org>
2007-07-16 20:44 ` wrong order of arguments of ->readdir() Andrew Morton
2007-07-16 20:49   ` Al Viro
2007-07-16 21:01     ` Andrew Morton
2007-07-16 23:04     ` Jan Harkes
2007-07-16 21:47   ` Jan Harkes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.