<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/oprofile, branch v3.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/oprofile?h=v3.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/oprofile?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-04T03:36:31Z</updated>
<entry>
<title>fs: Limit sys_mount to only request filesystem modules.</title>
<updated>2013-03-04T03:36:31Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2013-03-03T03:39:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f78e0351394052e1a6293e175825eb5c7869507'/>
<id>urn:sha1:7f78e0351394052e1a6293e175825eb5c7869507</id>
<content type='text'>
Modify the request_module to prefix the file system type with "fs-"
and add aliases to all of the filesystems that can be built as modules
to match.

A common practice is to build all of the kernel code and leave code
that is not commonly needed as modules, with the result that many
users are exposed to any bug anywhere in the kernel.

Looking for filesystems with a fs- prefix limits the pool of possible
modules that can be loaded by mount to just filesystems trivially
making things safer with no real cost.

Using aliases means user space can control the policy of which
filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
with blacklist and alias directives.  Allowing simple, safe,
well understood work-arounds to known problematic software.

This also addresses a rare but unfortunate problem where the filesystem
name is not the same as it's module name and module auto-loading
would not work.  While writing this patch I saw a handful of such
cases.  The most significant being autofs that lives in the module
autofs4.

This is relevant to user namespaces because we can reach the request
module in get_fs_type() without having any special permissions, and
people get uncomfortable when a user specified string (in this case
the filesystem type) goes all of the way to request_module.

After having looked at this issue I don't think there is any
particular reason to perform any filtering or permission checks beyond
making it clear in the module request that we want a filesystem
module.  The common pattern in the kernel is to call request_module()
without regards to the users permissions.  In general all a filesystem
module does once loaded is call register_filesystem() and go to sleep.
Which means there is not much attack surface exposed by loading a
filesytem module unless the filesystem is mounted.  In a user
namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
which most filesystems do not set today.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Kees Cook &lt;keescook@google.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>oprofilefs: add missing -&gt;i_mutex locking in object creation</title>
<updated>2013-02-23T04:31:38Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-01-28T19:42:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f3834c35466324e3a7d7bf3a950dbcd99645f38'/>
<id>urn:sha1:3f3834c35466324e3a7d7bf3a950dbcd99645f38</id>
<content type='text'>
Right now it's safe only during initial mount *and* functions are asking
to be abused for dynamic adding of objects.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>mm: use mm-&gt;exe_file instead of first VM_EXECUTABLE vma-&gt;vm_file</title>
<updated>2012-10-09T07:22:18Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>khlebnikov@openvz.org</email>
</author>
<published>2012-10-08T23:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2dd8ad81e31d0d36a5d448329c646ab43eb17788'/>
<id>urn:sha1:2dd8ad81e31d0d36a5d448329c646ab43eb17788</id>
<content type='text'>
Some security modules and oprofile still uses VM_EXECUTABLE for retrieving
a task's executable file.  After this patch they will use mm-&gt;exe_file
directly.  mm-&gt;exe_file is protected with mm-&gt;mmap_sem, so locking stays
the same.

Signed-off-by: Konstantin Khlebnikov &lt;khlebnikov@openvz.org&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;			[arch/tile]
Acked-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;	[tomoyo]
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Carsten Otte &lt;cotte@de.ibm.com&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: Eric Paris &lt;eparis@redhat.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Cc: Kentaro Takeda &lt;takedakn@nttdata.co.jp&gt;
Cc: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Cc: Nick Piggin &lt;npiggin@kernel.dk&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Suresh Siddha &lt;suresh.b.siddha@intel.com&gt;
Cc: Venkatesh Pallipadi &lt;venki@google.com&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&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>oprofile: Remove 'WQ on CPUx, prefer CPUy' warning</title>
<updated>2012-08-27T12:49:39Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2012-08-22T07:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=61bccf191fe2d55b8d003b4ea3f94913745aaefa'/>
<id>urn:sha1:61bccf191fe2d55b8d003b4ea3f94913745aaefa</id>
<content type='text'>
Under certain workloads we see the following warnings:

 WQ on CPU0, prefer CPU1
 WQ on CPU0, prefer CPU2
 WQ on CPU0, prefer CPU3

