<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/fs, branch lp-5.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=lp-5.1</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=lp-5.1'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2016-11-24T20:21:12+00:00</updated>
<entry>
<title>Revert "proc: Remove verifiedbootstate flag from /proc/cmdline"</title>
<updated>2016-11-24T20:21:12+00:00</updated>
<author>
<name>Moyster</name>
<email>oysterized@gmail.com</email>
</author>
<published>2016-11-24T20:16:50+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=857ce9e276aee079ecf88ee471d03643e900f336'/>
<id>urn:sha1:857ce9e276aee079ecf88ee471d03643e900f336</id>
<content type='text'>
This commit breaks Offline Charging mode on Mediatek platforms (at least mt6753 and mt6795)

This reverts commit 81cd48af4ce91983fa556039f52bdede850c4e52.
</content>
</entry>
<entry>
<title>proc: Remove verifiedbootstate flag from /proc/cmdline</title>
<updated>2016-11-07T12:44:41+00:00</updated>
<author>
<name>Sultanxda</name>
<email>sultanxda@gmail.com</email>
</author>
<published>2016-10-21T08:37:16+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8f8847a1e936e631ba59ccbb3fc43dc7f1737dca'/>
<id>urn:sha1:8f8847a1e936e631ba59ccbb3fc43dc7f1737dca</id>
<content type='text'>
Userspace parses this and sets the ro.boot.verifiedbootstate prop
according to the value that this flag has. When ro.boot.verifiedbootstate
is not 'green', SafetyNet is tripped and fails the CTS test.

Hide verifiedbootstate from /proc/cmdline in order to fix the failed
SafetyNet CTS check.

Signed-off-by: Sultanxda &lt;sultanxda@gmail.com&gt;
Signed-off-by: Francisco Franco &lt;franciscofranco.1990@gmail.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: disable support for fallocate FALLOC_FL_PUNCH_HOLE</title>
<updated>2016-11-07T12:44:29+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2016-07-18T19:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=a4a6ce26710cc2abb5a2560d410608c2f0ee9c90'/>
<id>urn:sha1:a4a6ce26710cc2abb5a2560d410608c2f0ee9c90</id>
<content type='text'>
Bug: 28760453
Change-Id: I019c2de559db9e4b95860ab852211b456d78c4ca
Signed-off-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
(cherry picked from commit eb0c8de6ef9ec336f88ee49c4c37226f03089e9c)
</content>
</entry>
<entry>
<title>Fix: Elevation of privilege vulnerability in kernel file system</title>
<updated>2016-11-07T12:44:28+00:00</updated>
<author>
<name>Marcos Marado</name>
<email>mmarado@cyngn.com</email>
</author>
<published>2016-07-11T11:31:28+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=fbea6269afa5250fb322ab089d19c61544f79acb'/>
<id>urn:sha1:fbea6269afa5250fb322ab089d19c61544f79acb</id>
<content type='text'>
An elevation of privilege vulnerability in the kernel file system could enable
a local malicious application to execute arbitrary code within the context of
the kernel. This issue is rated as High because it first requires compromising
a privileged process.

CVE            References     Severity
CVE-2016-3802  A-28271368     High

Issue: CYNGNOS-3281

Change-Id: I313dd754911251e7f01a0eb3710ee2565dcc4d1f
(cherry picked from commit b24194f3ccdccd7c9efeb2a2c040e5f7e6fc4ba4)
</content>
</entry>
<entry>
<title>UPSTREAM: proc: actually make proc_fd_permission() thread-friendly</title>
<updated>2016-11-07T12:44:28+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2015-11-07T00:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=7094f78c0f73a176f2bd84bce251b1cb11194343'/>
<id>urn:sha1:7094f78c0f73a176f2bd84bce251b1cb11194343</id>
<content type='text'>
(cherry pick from commit 54708d2858e79a2bdda10bf8a20c80eb96c20613)

