<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/dcookies.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>fs: Remove dcookies support</title>
<updated>2021-01-29T04:36:46+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2021-01-14T11:35:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=be65de6b03aa638c46ea51e9d11a92e4914d8103'/>
<id>be65de6b03aa638c46ea51e9d11a92e4914d8103</id>
<content type='text'>
The dcookies stuff was only used by the kernel's old oprofile code. Now
that oprofile's support is removed from the kernel, there is no need for
dcookies as well. Remove it.

Suggested-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Robert Richter &lt;rric@kernel.org&gt;
Acked-by: William Cohen &lt;wcohen@redhat.com&gt;
Acked-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dcookies stuff was only used by the kernel's old oprofile code. Now
that oprofile's support is removed from the kernel, there is no need for
dcookies as well. Remove it.

Suggested-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Robert Richter &lt;rric@kernel.org&gt;
Acked-by: William Cohen &lt;wcohen@redhat.com&gt;
Acked-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier for missed files</title>
<updated>2019-05-21T08:50:45+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:08:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=457c89965399115e5cd8bf38f9c597293405703d'/>
<id>457c89965399115e5cd8bf38f9c597293405703d</id>
<content type='text'>
Add SPDX license identifiers to all files which:

 - Have no license information of any form

 - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
   initial scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&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>
Add SPDX license identifiers to all files which:

 - Have no license information of any form

 - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
   initial scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: add do_lookup_dcookie() helper; remove in-kernel call to syscall</title>
<updated>2018-04-02T18:15:39+00:00</updated>
<author>
<name>Dominik Brodowski</name>
<email>linux@dominikbrodowski.net</email>
</author>
<published>2018-03-17T13:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=98e5f7bd2c67f4028a0797393092f8730118d713'/>
<id>98e5f7bd2c67f4028a0797393092f8730118d713</id>
<content type='text'>
Using the fs-internal do_lookup_dcookie() helper allows us to get rid of
fs-internal calls to the sys_lookup_dcookie() syscall.

This patch is part of a series which removes in-kernel calls to syscalls.
On this basis, the syscall entry path can be streamlined. For details, see
http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using the fs-internal do_lookup_dcookie() helper allows us to get rid of
fs-internal calls to the sys_lookup_dcookie() syscall.

This patch is part of a series which removes in-kernel calls to syscalls.
On this basis, the syscall entry path can be streamlined. For details, see
http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Dominik Brodowski &lt;linux@dominikbrodowski.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2016-12-24T19:46:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba'/>
<id>7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>constify get_dcookie() and friends</title>
<updated>2016-12-06T00:01:16+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-11-21T00:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=71215a75ceddf38ba9d4563481da8dd943de10fc'/>
<id>71215a75ceddf38ba9d4563481da8dd943de10fc</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>fs/compat: fix lookup_dcookie() parameter handling</title>
<updated>2014-01-30T00:22:40+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2014-01-29T22:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d8d14bd09cddbaf0168d61af638455a26bd027ff'/>
<id>d8d14bd09cddbaf0168d61af638455a26bd027ff</id>
<content type='text'>
Commit d5dc77bfeeab ("consolidate compat lookup_dcookie()") coverted all
architectures to the new compat_sys_lookup_dcookie() syscall.

