<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel_samsung_smdk4412/include, branch replicant-6.0</title>
<subtitle>kernel/samsung/smdk4412
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/'/>
<entry>
<title>Add support for gcc6</title>
<updated>2021-08-23T17:20:41+00:00</updated>
<author>
<name>Denis 'GNUtoo' Carikli</name>
<email>GNUtoo@cyberdimension.org</email>
</author>
<published>2021-08-23T17:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=070ecea43a4ac34eaa638973e789b4c672188b04'/>
<id>070ecea43a4ac34eaa638973e789b4c672188b04</id>
<content type='text'>
Without that fix, when building Replicant 6.0 on Trisquel 9 (etiona)
we have the following build error:
    Using [...]/kernel/samsung/smdk4412 as source for kernel
    CHK     include/generated/utsrelease.h
  make[3]: 'include/generated/mach-types.h' is up to date.
    CC      kernel/bounds.s
  In file included from [...]/kernel/samsung/smdk4412/include/linux/compiler.h:48:0,
                   from [...]/kernel/samsung/smdk4412/include/linux/stddef.h:4,
                   from [...]/kernel/samsung/smdk4412/include/linux/posix_types.h:4,
                   from [...]/kernel/samsung/smdk4412/include/linux/types.h:17,
                   from [...]/kernel/samsung/smdk4412/include/linux/page-flags.h:8,
                   from [...]/kernel/samsung/smdk4412/kernel/bounds.c:9:
  [...]/kernel/samsung/smdk4412/include/linux/compiler-gcc.h:99:30:
  fatal error: linux/compiler-gcc6.h: No such file or directory
   #include gcc_header(__GNUC__)
                              ^

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without that fix, when building Replicant 6.0 on Trisquel 9 (etiona)
we have the following build error:
    Using [...]/kernel/samsung/smdk4412 as source for kernel
    CHK     include/generated/utsrelease.h
  make[3]: 'include/generated/mach-types.h' is up to date.
    CC      kernel/bounds.s
  In file included from [...]/kernel/samsung/smdk4412/include/linux/compiler.h:48:0,
                   from [...]/kernel/samsung/smdk4412/include/linux/stddef.h:4,
                   from [...]/kernel/samsung/smdk4412/include/linux/posix_types.h:4,
                   from [...]/kernel/samsung/smdk4412/include/linux/types.h:17,
                   from [...]/kernel/samsung/smdk4412/include/linux/page-flags.h:8,
                   from [...]/kernel/samsung/smdk4412/kernel/bounds.c:9:
  [...]/kernel/samsung/smdk4412/include/linux/compiler-gcc.h:99:30:
  fatal error: linux/compiler-gcc6.h: No such file or directory
   #include gcc_header(__GNUC__)
                              ^

Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport mac80211 from 3.4 kernel</title>
<updated>2019-07-24T10:28:05+00:00</updated>
<author>
<name>Wolfgang Wiedmeyer</name>
<email>wolfgit@wiedmeyer.de</email>
</author>
<published>2017-01-21T00:33:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=934b9a3ebaca33355f1ecab121a7cbaf08e76c83'/>
<id>934b9a3ebaca33355f1ecab121a7cbaf08e76c83</id>
<content type='text'>
The ath9k_htc driver depends on mac80211, but mac80211 can't be
build. The reason is that net/wireless is almost completely backported
from a 3.4 kernel. To follow suit, mac80211 is also backported from
3.4, more precisely from 3.4.113. This makes mac80211 build.

Signed-off-by: Wolfgang Wiedmeyer &lt;wolfgit@wiedmeyer.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ath9k_htc driver depends on mac80211, but mac80211 can't be
build. The reason is that net/wireless is almost completely backported
from a 3.4 kernel. To follow suit, mac80211 is also backported from
3.4, more precisely from 3.4.113. This makes mac80211 build.

Signed-off-by: Wolfgang Wiedmeyer &lt;wolfgit@wiedmeyer.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: add support for gcc 5</title>
<updated>2019-07-24T10:28:04+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2014-10-13T22:51:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=2e0f16e5748aa1232dfcc9d55d7d21bb9de67470'/>
<id>2e0f16e5748aa1232dfcc9d55d7d21bb9de67470</id>
<content type='text'>
commit 71458cfc782eafe4b27656e078d379a34e472adf upstream.

We're missing include/linux/compiler-gcc5.h which is required now
because gcc branched off to v5 in trunk.

