<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/sysfs, branch v2.6.26</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.26</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-05-15T05:34:16Z</updated>
<entry>
<title>sysfs: remove error messages for -EEXIST case</title>
<updated>2008-05-15T05:34:16Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-05-15T05:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0599ad53fee2d084f9ba26247d7452f06a40d298'/>
<id>urn:sha1:0599ad53fee2d084f9ba26247d7452f06a40d298</id>
<content type='text'>
It is possible that the entry in sysfs already exists, one case of this is
when a network device is renamed to bonding_masters. Anyway, in this case
the proper error path is for device_rename to return an error code, not to
generate bogus backtrace and errors.

Also, to avoid possible races, the create link should be done before the
remove link. This makes a device rename atomic operation like other renames.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sysfs: Disallow truncation of files in sysfs</title>
<updated>2008-04-30T23:52:46Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2008-04-28T14:59:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40a2159abf3d0107bba359246554bd7d56f2171b'/>
<id>urn:sha1:40a2159abf3d0107bba359246554bd7d56f2171b</id>
<content type='text'>
sysfs allows attribute files to be truncated, e.g. using ftruncate(), with the
expected effect on their inode.   For most attributes, this doesn't change the
"real" size of the file i.e. how much can be read from it.  However, the
parameter validation for reading and writing binary attribute files is based
on the inode size and not the size specified in the file's bin_attribute, so it
can be broken by this. For example, if we try using dd to write to such a file:

# pwd
/sys/bus/pci/devices/0000:08:00.0
# ls -l config
-rw-r--r--  1 root root 4096 Feb  1 17:35 config
# dd if=/dev/zero of=config bs=4 count=1
1+0 records in
1+0 records out
# ls -l config
-rw-r--r--  1 root root 0 Feb  1 17:50 config
# dd if=/dev/zero of=config bs=4 count=1 seek=128
dd: writing `config': No space left on device
1+0 records in
0+0 records out

Also, after truncation to 0, parameter validation for read and write is
disabled.  Most bin_attribute read and write methods also validate the size and
offset, but for some this will allow out-of-range access.  This may be a
security issue, though access to such files is often limited to root.  In any
case, the validation should remain for safety's sake!)

This was previously reported in Bugzilla as bug 9867.

sysfs should ignore size changes or else refuse them (by returning -EINVAL).
This patch makes it ignore them.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>fs: replace remaining __FUNCTION__ occurrences</title>
<updated>2008-04-30T15:29:54Z</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-04-30T07:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e24eea728068bbeb6a3c500b848f883a20bf225'/>
<id>urn:sha1:8e24eea728068bbeb6a3c500b848f883a20bf225</id>
<content type='text'>
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: bdi: add separate writeback accounting capability</title>
<updated>2008-04-30T15:29:50Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-04-30T07:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4ad08fe64afca4ef79ecc4c624e6e871688da0d'/>
<id>urn:sha1:e4ad08fe64afca4ef79ecc4c624e6e871688da0d</id>
<content type='text'>
Add a new BDI capability flag: BDI_CAP_NO_ACCT_WB.  If this flag is
set, then don't update the per-bdi writeback stats from
test_set_page_writeback() and test_clear_page_writeback().

Misc cleanups:

 - convert bdi_cap_writeback_dirty() and friends to static inline functions
 - create a flag that includes all three dirty/writeback related flags,
   since almst all users will want to have them toghether

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] sysfs: make group is_valid return a mode_t</title>
<updated>2008-04-22T20:16:31Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-03-21T01:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f4238958d28044b335644b69df6071cdb04b5ce'/>
<id>urn:sha1:0f4238958d28044b335644b69df6071cdb04b5ce</id>
<content type='text'>
We have a problem in scsi_transport_spi in that we need to customise
not only the visibility of the attributes, but also their mode.  Fix
this by making the is_visible() callback return a mode, with 0
indicating is not visible.

Also add a sysfs_update_group() API to allow us to change either the
visibility or mode of the files at any time on the fly.

Acked-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>sysfs: refill attribute buffer when reading from offset 0</title>
<updated>2008-04-20T02:10:29Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2008-04-07T22:35:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2424b5dd062cbe3e0578ae7b11a1b360ad22f451'/>
<id>urn:sha1:2424b5dd062cbe3e0578ae7b11a1b360ad22f451</id>
<content type='text'>
Requiring userspace to close and re-open sysfs attributes has been the
policy since before 2.6.12.  It allows userspace to get a consistent
snapshot of kernel state and consume it with incremental reads and seeks.

Now, if the file position is zero the kernel assumes userspace wants to see
the new value.  The application for this change is to allow a userspace
RAID metadata handler to check the state of an array without causing any
memory allocations.  Thus not causing writeback to a raid array that might
be blocked waiting for userspace to take action.

Cc: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>SYSFS: Explicitly include required header file slab.h.</title>
<updated>2008-04-20T02:10:27Z</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2008-03-14T02:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6f87733823d69a8f12e391688ceeb1ff4922530'/>
<id>urn:sha1:c6f87733823d69a8f12e391688ceeb1ff4922530</id>
<content type='text'>
After an experimental deletion of the unnecessary inclusion of
&lt;linux/slab.h&gt; from the header file &lt;linux/percpu.h&gt;, the following
files under fs/sysfs were exposed as needing to explicitly include
&lt;linux/slab.h&gt;.

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: Allow removal of symlinks in the sysfs root</title>
<updated>2008-04-18T15:56:10Z</updated>
<author>
<name>Mark Fasheh</name>
<email>mfasheh@suse.com</email>
</author>
<published>2008-01-29T22:35:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a839c5afcdc345aecb35b0d3bcd0e09b571329c3'/>
<id>urn:sha1:a839c5afcdc345aecb35b0d3bcd0e09b571329c3</id>
<content type='text'>
Allow callers of sysfs_remove_link() to pass a NULL kobj, in which case
sysfs_root will be used as the parent directory. This allows us to tear down
top level symlinks created via sysfs_create_link(), which already has
similar handling of a NULL parent object.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>driver core: debug for bad dev_attr_show() return value.</title>
<updated>2008-03-25T05:33:49Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-03-04T23:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=815d2d50da41f28aae58f5e9b3c61c3094422749'/>
<id>urn:sha1:815d2d50da41f28aae58f5e9b3c61c3094422749</id>
<content type='text'>
Try to find the culprit who caused
http://bugzilla.kernel.org/show_bug.cgi?id=10150

Cc: &lt;balajirrao@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: remove BUG_ON() from sysfs_remove_group()</title>
<updated>2008-02-07T19:31:46Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2008-02-07T16:58:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=969affd276dec81a35a5ad10d4e05e62e93b380b'/>
<id>urn:sha1:969affd276dec81a35a5ad10d4e05e62e93b380b</id>
<content type='text'>
It's possible that the caller of sysfs_remove_group messed up and passed in an attribute group that was not really registered to this kobject.  But don't panic for such a foolish error, spit out a warning about what happened, and continue on our way safely.

Cc: Roland Dreier &lt;rdreier@cisco.com&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
