<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/sysfs, branch v3.4-rc2-rt1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2012-03-21T20:36:41+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-21T20:36:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e2a0883e4071237d09b604a342c28b96b44a04b3'/>
<id>e2a0883e4071237d09b604a342c28b96b44a04b3</id>
<content type='text'>
Pull vfs pile 1 from Al Viro:
 "This is _not_ all; in particular, Miklos' and Jan's stuff is not there
  yet."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits)
  ext4: initialization of ext4_li_mtx needs to be done earlier
  debugfs-related mode_t whack-a-mole
  hfsplus: add an ioctl to bless files
  hfsplus: change finder_info to u32
  hfsplus: initialise userflags
  qnx4: new helper - try_extent()
  qnx4: get rid of qnx4_bread/qnx4_getblk
  take removal of PF_FORKNOEXEC to flush_old_exec()
  trim includes in inode.c
  um: uml_dup_mmap() relies on -&gt;mmap_sem being held, but activate_mm() doesn't hold it
  um: embed -&gt;stub_pages[] into mmu_context
  gadgetfs: list_for_each_safe() misuse
  ocfs2: fix leaks on failure exits in module_init
  ecryptfs: make register_filesystem() the last potential failure exit
  ntfs: forgets to unregister sysctls on register_filesystem() failure
  logfs: missing cleanup on register_filesystem() failure
  jfs: mising cleanup on register_filesystem() failure
  make configfs_pin_fs() return root dentry on success
  configfs: configfs_create_dir() has parent dentry in dentry-&gt;d_parent
  configfs: sanitize configfs_create()
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull vfs pile 1 from Al Viro:
 "This is _not_ all; in particular, Miklos' and Jan's stuff is not there
  yet."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (64 commits)
  ext4: initialization of ext4_li_mtx needs to be done earlier
  debugfs-related mode_t whack-a-mole
  hfsplus: add an ioctl to bless files
  hfsplus: change finder_info to u32
  hfsplus: initialise userflags
  qnx4: new helper - try_extent()
  qnx4: get rid of qnx4_bread/qnx4_getblk
  take removal of PF_FORKNOEXEC to flush_old_exec()
  trim includes in inode.c
  um: uml_dup_mmap() relies on -&gt;mmap_sem being held, but activate_mm() doesn't hold it
  um: embed -&gt;stub_pages[] into mmu_context
  gadgetfs: list_for_each_safe() misuse
  ocfs2: fix leaks on failure exits in module_init
  ecryptfs: make register_filesystem() the last potential failure exit
  ntfs: forgets to unregister sysctls on register_filesystem() failure
  logfs: missing cleanup on register_filesystem() failure
  jfs: mising cleanup on register_filesystem() failure
  make configfs_pin_fs() return root dentry on success
  configfs: configfs_create_dir() has parent dentry in dentry-&gt;d_parent
  configfs: sanitize configfs_create()
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>switch open-coded instances of d_make_root() to new helper</title>
<updated>2012-03-21T01:29:35+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-01-09T03:15:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=48fde701aff662559b38d9a609574068f22d00fe'/>
<id>48fde701aff662559b38d9a609574068f22d00fe</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "sysfs: Kill nlink counting."</title>
<updated>2012-03-08T21:03:10+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-03-08T21:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=54d20f006ceff1f2f1e69d0e54049b6c0765c039'/>
<id>54d20f006ceff1f2f1e69d0e54049b6c0765c039</id>
<content type='text'>
This reverts commit 524b6c5b39b931311dfe5a2f5abae2f5c9731676.

It has shown to break userspace tools, which is not acceptable.

Reported-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 524b6c5b39b931311dfe5a2f5abae2f5c9731676.

It has shown to break userspace tools, which is not acceptable.