Just copy the relevant bits out of include/linux/compiler-gcc4.h,
no new code is added as of now.

This fixes a build error when using gcc 5.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 71458cfc782eafe4b27656e078d379a34e472adf upstream.

We're missing include/linux/compiler-gcc5.h which is required now
because gcc branched off to v5 in trunk.

Just copy the relevant bits out of include/linux/compiler-gcc4.h,
no new code is added as of now.

This fixes a build error when using gcc 5.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf: protect group_leader from races that cause ctx double-free</title>
<updated>2016-12-12T13:14:53+00:00</updated>
<author>
<name>John Dias</name>
<email>joaodias@google.com</email>
</author>
<published>2016-10-10T21:44:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=12bf2ab391d33a49d74b123b66ef87c4ffa14e2e'/>
<id>12bf2ab391d33a49d74b123b66ef87c4ffa14e2e</id>
<content type='text'>
When moving a group_leader perf event from a software-context
to a hardware-context, there's a race in checking and
updating that context. The existing locking solution
doesn't work; note that it tries to grab a lock inside
the group_leader's context object, which you can only
get at by going through a pointer that should be protected
from these races. To avoid that problem, and to produce
a simple solution, we can just use a lock per group_leader
to protect all checks on the group_leader's context.
The new lock is grabbed and released when no context locks
are held.

RM-290

Bug: 30955111
Bug: 31095224
Change-Id: If37124c100ca6f4aa962559fba3bd5dbbec8e052
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When moving a group_leader perf event from a software-context
to a hardware-context, there's a race in checking and
updating that context. The existing locking solution
doesn't work; note that it tries to grab a lock inside
the group_leader's context object, which you can only
get at by going through a pointer that should be protected
from these races. To avoid that problem, and to produce
a simple solution, we can just use a lock per group_leader
to protect all checks on the group_leader's context.
The new lock is grabbed and released when no context locks
are held.

RM-290

Bug: 30955111
Bug: 31095224
Change-Id: If37124c100ca6f4aa962559fba3bd5dbbec8e052
</pre>
</div>
</content>
</entry>
<entry>
<title>BACKPORT: lockdep: Silence warning if CONFIG_LOCKDEP isn't set</title>
<updated>2016-12-12T13:14:52+00:00</updated>
<author>
<name>Paul Bolle</name>
<email>pebolle@tiscali.nl</email>
</author>
<published>2013-01-24T20:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=699bf014212c71ebdb99850682947e8ad19a7499'/>
<id>699bf014212c71ebdb99850682947e8ad19a7499</id>
<content type='text'>
Since commit c9a4962881929df7f1ef6e63e1b9da304faca4dd ("nfsd:
make client_lock per net") compiling nfs4state.o without
CONFIG_LOCKDEP set, triggers this GCC warning:

    fs/nfsd/nfs4state.c: In function ‘free_client’:
    fs/nfsd/nfs4state.c:1051:19: warning: unused variable ‘nn’ [-Wunused-variable]

The cause of that warning is that lockdep_assert_held() compiles
away if CONFIG_LOCKDEP is not set. Silence this warning by using
the argument to lockdep_assert_held() as a nop if CONFIG_LOCKDEP
is not set.

Signed-off-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Cc: J. Bruce Fields &lt;bfields@redhat.com&gt;
Link: http://lkml.kernel.org/r/1359060797.1325.33.camel@x61.thuisdomein
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
--
 include/linux/lockdep.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Change-Id: I4a4e78fd92dccffe5fc7c3a2617ef7d4cf59f738
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit c9a4962881929df7f1ef6e63e1b9da304faca4dd ("nfsd:
make client_lock per net") compiling nfs4state.o without
CONFIG_LOCKDEP set, triggers this GCC warning:

    fs/nfsd/nfs4state.c: In function ‘free_client’:
    fs/nfsd/nfs4state.c:1051:19: warning: unused variable ‘nn’ [-Wunused-variable]

The cause of that warning is that lockdep_assert_held() compiles
away if CONFIG_LOCKDEP is not set. Silence this warning by using
the argument to lockdep_assert_held() as a nop if CONFIG_LOCKDEP
is not set.

Signed-off-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Cc: J. Bruce Fields &lt;bfields@redhat.com&gt;
Link: http://lkml.kernel.org/r/1359060797.1325.33.camel@x61.thuisdomein
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
--
 include/linux/lockdep.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Change-Id: I4a4e78fd92dccffe5fc7c3a2617ef7d4cf59f738
</pre>
</div>
</content>
</entry>
<entry>
<title>BACKPORT: perf: Introduce perf_pmu_migrate_context()</title>
<updated>2016-12-12T13:14:52+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2012-06-15T06:31:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=ab5cf14fb4432d2550896d37e77aa88c335ce9b8'/>
<id>ab5cf14fb4432d2550896d37e77aa88c335ce9b8</id>
<content type='text'>
Originally from Peter Zijlstra. The helper migrates perf events
from one cpu to another cpu.

Conflicts (perf: Fix race in removing an event):
    kernel/events/core.c

Change-Id: I7885fe36c9e2803b10477d556163197085be3d19
Signed-off-by: Zheng Yan &lt;zheng.z.yan@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1339741902-8449-5-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally from Peter Zijlstra. The helper migrates perf events
from one cpu to another cpu.

Conflicts (perf: Fix race in removing an event):
    kernel/events/core.c

Change-Id: I7885fe36c9e2803b10477d556163197085be3d19
Signed-off-by: Zheng Yan &lt;zheng.z.yan@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1339741902-8449-5-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: remove gup_flags FOLL_WRITE games from __get_user_pages()</title>
<updated>2016-10-22T02:35:25+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-19T22:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=6c0837fc69be45a1a1bf91c433ac3a4955597c4e'/>
<id>6c0837fc69be45a1a1bf91c433ac3a4955597c4e</id>
<content type='text'>
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Change-Id: Id9bec3722797dff7d0ff0d9f6097c4229e31fd62
Reported-and-tested-by: Phil "not Paul" Oester &lt;kernel@linuxace.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Nick Piggin &lt;npiggin@gmail.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask;
     s/faultin_page/__get_user_page]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Change-Id: Id9bec3722797dff7d0ff0d9f6097c4229e31fd62
Reported-and-tested-by: Phil "not Paul" Oester &lt;kernel@linuxace.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Reviewed-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Nick Piggin &lt;npiggin@gmail.com&gt;
Cc: Greg Thelen &lt;gthelen@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask;
     s/faultin_page/__get_user_page]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: fix use after free in tcp_xmit_retransmit_queue()</title>