The "len" paramater of the new compat syscall must have the type
compat_size_t in order to enforce zero extension for architectures where
the ABI requires that the caller of a function performed zero and/or
sign extension to 64 bit of all parameters.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[v3.10+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit d5dc77bfeeab ("consolidate compat lookup_dcookie()") coverted all
architectures to the new compat_sys_lookup_dcookie() syscall.

The "len" paramater of the new compat syscall must have the type
compat_size_t in order to enforce zero extension for architectures where
the ABI requires that the caller of a function performed zero and/or
sign extension to 64 bit of all parameters.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Hendrik Brueckner &lt;brueckner@linux.vnet.ibm.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[v3.10+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>consolidate compat lookup_dcookie()</title>
<updated>2013-03-04T04:00:23+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-02-25T23:42:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d5dc77bfeeab0b03a32e3db5e31e2f64605634ab'/>
<id>d5dc77bfeeab0b03a32e3db5e31e2f64605634ab</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>teach SYSCALL_DEFINE&lt;n&gt; how to deal with long long/unsigned long long</title>
<updated>2013-03-04T03:46:22+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-01-21T20:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b'/>
<id>4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b</id>
<content type='text'>
... and convert a bunch of SYSCALL_DEFINE ones to SYSCALL_DEFINE&lt;n&gt;,
killing the boilerplate crap around them.

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>
... and convert a bunch of SYSCALL_DEFINE ones to SYSCALL_DEFINE&lt;n&gt;,
killing the boilerplate crap around them.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: reduce the use of module.h wherever possible</title>
<updated>2012-02-29T00:31:58+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-11-17T04:57:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=630d9c47274aa89bfa77fe6556d7818bdcb12992'/>
<id>630d9c47274aa89bfa77fe6556d7818bdcb12992</id>
<content type='text'>
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile, dcookies: Fix possible circular locking dependency</title>
<updated>2011-05-31T14:33:35+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-05-31T10:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fe47ae7f53e179d2ef6771024feb000cbb86640f'/>
<id>fe47ae7f53e179d2ef6771024feb000cbb86640f</id>
<content type='text'>
The lockdep warning below detects a possible A-&gt;B/B-&gt;A locking
dependency of mm-&gt;mmap_sem and dcookie_mutex. The order in
sync_buffer() is mm-&gt;mmap_sem/dcookie_mutex, while in
sys_lookup_dcookie() it is vice versa.

Fixing it in sys_lookup_dcookie() by unlocking dcookie_mutex before
copy_to_user().

oprofiled/4432 is trying to acquire lock:
 (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff810b444b&gt;] might_fault+0x53/0xa3

but task is already holding lock:
 (dcookie_mutex){+.+.+.}, at: [&lt;ffffffff81124d28&gt;] sys_lookup_dcookie+0x45/0x149

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (dcookie_mutex){+.+.+.}:
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff814634f0&gt;] mutex_lock_nested+0x63/0x309
       [&lt;ffffffff81124e5c&gt;] get_dcookie+0x30/0x144
       [&lt;ffffffffa0000fba&gt;] sync_buffer+0x196/0x3ec [oprofile]
       [&lt;ffffffffa0001226&gt;] task_exit_notify+0x16/0x1a [oprofile]
       [&lt;ffffffff81467b96&gt;] notifier_call_chain+0x37/0x63
       [&lt;ffffffff8105803d&gt;] __blocking_notifier_call_chain+0x50/0x67
       [&lt;ffffffff81058068&gt;] blocking_notifier_call_chain+0x14/0x16
       [&lt;ffffffff8105a718&gt;] profile_task_exit+0x1a/0x1c
       [&lt;ffffffff81039e8f&gt;] do_exit+0x2a/0x6fc
       [&lt;ffffffff8103a5e4&gt;] do_group_exit+0x83/0xae
       [&lt;ffffffff8103a626&gt;] sys_exit_group+0x17/0x1b
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
       [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff810b4478&gt;] might_fault+0x80/0xa3
       [&lt;ffffffff81124de7&gt;] sys_lookup_dcookie+0x104/0x149
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

1 lock held by oprofiled/4432:
 #0:  (dcookie_mutex){+.+.+.}, at: [&lt;ffffffff81124d28&gt;] sys_lookup_dcookie+0x45/0x149

stack backtrace:
Pid: 4432, comm: oprofiled Not tainted 2.6.39-00008-ge5a450d #9
Call Trace:
 [&lt;ffffffff81063193&gt;] print_circular_bug+0xae/0xbc
 [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
 [&lt;ffffffff8102ef13&gt;] ? get_parent_ip+0x11/0x42
 [&lt;ffffffff810b444b&gt;] ? might_fault+0x53/0xa3
 [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
 [&lt;ffffffff810b444b&gt;] ? might_fault+0x53/0xa3
 [&lt;ffffffff810d7d54&gt;] ? path_put+0x22/0x27
 [&lt;ffffffff810b4478&gt;] might_fault+0x80/0xa3
 [&lt;ffffffff810b444b&gt;] ? might_fault+0x53/0xa3
 [&lt;ffffffff81124de7&gt;] sys_lookup_dcookie+0x104/0x149
 [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

References: https://bugzilla.kernel.org/show_bug.cgi?id=13809
Cc: &lt;stable@kernel.org&gt; # .27+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The lockdep warning below detects a possible A-&gt;B/B-&gt;A locking
dependency of mm-&gt;mmap_sem and dcookie_mutex. The order in
sync_buffer() is mm-&gt;mmap_sem/dcookie_mutex, while in
sys_lookup_dcookie() it is vice versa.

Fixing it in sys_lookup_dcookie() by unlocking dcookie_mutex before
copy_to_user().

oprofiled/4432 is trying to acquire lock:
 (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff810b444b&gt;] might_fault+0x53/0xa3

but task is already holding lock:
 (dcookie_mutex){+.+.+.}, at: [&lt;ffffffff81124d28&gt;] sys_lookup_dcookie+0x45/0x149

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (dcookie_mutex){+.+.+.}:
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff814634f0&gt;] mutex_lock_nested+0x63/0x309
       [&lt;ffffffff81124e5c&gt;] get_dcookie+0x30/0x144
       [&lt;ffffffffa0000fba&gt;] sync_buffer+0x196/0x3ec [oprofile]
       [&lt;ffffffffa0001226&gt;] task_exit_notify+0x16/0x1a [oprofile]
       [&lt;ffffffff81467b96&gt;] notifier_call_chain+0x37/0x63
       [&lt;ffffffff8105803d&gt;] __blocking_notifier_call_chain+0x50/0x67
       [&lt;ffffffff81058068&gt;] blocking_notifier_call_chain+0x14/0x16
       [&lt;ffffffff8105a718&gt;] profile_task_exit+0x1a/0x1c
       [&lt;ffffffff81039e8f&gt;] do_exit+0x2a/0x6fc
       [&lt;ffffffff8103a5e4&gt;] do_group_exit+0x83/0xae
       [&lt;ffffffff8103a626&gt;] sys_exit_group+0x17/0x1b
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
       [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff810b4478&gt;] might_fault+0x80/0xa3
       [&lt;ffffffff81124de7&gt;] sys_lookup_dcookie+0x104/0x149
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

1 lock held by oprofiled/4432:
 #0:  (dcookie_mutex){+.+.+.}, at: [&lt;ffffffff81124d28&gt;] sys_lookup_dcookie+0x45/0x149

stack backtrace:
Pid: 4432, comm: oprofiled Not tainted 2.6.39-00008-ge5a450d #9
Call Trace:
 [&lt;ffffffff81063193&gt;] print_circular_bug+0xae/0xbc
 [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
 [&lt;ffffffff8102ef13&gt;] ? get_parent_ip+0x11/0x42
 [&lt;ffffffff810b444b&gt;] ? might_fault+0x53/0xa3
 [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
 [&lt;ffffffff810b444b&gt;] ? might_fault+0x53/0xa3
 [&lt;ffffffff810d7d54&gt;] ? path_put+0x22/0x27
 [&lt;ffffffff810b4478&gt;] might_fault+0x80/0xa3
 [&lt;ffffffff810b444b&gt;] ? might_fault+0x53/0xa3
 [&lt;ffffffff81124de7&gt;] sys_lookup_dcookie+0x104/0x149
 [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

References: https://bugzilla.kernel.org/show_bug.cgi?id=13809
Cc: &lt;stable@kernel.org&gt; # .27+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