Reported-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: Fix memory leak in sysfs_sd_setsecdata().</title>
<updated>2012-02-24T22:25:49+00:00</updated>
<author>
<name>Masami Ichikawa</name>
<email>masami256@gmail.com</email>
</author>
<published>2012-02-20T22:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=93518dd2ebafcc761a8637b2877008cfd748c202'/>
<id>93518dd2ebafcc761a8637b2877008cfd748c202</id>
<content type='text'>
This patch fixies follwing two memory leak patterns that reported by kmemleak.
sysfs_sd_setsecdata() is called during sys_lsetxattr() operation.
It checks sd-&gt;s_iattr is NULL or not. Then if it is NULL, it calls
sysfs_init_inode_attrs() to allocate memory.
That code is this.

iattrs = sd-&gt;s_iattr;
if (!iattrs)
                iattrs = sysfs_init_inode_attrs(sd);

The iattrs recieves sysfs_init_inode_attrs()'s result,  but sd-&gt;s_iattr
doesn't know the address. so it needs to set correct address to
sd-&gt;s_iattr to free memory in other function.

unreferenced object 0xffff880250b73e60 (size 32):
  comm "systemd", pid 1, jiffies 4294683888 (age 94.553s)
  hex dump (first 32 bytes):
    73 79 73 74 65 6d 5f 75 3a 6f 62 6a 65 63 74 5f  system_u:object_
    72 3a 73 79 73 66 73 5f 74 3a 73 30 00 00 00 00  r:sysfs_t:s0....
  backtrace:
    [&lt;ffffffff814cb1d0&gt;] kmemleak_alloc+0x73/0x98
    [&lt;ffffffff811270ab&gt;] __kmalloc+0x100/0x12c
    [&lt;ffffffff8120775a&gt;] context_struct_to_string+0x106/0x210
    [&lt;ffffffff81207cc1&gt;] security_sid_to_context_core+0x10b/0x129
    [&lt;ffffffff812090ef&gt;] security_sid_to_context+0x10/0x12
    [&lt;ffffffff811fb0da&gt;] selinux_inode_getsecurity+0x7d/0xa8
    [&lt;ffffffff811fb127&gt;] selinux_inode_getsecctx+0x22/0x2e
    [&lt;ffffffff811f4d62&gt;] security_inode_getsecctx+0x16/0x18
    [&lt;ffffffff81191dad&gt;] sysfs_setxattr+0x96/0x117
    [&lt;ffffffff811542f0&gt;] __vfs_setxattr_noperm+0x73/0xd9
    [&lt;ffffffff811543d9&gt;] vfs_setxattr+0x83/0xa1
    [&lt;ffffffff811544c6&gt;] setxattr+0xcf/0x101
    [&lt;ffffffff81154745&gt;] sys_lsetxattr+0x6a/0x8f
    [&lt;ffffffff814efda9&gt;] system_call_fastpath+0x16/0x1b
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
unreferenced object 0xffff88024163c5a0 (size 96):
  comm "systemd", pid 1, jiffies 4294683888 (age 94.553s)
  hex dump (first 32 bytes):
    00 00 00 00 ed 41 00 00 00 00 00 00 00 00 00 00  .....A..........
    00 00 00 00 00 00 00 00 0c 64 42 4f 00 00 00 00  .........dBO....
  backtrace:
    [&lt;ffffffff814cb1d0&gt;] kmemleak_alloc+0x73/0x98
    [&lt;ffffffff81127402&gt;] kmem_cache_alloc_trace+0xc4/0xee
    [&lt;ffffffff81191cbe&gt;] sysfs_init_inode_attrs+0x2a/0x83
    [&lt;ffffffff81191dd6&gt;] sysfs_setxattr+0xbf/0x117
    [&lt;ffffffff811542f0&gt;] __vfs_setxattr_noperm+0x73/0xd9
    [&lt;ffffffff811543d9&gt;] vfs_setxattr+0x83/0xa1
    [&lt;ffffffff811544c6&gt;] setxattr+0xcf/0x101
    [&lt;ffffffff81154745&gt;] sys_lsetxattr+0x6a/0x8f
    [&lt;ffffffff814efda9&gt;] system_call_fastpath+0x16/0x1b
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
`

Signed-off-by: Masami Ichikawa &lt;masami256@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixies follwing two memory leak patterns that reported by kmemleak.
sysfs_sd_setsecdata() is called during sys_lsetxattr() operation.
It checks sd-&gt;s_iattr is NULL or not. Then if it is NULL, it calls
sysfs_init_inode_attrs() to allocate memory.
That code is this.

iattrs = sd-&gt;s_iattr;
if (!iattrs)
                iattrs = sysfs_init_inode_attrs(sd);

The iattrs recieves sysfs_init_inode_attrs()'s result,  but sd-&gt;s_iattr
doesn't know the address. so it needs to set correct address to
sd-&gt;s_iattr to free memory in other function.

unreferenced object 0xffff880250b73e60 (size 32):
  comm "systemd", pid 1, jiffies 4294683888 (age 94.553s)
  hex dump (first 32 bytes):
    73 79 73 74 65 6d 5f 75 3a 6f 62 6a 65 63 74 5f  system_u:object_
    72 3a 73 79 73 66 73 5f 74 3a 73 30 00 00 00 00  r:sysfs_t:s0....
  backtrace:
    [&lt;ffffffff814cb1d0&gt;] kmemleak_alloc+0x73/0x98
    [&lt;ffffffff811270ab&gt;] __kmalloc+0x100/0x12c
    [&lt;ffffffff8120775a&gt;] context_struct_to_string+0x106/0x210
    [&lt;ffffffff81207cc1&gt;] security_sid_to_context_core+0x10b/0x129
    [&lt;ffffffff812090ef&gt;] security_sid_to_context+0x10/0x12
    [&lt;ffffffff811fb0da&gt;] selinux_inode_getsecurity+0x7d/0xa8
    [&lt;ffffffff811fb127&gt;] selinux_inode_getsecctx+0x22/0x2e
    [&lt;ffffffff811f4d62&gt;] security_inode_getsecctx+0x16/0x18
    [&lt;ffffffff81191dad&gt;] sysfs_setxattr+0x96/0x117
    [&lt;ffffffff811542f0&gt;] __vfs_setxattr_noperm+0x73/0xd9
    [&lt;ffffffff811543d9&gt;] vfs_setxattr+0x83/0xa1
    [&lt;ffffffff811544c6&gt;] setxattr+0xcf/0x101
    [&lt;ffffffff81154745&gt;] sys_lsetxattr+0x6a/0x8f
    [&lt;ffffffff814efda9&gt;] system_call_fastpath+0x16/0x1b
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
unreferenced object 0xffff88024163c5a0 (size 96):
  comm "systemd", pid 1, jiffies 4294683888 (age 94.553s)
  hex dump (first 32 bytes):
    00 00 00 00 ed 41 00 00 00 00 00 00 00 00 00 00  .....A..........
    00 00 00 00 00 00 00 00 0c 64 42 4f 00 00 00 00  .........dBO....
  backtrace:
    [&lt;ffffffff814cb1d0&gt;] kmemleak_alloc+0x73/0x98
    [&lt;ffffffff81127402&gt;] kmem_cache_alloc_trace+0xc4/0xee
    [&lt;ffffffff81191cbe&gt;] sysfs_init_inode_attrs+0x2a/0x83
    [&lt;ffffffff81191dd6&gt;] sysfs_setxattr+0xbf/0x117
    [&lt;ffffffff811542f0&gt;] __vfs_setxattr_noperm+0x73/0xd9
    [&lt;ffffffff811543d9&gt;] vfs_setxattr+0x83/0xa1
    [&lt;ffffffff811544c6&gt;] setxattr+0xcf/0x101
    [&lt;ffffffff81154745&gt;] sys_lsetxattr+0x6a/0x8f
    [&lt;ffffffff814efda9&gt;] system_call_fastpath+0x16/0x1b
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
`