<updated>2016-10-18T14:09:18+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-08-17T12:56:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=ca3aa2bccc89a21ccf2bbfdf59545cbf0cb9c977'/>
<id>ca3aa2bccc89a21ccf2bbfdf59545cbf0cb9c977</id>
<content type='text'>
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()

Then it attempts to copy user data into this fresh skb.

If the copy fails, we undo the work and remove the fresh skb.

Unfortunately, this undo lacks the change done to tp-&gt;highest_sack and
we can leave a dangling pointer (to a freed skb)

Later, tcp_xmit_retransmit_queue() can dereference this pointer and
access freed memory. For regular kernels where memory is not unmapped,
this might cause SACK bugs because tcp_highest_sack_seq() is buggy,
returning garbage instead of tp-&gt;snd_nxt, but with various debug
features like CONFIG_DEBUG_PAGEALLOC, this can crash the kernel.

This bug was found by Marco Grassi thanks to syzkaller.

Change-Id: I264f97d30d0a623011d9ee811c63fa0e0c2149a2
Fixes: 6859d49475d4 ("[TCP]: Abstract tp-&gt;highest_sack accessing &amp; point to next skb")
Reported-by: Marco Grassi &lt;marco.gra@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Ilpo Järvinen &lt;ilpo.jarvinen@helsinki.fi&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Reviewed-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()

Then it attempts to copy user data into this fresh skb.

If the copy fails, we undo the work and remove the fresh skb.

Unfortunately, this undo lacks the change done to tp-&gt;highest_sack and
we can leave a dangling pointer (to a freed skb)

Later, tcp_xmit_retransmit_queue() can dereference this pointer and
access freed memory. For regular kernels where memory is not unmapped,
this might cause SACK bugs because tcp_highest_sack_seq() is buggy,
returning garbage instead of tp-&gt;snd_nxt, but with various debug
features like CONFIG_DEBUG_PAGEALLOC, this can crash the kernel.

This bug was found by Marco Grassi thanks to syzkaller.

