From: Tejun Heo <tj@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kay Sievers <kay@vrfy.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCHSET] sysfs: use seq_file and unify regular and bin file handling
Date: Tue, 1 Oct 2013 10:23:44 -0400 [thread overview]
Message-ID: <20131001142344.GA2736@htj.dyndns.org> (raw)
In-Reply-To: <CAErSpo5gNQF+B1HngZzxEP3cST_s83=usK27UXmO8G0zXKsbvQ@mail.gmail.com>
Hello,
On Mon, Sep 30, 2013 at 11:03:50PM -0600, Bjorn Helgaas wrote:
> I don't pretend to understand sysfs or the issue you tripped over with
> PCI I/O BAR regions. But we had a long discussion about those files
The issue is rather simple. Let's say I do "dd if=SOME_IO_BAR skip=12
bs=4 count=1", it should result in exactly 4 byte read from the ioport
at BAR + 12 as io reads may have side effects; however, seq_file
breaks that with buffering. Pretty similar to using stdio on ioports.
> [1] last spring, and I'm pretty convinced that it was a mistake to add
> them in their current form, and I would support an attempt to rework
> them. We had some ideas about how to do that, but I think everybody
> lost interest before anything happened.
Yeah, I was pretty weirded out after finding out that the BARs are
directly accessible through sysfs. People run all sorts of scripts
over the sysfs hierarchy after all. That said, I don't think sysfs
can simply pull out bin file support at this point. I'll keep the
code path separate so that it can be easily separated out if we don't
need it later.
Thanks!
--
tejun
prev parent reply other threads:[~2013-10-01 14:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-28 21:49 [PATCHSET] sysfs: use seq_file and unify regular and bin file handling Tejun Heo
2013-09-28 21:49 ` [PATCH 01/14] sysfs: remove unused sysfs_buffer->pos Tejun Heo
2013-09-28 21:49 ` [PATCH 02/14] sysfs: remove sysfs_buffer->needs_read_fill Tejun Heo
2013-09-28 21:49 ` [PATCH 03/14] sysfs: remove sysfs_buffer->ops Tejun Heo
2013-09-28 21:49 ` [PATCH 04/14] sysfs: add sysfs_open_file_mutex Tejun Heo
2013-09-28 21:49 ` [PATCH 05/14] sysfs: rename sysfs_buffer to sysfs_open_file Tejun Heo
2013-09-28 21:49 ` [PATCH 06/14] sysfs: add sysfs_open_file->sd and ->file Tejun Heo
2013-09-28 21:49 ` [PATCH 07/14] sysfs: use transient write buffer Tejun Heo
2013-09-28 21:49 ` [PATCH 08/14] sysfs: use seq_file when reading regular files Tejun Heo
2013-09-28 21:49 ` [PATCH 09/14] sysfs: prepare llseek path for unified regular / bin file handling Tejun Heo
2013-09-28 21:49 ` [PATCH 10/14] sysfs: prepare path write " Tejun Heo
2013-09-28 21:49 ` [PATCH 11/14] sysfs: prepare read path " Tejun Heo
2013-09-28 21:49 ` [PATCH 12/14] sysfs: copy bin mmap support from fs/sysfs/bin.c to fs/sysfs/file.c Tejun Heo
2013-09-28 21:49 ` [PATCH 13/14] sysfs: prepare open path for unified regular / bin file handling Tejun Heo
2013-09-28 21:49 ` [PATCH 14/14] sysfs: merge regular and " Tejun Heo
2013-09-28 22:15 ` [PATCHSET] sysfs: use seq_file and unify " Tejun Heo
2013-09-30 19:54 ` Tejun Heo
2013-09-30 20:14 ` Greg KH
2013-10-01 5:03 ` Bjorn Helgaas
2013-10-01 14:23 ` Tejun Heo [this message]
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=20131001142344.GA2736@htj.dyndns.org \
--to=tj@kernel.org \
--cc=bhelgaas@google.com \
--cc=ebiederm@xmission.com \
--cc=gregkh@linuxfoundation.org \
--cc=kay@vrfy.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox