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, 25 Nov 2019 17:58:43 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     "Kenneth R. Crudup" <kenny@...ix.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Commit 0be0ee71 ("fs: properly and reliably lock f_pos in
 fdget_pos()") breaking userspace

On Mon, Nov 25, 2019 at 2:55 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> Anyway, here's a TOTALLY UNTESTED patch that may help pinpoint which
> thing it is that causes issues.
>
> It might also be so noisy as to be useless, I didn't think it through
> a lot.

Yeah, I ended up testing it between merges, and it points out a lot of
files. Too many to usefully narrow down which one then might cause
problems for you.

The main cause of that is that it will complain for _every_ O_PATH
open, because those use the 'empty_fops' and don't actually allow any
operations at all (neither read/write nor llseek). We could have
marked those O_STREAM, since they can't be used for any seeking
operations.

So to get rid of at least _that_ endless noise, add this to the patch:

  --- a/fs/open.c
  +++ b/fs/open.c
  @@ -748,7 +748,7 @@ static int do_dentry_open(struct file *f,
          f->f_wb_err = filemap_sample_wb_err(f->f_mapping);

          if (unlikely(f->f_flags & O_PATH)) {
  -               f->f_mode = FMODE_PATH | FMODE_OPENED;
  +               f->f_mode = FMODE_PATH | FMODE_OPENED | FMODE_STREAM;
                  f->f_op = &empty_fops;
                  return 0;
          }

the above is entirely whitespace-damaged, but you can see what it's
doing. That should cut down on all the noise generated by O_PATH
opens.

It might still be a bit noisy even with the above, but I think it will
at least be better.

              Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