The commit 96d0df79f264 ("proc: make proc_fd_permission() thread-friendly")
fixed the access to /proc/self/fd from sub-threads, but introduced another
problem: a sub-thread can't access /proc/&lt;tid&gt;/fd/ or /proc/thread-self/fd
if generic_permission() fails.

Change proc_fd_permission() to check same_thread_group(pid_task(), current).

Fixes: 96d0df79f264 ("proc: make proc_fd_permission() thread-friendly")
Reported-by: "Jin, Yihua" &lt;yihua.jin@intel.com&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Bug: 26016905
Change-Id: I1894c78d0b13f0bde8cde84bd142ba67590dc0f1
</content>
</entry>
<entry>
<title>UPSTREAM: proc: make proc_fd_permission() thread-friendly</title>
<updated>2016-11-07T12:44:28+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2013-09-11T21:24:37+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=a41ad7e041852f537154b6524aa88d3df6a91653'/>
<id>urn:sha1:a41ad7e041852f537154b6524aa88d3df6a91653</id>
<content type='text'>
(cherry pick from commit 96d0df79f2644fc823f26c06491e182d87a90c2a)

proc_fd_permission() says "process can still access /proc/self/fd after it
has executed a setuid()", but the "task_pid() = proc_pid() check only
helps if the task is group leader, /proc/self points to
/proc/&lt;leader-pid&gt;.

Change this check to use task_tgid() so that the whole thread group can
access its /proc/self/fd or /proc/&lt;tid-of-sub-thread&gt;/fd.

Notes:
	- CLONE_THREAD does not require CLONE_FILES so task-&gt;files
	  can differ, but I don't think this can lead to any security
	  problem. And this matches same_thread_group() in
	  __ptrace_may_access().

	- /proc/self should probably point to /proc/&lt;thread-tid&gt;, but
	  it is too late to change the rules. Perhaps it makes sense
	  to add /proc/thread though.

Test-case:

	void *tfunc(void *arg)
	{
		assert(opendir("/proc/self/fd"));
		return NULL;
	}

	int main(void)
	{
		pthread_t t;
		pthread_create(&amp;t, NULL, tfunc, NULL);
		pthread_join(t, NULL);
		return 0;
	}

fails if, say, this executable is not readable and suid_dumpable = 0.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Bug: 26016905
Change-Id: Ifdd6403a8fccd073122e89d3547c13ccc08f0dce
</content>
</entry>
<entry>
<title>fs: push sync_filesystem() down to the file system's remount_fs()</title>
<updated>2016-11-07T12:44:23+00:00</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2014-03-13T14:14:33+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=eea2f4db9ddfc32d9e2998c2a6993d7ae4f01326'/>
<id>urn:sha1:eea2f4db9ddfc32d9e2998c2a6993d7ae4f01326</id>
<content type='text'>
Previously, the no-op "mount -o mount /dev/xxx" operation when the
file system is already mounted read-write causes an implied,
unconditional syncfs().  This seems pretty stupid, and it's certainly
documented or guaraunteed to do this, nor is it particularly useful,
except in the case where the file system was mounted rw and is getting
remounted read-only.