Change-Id: I264f97d30d0a623011d9ee811c63fa0e0c2149a2
Fixes: 6859d49475d4 ("[TCP]: Abstract tp-&gt;highest_sack accessing &amp; point to next skb")
Reported-by: Marco Grassi &lt;marco.gra@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Ilpo Järvinen &lt;ilpo.jarvinen@helsinki.fi&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Reviewed-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mm: add a field to store names for private anonymous memory</title>
<updated>2016-08-23T11:55:14+00:00</updated>
<author>
<name>Colin Cross</name>
<email>ccross@android.com</email>
</author>
<published>2015-10-05T14:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=8aa6fa75955db416644e6c9367b350c25cb6745c'/>
<id>8aa6fa75955db416644e6c9367b350c25cb6745c</id>
<content type='text'>
Userspace processes often have multiple allocators that each do
anonymous mmaps to get memory.  When examining memory usage of
individual processes or systems as a whole, it is useful to be
able to break down the various heaps that were allocated by
each layer and examine their size, RSS, and physical memory
usage.

This patch adds a user pointer to the shared union in
vm_area_struct that points to a null terminated string inside
the user process containing a name for the vma.  vmas that
point to the same address will be merged, but vmas that
point to equivalent strings at different addresses will
not be merged.

Userspace can set the name for a region of memory by calling
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name);
Setting the name to NULL clears it.

The names of named anonymous vmas are shown in /proc/pid/maps
as [anon:&lt;name&gt;] and in /proc/pid/smaps in a new "Name" field
that is only present for named vmas.  If the userspace pointer
is no longer valid all or part of the name will be replaced
with "&lt;fault&gt;".

The idea to store a userspace pointer to reduce the complexity
within mm (at the expense of the complexity of reading
/proc/pid/mem) came from Dave Hansen.  This results in no
runtime overhead in the mm subsystem other than comparing
the anon_name pointers when considering vma merging.  The pointer
is stored in a union with fieds that are only used on file-backed
mappings, so it does not increase memory usage.

Change-Id: I53b093d98dc24f41377824f34e076edced4a6f07
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Userspace processes often have multiple allocators that each do
anonymous mmaps to get memory.  When examining memory usage of
individual processes or systems as a whole, it is useful to be
able to break down the various heaps that were allocated by
each layer and examine their size, RSS, and physical memory
usage.

This patch adds a user pointer to the shared union in
vm_area_struct that points to a null terminated string inside
the user process containing a name for the vma.  vmas that
point to the same address will be merged, but vmas that
point to equivalent strings at different addresses will
not be merged.

Userspace can set the name for a region of memory by calling
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name);
Setting the name to NULL clears it.

The names of named anonymous vmas are shown in /proc/pid/maps
as [anon:&lt;name&gt;] and in /proc/pid/smaps in a new "Name" field
that is only present for named vmas.  If the userspace pointer
is no longer valid all or part of the name will be replaced
with "&lt;fault&gt;".

The idea to store a userspace pointer to reduce the complexity
within mm (at the expense of the complexity of reading
/proc/pid/mem) came from Dave Hansen.  This results in no
runtime overhead in the mm subsystem other than comparing
the anon_name pointers when considering vma merging.  The pointer
is stored in a union with fieds that are only used on file-backed
mappings, so it does not increase memory usage.

Change-Id: I53b093d98dc24f41377824f34e076edced4a6f07
</pre>
</div>
</content>
</entry>
<entry>
<title>power: max17042_battery: Set type to UNKNOWN</title>
<updated>2016-08-17T18:52:35+00:00</updated>
<author>
<name>Zhao Wei Liew</name>
<email>zhaoweiliew@gmail.com</email>
</author>
<published>2016-08-17T07:26:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/kernel_samsung_smdk4412/commit/?id=6112c4d4e3408cf2aea5a626a3e39ba3922094c5'/>
<id>6112c4d4e3408cf2aea5a626a3e39ba3922094c5</id>
<content type='text'>
This is a fuelgauge driver, not an actual battery driver.
Setting its type to 'Battery' will confuse healthd,
causing healthd to pick this driver instead of the actual battery driver
for reading battery stats.

Issue-Id: NIGHTLIES-3279

Change-Id: Ia45e74599d391a90cb526aa07a2525b64c3eec96
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a fuelgauge driver, not an actual battery driver.
Setting its type to 'Battery' will confuse healthd,
causing healthd to pick this driver instead of the actual battery driver
for reading battery stats.

Issue-Id: NIGHTLIES-3279

Change-Id: Ia45e74599d391a90cb526aa07a2525b64c3eec96
</pre>
</div>
</content>
</entry>
</feed>