Signed-off-by: Masami Ichikawa &lt;masami256@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge 3.3-rc2 into the driver-core-next branch.</title>
<updated>2012-02-02T19:24:44+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-02-02T19:24:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bd1d462e13b278fc57752d0b9b15040e60e561a0'/>
<id>bd1d462e13b278fc57752d0b9b15040e60e561a0</id>
<content type='text'>
This was done to resolve a merge and build problem with the
drivers/acpi/processor_driver.c file.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was done to resolve a merge and build problem with the
drivers/acpi/processor_driver.c file.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: Update the name hash when renaming sysfs entries</title>
<updated>2012-01-31T19:30:48+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-01-31T14:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d5c38b137ac8a6e3dbed13bc494d60df5b69dfc4'/>
<id>d5c38b137ac8a6e3dbed13bc494d60df5b69dfc4</id>
<content type='text'>
This fixes a bug introduced with sysfs name hashes where renaming a
network device appears to succeed but silently makes the sysfs files for
that network device inaccessible.

In at least one configuration this bug has stopped networking from
coming up during boot.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Tested-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a bug introduced with sysfs name hashes where renaming a
network device appears to succeed but silently makes the sysfs files for
that network device inaccessible.

In at least one configuration this bug has stopped networking from
coming up during boot.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Tested-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: change permissions for /sys from 0755 to 0555</title>
<updated>2012-01-24T23:57:53+00:00</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vitty@altlinux.ru</email>
</author>
<published>2012-01-17T12:17:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c56d8a7362665d165ba992b6b7a8d6c13a26eafc'/>
<id>c56d8a7362665d165ba992b6b7a8d6c13a26eafc</id>
<content type='text'>
There is a misleading difference between /proc and /sys permissions, /proc is 0555 and /sys is 0755. But
as it is impossible to create or unlink something in /sys it would be nice to have same permissions.