However, it's possible that there might be some file systems that are
actually depending on this behavior.  In most file systems, it's
probably fine to only call sync_filesystem() when transitioning from
read-write to read-only, and there are some file systems where this is
not needed at all (for example, for a pseudo-filesystem or something
like romfs).

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: linux-fsdevel@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Evgeniy Dushistov &lt;dushistov@mail.ru&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Anders Larsen &lt;al@alarsen.net&gt;
Cc: Phillip Lougher &lt;phillip@squashfs.org.uk&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Mikulas Patocka &lt;mikulas@artax.karlin.mff.cuni.cz&gt;
Cc: Petr Vandrovec &lt;petr@vandrovec.name&gt;
Cc: xfs@oss.sgi.com
Cc: linux-btrfs@vger.kernel.org
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Cc: codalist@coda.cs.cmu.edu
Cc: linux-ext4@vger.kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Cc: fuse-devel@lists.sourceforge.net
Cc: cluster-devel@redhat.com
Cc: linux-mtd@lists.infradead.org
Cc: jfs-discussion@lists.sourceforge.net
Cc: linux-nfs@vger.kernel.org
Cc: linux-nilfs@vger.kernel.org
Cc: linux-ntfs-dev@lists.sourceforge.net
Cc: ocfs2-devel@oss.oracle.com
Cc: reiserfs-devel@vger.kernel.org
</content>
</entry>
<entry>
<title>proc: introduce proc_mem_open()</title>
<updated>2016-09-28T13:15:18+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-10-09T22:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=e358ceae05bf70288fe0a1195ab555c507bcbcbd'/>
<id>urn:sha1:e358ceae05bf70288fe0a1195ab555c507bcbcbd</id>
<content type='text'>
Extract the mm_access() code from __mem_open() into the new helper,
proc_mem_open(), the next patch will add another caller.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.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: W4TCH0UT &lt;ateekujjawal@gmail.com&gt;

Conflicts:
	fs/proc/base.c
</content>
</entry>
<entry>
<title>mempolicy: fix show_numa_map() vs exec() + do_set_mempolicy() race</title>
<updated>2016-09-28T13:15:17+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-10-09T22:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b4f19709f1dded1df666a03124702274a6f68693'/>
<id>urn:sha1:b4f19709f1dded1df666a03124702274a6f68693</id>
<content type='text'>
9e7814404b77 "hold task-&gt;mempolicy while numa_maps scans." fixed the
race with the exiting task but this is not enough.

The current code assumes that get_vma_policy(task) should either see
task-&gt;mempolicy == NULL or it should be equal to -&gt;task_mempolicy saved
by hold_task_mempolicy(), so we can never race with __mpol_put(). But
this can only work if we can't race with do_set_mempolicy(), and thus
we can't race with another do_set_mempolicy() or do_exit() after that.

However, do_set_mempolicy()-&gt;down_write(mmap_sem) can not prevent this
race. This task can exec, change it's -&gt;mm, and call do_set_mempolicy()
after that; in this case they take 2 different locks.

Change hold_task_mempolicy() to use get_task_policy(), it never returns
NULL, and change show_numa_map() to use __get_vma_policy() or fall back
to proc_priv-&gt;task_mempolicy.

Note: this is the minimal fix, we will cleanup this code later. I think
hold_task_mempolicy() and release_task_mempolicy() should die, we can
move this logic into show_numa_map(). Or we can move get_task_policy()
outside of -&gt;mmap_sem and !CONFIG_NUMA code at least.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Naoya Horiguchi &lt;n-horiguchi@ah.jp.nec.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: W4TCH0UT &lt;ateekujjawal@gmail.com&gt;
</content>
</entry>
<entry>
<title>proc/maps: make vm_is_stack() logic namespace-friendly</title>
<updated>2016-09-28T13:15:16+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-10-09T22:25:54+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=740561452df6f151d608d336aaf53bc0c6602e75'/>
<id>urn:sha1:740561452df6f151d608d336aaf53bc0c6602e75</id>
<content type='text'>
- Rename vm_is_stack() to task_of_stack() and change it to return
  "struct task_struct *" rather than the global (and thus wrong in
  general) pid_t.

- Add the new pid_of_stack() helper which calls task_of_stack() and
  uses the right namespace to report the correct pid_t.

  Unfortunately we need to define this helper twice, in task_mmu.c
  and in task_nommu.c. perhaps it makes sense to add fs/proc/util.c
  and move at least pid_of_stack/task_of_stack there to avoid the
  code duplication.

- Change show_map_vma() and show_numa_map() to use the new helper.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Greg Ungerer &lt;gerg@uclinux.org&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.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: W4TCH0UT &lt;ateekujjawal@gmail.com&gt;

Conflicts:
	fs/proc/task_nommu.c
	mm/util.c
</content>
</entry>
</feed>
