All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Kenneth R. Crudup" <kenny@panix.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kirill Smelkov <kirr@nexedi.com>
Subject: Re: Commit 0be0ee71 ("fs: properly and reliably lock f_pos in fdget_pos()") breaking userspace
Date: Mon, 25 Nov 2019 19:34:48 -0800	[thread overview]
Message-ID: <CAHk-=wjc8ri9Y2hkirG9XjiVNaaq4jyxdpD15SJC2ur4GVCotA@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wj3YSFT+C3n=7CTsB-8U0NUpTpT3xEH866H4-1qbQGw7Q@mail.gmail.com>

On Mon, Nov 25, 2019 at 7:21 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Anyway, I think the thing to do (for now) is to just say "character
> devices are FMODE_STREAM files if they have no llseek operations".
> That should take care of both tty's and the sound devices.

A cleaner thing might be to add an explicit field to 'struct
file_operations' to show that it is a stream operation. That would
make it much easier for drivers to say "mark me as a stream" without
having to change their open routines (not all cases might even have
open routines).

The file operations already have a history of this kind of "this is
what I support" flags with the "mmap_supported_flags" mask, which is a
different (but at the same time somewhat similar) set of "this is the
set of operations I support" thing. FMODE_STREAM wouldn't be that
different.

Anyway, I was clearly too optimistic as to how painless this would be.
I tested it on my desktop and laptop, but they have very similar
setups other than their form factor, so the fact that neither showed
any issues was perhaps not all that meaningful.

              Linus

  reply	other threads:[~2019-11-26  3:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 21:30 Commit 0be0ee71 ("fs: properly and reliably lock f_pos in fdget_pos()") breaking userspace Kenneth R. Crudup
2019-11-25 22:55 ` Linus Torvalds
2019-11-26  1:58   ` Linus Torvalds
2019-11-26  2:03     ` Kenneth R. Crudup
2019-11-26  3:21     ` Linus Torvalds
2019-11-26  3:34       ` Linus Torvalds [this message]
2019-11-26  3:39       ` Linus Torvalds
2019-11-26 10:00         ` Kirill Smelkov
2019-11-26 12:46           ` Kenneth R. Crudup
2019-11-27  8:12             ` Kirill Smelkov
2019-11-26 20:03         ` Linus Torvalds

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='CAHk-=wjc8ri9Y2hkirG9XjiVNaaq4jyxdpD15SJC2ur4GVCotA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=kenny@panix.com \
    --cc=kirr@nexedi.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.