lkml.org 
[lkml]   [2013]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHSET] sysfs: use seq_file and unify regular and bin file handling
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


\
 
 \ /
  Last update: 2013-10-01 16:41    [W:0.073 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site