Signed-off-by: Vitaly Kuznetsov &lt;vitty@altlinux.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a misleading difference between /proc and /sys permissions, /proc is 0555 and /sys is 0755. But
as it is impossible to create or unlink something in /sys it would be nice to have same permissions.

Signed-off-by: Vitaly Kuznetsov &lt;vitty@altlinux.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: Kill nlink counting.</title>
<updated>2012-01-24T20:41:46+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-12-19T04:09:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=524b6c5b39b931311dfe5a2f5abae2f5c9731676'/>
<id>524b6c5b39b931311dfe5a2f5abae2f5c9731676</id>
<content type='text'>
Tracking the number of subdirectories requires an extra field that increases
the size of sysfs_dirent.  nlinks are not particularly interesting for sysfs
and the nlink counts are wrong when network namespaces are involved so stop
counting them, and always return nlink == 1.  Userspace already knows that
directories with nlink == 1 have an nlink count they can't use to count
subdirectories.

This reduces the size of sysfs_dirent by 8 bytes on 64bit platforms.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tracking the number of subdirectories requires an extra field that increases
the size of sysfs_dirent.  nlinks are not particularly interesting for sysfs
and the nlink counts are wrong when network namespaces are involved so stop
counting them, and always return nlink == 1.  Userspace already knows that
directories with nlink == 1 have an nlink count they can't use to count
subdirectories.

This reduces the size of sysfs_dirent by 8 bytes on 64bit platforms.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: Store the sysfs inode in an unsigned int.</title>
<updated>2012-01-24T20:41:46+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-12-19T04:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cafa6b5dd7ce4f0e0a30be301be4efed587a7808'/>
<id>cafa6b5dd7ce4f0e0a30be301be4efed587a7808</id>
<content type='text'>
Store the sysfs inode number in an unsided int because
ida inode allocator can return at most a 31 bit number,
reducing the size of struct sysfs_dirent by 8 bytes
on 64bit platforms.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Store the sysfs inode number in an unsided int because
ida inode allocator can return at most a 31 bit number,
reducing the size of struct sysfs_dirent by 8 bytes
on 64bit platforms.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: Reduce s_flags to an unsinged short so it packs well with s_mode</title>
<updated>2012-01-24T20:41:00+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-12-19T04:07:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=15a3382451e51925facfe430deeca63d90137f5d'/>
<id>15a3382451e51925facfe430deeca63d90137f5d</id>
<content type='text'>
On 32bit this reduces sizeof(struct sysfs_dirent) by 2 bytes.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On 32bit this reduces sizeof(struct sysfs_dirent) by 2 bytes.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