It warns the user that the wq to access a per-cpu buffers runs not on
the same cpu. This happens if the wq is rescheduled on a different cpu
than where the buffer is located. This was probably implemented to
detect performance issues. Not sure if there actually is one as the
buffers are copied to a single buffer anyway which should be the
actual bottleneck.

We wont change WQ implementation. Since a user can do nothing the
warning is pointless. Removing it.

Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile, perf: Use per-cpu framework</title>
<updated>2012-06-22T14:31:20Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2012-02-23T16:07:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8bbfd7d28303967ca4e8597de9bdc9bf8b197e7'/>
<id>urn:sha1:f8bbfd7d28303967ca4e8597de9bdc9bf8b197e7</id>
<content type='text'>
This changes oprofile_perf.c to use the per-cpu framework.

Using the per-cpu framework should avoid error like the following:

 arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:28:28: error: variably modified 'perf_events' at file scope

Reported-by: William Cohen &lt;wcohen@redhat.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array</title>
<updated>2012-06-21T14:15:11Z</updated>
<author>
<name>Will Deacon</name>
<email>will.deacon@arm.com</email>
</author>
<published>2012-06-08T15:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e734568b675c985db2026848fefaac01c22977a5'/>
<id>urn:sha1:e734568b675c985db2026848fefaac01c22977a5</id>
<content type='text'>
The OProfile perf backend uses a static array to keep track of the
perf events on the system. When compiling with CONFIG_CPUMASK_OFFSTACK=y
&amp;&amp; SMP, nr_cpumask_bits is not a compile-time constant and the build
will fail with:

oprofile_perf.c:28: error: variably modified 'perf_events' at file scope

This patch uses NR_CPUs instead of nr_cpumask_bits for the array
initialisation. If this causes space problems in the future, we can
always move to dynamic allocation for the events array.

Cc: Matt Fleming &lt;matt@console-pimps.org&gt;
Reported-by: Russell King - ARM Linux &lt;linux@arm.linux.org.uk&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v2.6.37+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
</entry>
<entry>
<title>simple_open: automatically convert to simple_open()</title>
<updated>2012-04-05T22:25:50Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2012-04-05T21:25:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=234e340582901211f40d8c732afc49f0630ecf05'/>
<id>urn:sha1:234e340582901211f40d8c732afc49f0630ecf05</id>
<content type='text'>
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op.  This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

&lt;smpl&gt;
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i-&gt;i_private)
-f-&gt;private_data = i-&gt;i_private;
|
-f-&gt;private_data = i-&gt;i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
&lt;/smpl&gt;

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&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>tidy up after d_make_root() conversion</title>
<updated>2012-03-21T01:29:37Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-02-13T03:08:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=318ceed088497d1ca839b1172518ac4cc7096b82'/>
<id>urn:sha1:318ceed088497d1ca839b1172518ac4cc7096b82</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch open-coded instances of d_make_root() to new helper</title>
<updated>2012-03-21T01:29:35Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-01-09T03:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48fde701aff662559b38d9a609574068f22d00fe'/>
<id>urn:sha1:48fde701aff662559b38d9a609574068f22d00fe</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-01-06T16:02:58Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-06T16:02:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=35b740e4662ef386f0c60e1b60aaf5b44db9914c'/>
<id>urn:sha1:35b740e4662ef386f0c60e1b60aaf5b44db9914c</id>
<content type='text'>
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (106 commits)
  perf kvm: Fix copy &amp; paste error in description
  perf script: Kill script_spec__delete
  perf top: Fix a memory leak
  perf stat: Introduce get_ratio_color() helper
  perf session: Remove impossible condition check
  perf tools: Fix feature-bits rework fallout, remove unused variable
  perf script: Add generic perl handler to process events
  perf tools: Use for_each_set_bit() to iterate over feature flags
  perf tools: Unify handling of features when writing feature section
  perf report: Accept fifos as input file
  perf tools: Moving code in some files
  perf tools: Fix out-of-bound access to struct perf_session
  perf tools: Continue processing header on unknown features
  perf tools: Improve macros for struct feature_ops
  perf: builtin-record: Document and check that mmap_pages must be a power of two.
  perf: builtin-record: Provide advice if mmap'ing fails with EPERM.
  perf tools: Fix truncated annotation
  perf script: look up thread using tid instead of pid
  perf tools: Look up thread names for system wide profiling
  perf tools: Fix comm for processes with named threads
  ...
</content>
</entry>
</feed>
