<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/arch/arc, branch ng-7.1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2017-07-04T10:11:29+00:00</updated>
<entry>
<title>mm: larger stack guard gap, between vmas</title>
<updated>2017-07-04T10:11:29+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2017-06-19T11:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=005510a4492897b8459a7678191bd9ea39335bee'/>
<id>urn:sha1:005510a4492897b8459a7678191bd9ea39335bee</id>
<content type='text'>
commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream.

Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage in
userspace. E.g. glibc uses as large as 64kB alloca() in many commonly
used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX]
which is 256kB or stack strings with MAX_ARG_STRLEN.

This will become especially dangerous for suid binaries and the default
no limit for the stack size limit because those applications can be
tricked to consume a large portion of the stack and a single glibc call
could jump over the guard page. These attacks are not theoretical,
unfortunatelly.

Make those attacks less probable by increasing the stack guard gap
to 1MB (on systems with 4k pages; but make it depend on the page size
because systems with larger base pages might cap stack allocations in
the PAGE_SIZE units) which should cover larger alloca() and VLA stack
allocations. It is obviously not a full fix because the problem is
somehow inherent, but it should reduce attack space a lot.

One could argue that the gap size should be configurable from userspace,
but that can be done later when somebody finds that the new 1MB is wrong
for some special case applications.  For now, add a kernel command line
option (stack_guard_gap) to specify the stack gap size (in page units).

Implementation wise, first delete all the old code for stack guard page:
because although we could get away with accounting one extra page in a
stack vma, accounting a larger gap can break userspace - case in point,
a program run with "ulimit -S -v 20000" failed when the 1MB gap was
counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK
and strict non-overcommit mode.

Instead of keeping gap inside the stack vma, maintain the stack guard
gap as a gap between vmas: using vm_start_gap() in place of vm_start
(or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few
places which need to respect the gap - mainly arch_get_unmapped_area(),
and and the vma tree's subtree_gap support for that.

Original-patch-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Original-patch-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
[wt: backport to 4.11: adjust context]
[wt: backport to 4.9: adjust context ; kernel doc was not in admin-guide]
[wt: backport to 4.4: adjust context ; drop ppc hugetlb_radix changes]
[wt: backport to 3.18: adjust context ; no FOLL_POPULATE ;
     s390 uses generic arch_get_unmapped_area()]
[wt: backport to 3.16: adjust context]
[wt: backport to 3.10: adjust context ; code logic in PARISC's
     arch_get_unmapped_area() wasn't found ; code inserted into
     expand_upwards() and expand_downwards() runs under anon_vma lock;
     changes for gup.c:faultin_page go to memory.c:__get_user_pages();
     included Hugh Dickins' fixes]
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup</title>
<updated>2017-07-04T09:51:32+00:00</updated>
<author>
<name>Vineet Gupta</name>
<email>Vineet.Gupta1@synopsys.com</email>
</author>
<published>2017-02-07T17:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=260c12cbd7dfeefd19a519939d72749f984ee915'/>
<id>urn:sha1:260c12cbd7dfeefd19a519939d72749f984ee915</id>
<content type='text'>
commit a524c218bc94c705886a0e0fedeee45d1931da32 upstream.

Reported-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
Fixes: 9aed02feae57bf7 ("ARC: [arcompact] handle unaligned access delay slot")
Cc: linux-kernel@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>ARC: [arcompact] handle unaligned access delay slot corner case</title>
<updated>2017-07-04T09:51:29+00:00</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2017-01-27T18:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=0d579bbb5bc024776de5e0c7e9f2081b09e4786c'/>
<id>urn:sha1:0d579bbb5bc024776de5e0c7e9f2081b09e4786c</id>
<content type='text'>
commit 9aed02feae57bf7a40cb04ea0e3017cb7a998db4 upstream.

After emulating an unaligned access in delay slot of a branch, we
pretend as the delay slot never happened - so return back to actual
branch target (or next PC if branch was not taken).

Curently we did this by handling STATUS32.DE, we also need to clear the
BTA.T bit, which is disregarded when returning from original misaligned
exception, but could cause weirdness if it took the interrupt return
path (in case interrupt was acive too)

One ARC700 customer ran into this when enabling unaligned access fixup
for kernel mode accesses as well

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>locking/mcs: Allow architecture specific asm files to be used for contended case</title>
<updated>2017-05-03T13:21:33+00:00</updated>
<author>
<name>Tim Chen</name>
<email>tim.c.chen@linux.intel.com</email>
</author>
<published>2014-01-21T23:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=3ba1d59d6e3bd0fe7694c8f7962723656c6bd18e'/>
<id>urn:sha1:3ba1d59d6e3bd0fe7694c8f7962723656c6bd18e</id>
<content type='text'>
This patch allows each architecture to add its specific assembly optimized
arch_mcs_spin_lock_contended and arch_mcs_spinlock_uncontended for
MCS lock and unlock functions.

Signed-off-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Cc: Scott J Norton &lt;scott.norton@hp.com&gt;
Cc: Raghavendra K T &lt;raghavendra.kt@linux.vnet.ibm.com&gt;
Cc: AswinChandramouleeswaran &lt;aswin@hp.com&gt;
Cc: George Spelvin &lt;linux@horizon.com&gt;
Cc: Rik vanRiel &lt;riel@redhat.com&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: MichelLespinasse &lt;walken@google.com&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Alex Shi &lt;alex.shi@linaro.org&gt;
Cc: Dave Hansen &lt;dave.hansen@intel.com&gt;
Cc: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: "Figo.zhang" &lt;figo1802@gmail.com&gt;
Cc: "Paul E.McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Davidlohr Bueso &lt;davidlohr.bueso@hp.com&gt;
Cc: Waiman Long &lt;waiman.long@hp.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Matthew R Wilcox &lt;matthew.r.wilcox@intel.com&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1390347382.3138.67.camel@schen9-DESK
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: ddf1d169c0a489d498c1799a7043904a43b0c159
[joonwoop@codeaurora.org: Resolve merge conflicts; we don't have changes
for arch other than ARM/ARM64]
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>locking/mcs: Order the header files in Kbuild of each architecture in alphabetical order</title>
<updated>2017-05-03T13:20:57+00:00</updated>
<author>
<name>Tim Chen</name>
<email>tim.c.chen@linux.intel.com</email>
</author>
<published>2014-07-24T19:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=194af0c1da9a9fb8c79071be507736e0c9d5d252'/>
<id>urn:sha1:194af0c1da9a9fb8c79071be507736e0c9d5d252</id>
<content type='text'>
We perform a clean up of the Kbuid files in each architecture.
We order the files in each Kbuild in alphabetical order
by running the below script.

for i in arch/*/include/asm/Kbuild
do
        cat $i | gawk '/^generic-y/ {
                i = 3;
                do {
                        for (; i &lt;= NF; i++) {
                                if ($i == "\\") {
                                        getline;
                                        i = 1;
                                        continue;
                                }
                                if ($i != "")
                                        hdr[$i] = $i;
                        }
                        break;
                } while (1);
                next;
        }
        // {
                print $0;
        }
        END {
                n = asort(hdr);
                for (i = 1; i &lt;= n; i++)
                        print "generic-y += " hdr[i];
        }' &gt; ${i}.sorted;
        mv ${i}.sorted $i;
done

Signed-off-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Matthew R Wilcox &lt;matthew.r.wilcox@intel.com&gt;
Cc: AswinChandramouleeswaran &lt;aswin@hp.com&gt;
Cc: Dave Hansen &lt;dave.hansen@intel.com&gt;
Cc: "Paul E.McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Scott J Norton &lt;scott.norton@hp.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: "Figo.zhang" &lt;figo1802@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Rik van Riel &lt;riel@redhat.com&gt;
Cc: Waiman Long &lt;waiman.long@hp.com&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Cc: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Cc: Alex Shi &lt;alex.shi@linaro.org&gt;
Cc: Raghavendra K T &lt;raghavendra.kt@linux.vnet.ibm.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: George Spelvin &lt;linux@horizon.com&gt;
Cc: MichelLespinasse &lt;walken@google.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Davidlohr Bueso &lt;davidlohr.bueso@hp.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
[ Fixed build bug. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: b119fa61d440fe0f5af504299ad506637585a8ca
[joonwoop@codeaurora.org: resolved conflict due to missing Kbuild files.]
Signed-off-by: Joonwoo Park &lt;joonwoop@codeaurora.org&gt;
</content>
</entry>
<entry>
<title> Get rid of __cpuinit</title>
<updated>2017-04-11T09:00:11+00:00</updated>
<author>
<name>Moyster</name>
<email>oysterized@gmail.com</email>
</author>
<published>2017-03-18T01:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=7c777e87cb30fc926920d677a845d651decaf997'/>
<id>urn:sha1:7c777e87cb30fc926920d677a845d651decaf997</id>
<content type='text'>
This commit is the result of

find . -name '*.c' | xargs sed -i 's/ __cpuinit / /g'
find . -name '*.c' | xargs sed -i 's/ __cpuexit / /g'
find . -name '*.c' | xargs sed -i 's/ __cpuinitdata / /g'
find . -name '*.c' | xargs sed -i 's/ __cpuinit$//g'
find ./arch/ -name '*.h' | xargs sed -i 's/ __cpuinit//g'
find . -name '*.c' | xargs sed -i 's/^__cpuinit //g'
find . -name '*.c' | xargs sed -i 's/^__cpuinitdata //g'
find . -name '*.c' | xargs sed -i 's/\*__cpuinit /\*/g'
find . -name '*.c' | xargs sed -i 's/ __cpuinitconst / /g'
find . -name '*.h' | xargs sed -i 's/ __cpuinit / /g'
find . -name '*.h' | xargs sed -i 's/ __cpuinitdata / /g'
git add .
git reset include/linux/init.h
git checkout -- include/linux/init.h

based off : https://github.com/jollaman999/jolla-kernel_bullhead/commit/bc15db84a622eed7d61d3ece579b577154d0ec29
</content>
</entry>
<entry>
<title>arc: don't leak bits of kernel stack into coredump</title>
<updated>2017-04-11T08:58:01+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-09-10T20:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b7c711e9fccf5b69e55583b5e5bf284eb6241206'/>
<id>urn:sha1:b7c711e9fccf5b69e55583b5e5bf284eb6241206</id>
<content type='text'>
commit 7798bf2140ebcc36eafec6a4194fffd8d585d471 upstream.

On faulting sigreturn we do get SIGSEGV, all right, but anything
we'd put into pt_regs could end up in the coredump.  And since
__copy_from_user() never zeroed on arc, we'd better bugger off
on its failure without copying random uninitialized bits of
kernel stack into pt_regs...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>ARC: uaccess: get_user to zero out dest in cause of fault</title>
<updated>2017-04-11T08:57:56+00:00</updated>
<author>
<name>Vineet Gupta</name>
<email>Vineet.Gupta1@synopsys.com</email>
</author>
<published>2016-08-19T19:10:02+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=e7f1be5570c8a3712a765a0bbadbb102202f451a'/>
<id>urn:sha1:e7f1be5570c8a3712a765a0bbadbb102202f451a</id>
<content type='text'>
commit 05d9d0b96e53c52a113fd783c0c97c830c8dc7af upstream.

Al reported potential issue with ARC get_user() as it wasn't clearing
out destination pointer in case of fault due to bad address etc.

Verified using following

| {
|  	u32 bogus1 = 0xdeadbeef;
|	u64 bogus2 = 0xdead;
|	int rc1, rc2;
|
|  	pr_info("Orig values %x %llx\n", bogus1, bogus2);
|	rc1 = get_user(bogus1, (u32 __user *)0x40000000);
|	rc2 = get_user(bogus2, (u64 __user *)0x50000000);
|	pr_info("access %d %d, new values %x %llx\n",
|		rc1, rc2, bogus1, bogus2);
| }

| [ARCLinux]# insmod /mnt/kernel-module/qtn.ko
| Orig values deadbeef dead
| access -14 -14, new values 0 0

Reported-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS</title>
<updated>2017-04-11T08:56:59+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2013-11-14T22:32:07+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=eadfd4315866c2cbb076cfb6d3103456b0f55052'/>
<id>urn:sha1:eadfd4315866c2cbb076cfb6d3103456b0f55052</id>
<content type='text'>
We've switched over every architecture that supports SMP to it, so
remove the new useless config variable.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[imaund@codeaurora.org: resolve merge conflicts]
Signed-off-by: Ian Maund &lt;imaund@codeaurora.org&gt;
Signed-off-by: Pranav Vashi &lt;neobuddy89@gmail.com&gt;
</content>
</entry>
<entry>
<title>3.10.102-&gt; 3.10.103</title>
<updated>2016-09-09T22:45:11+00:00</updated>
<author>
<name>Jan Engelmohr</name>
<email>jan.engelmohr@mailbox.tu-dresden.de</email>
</author>
<published>2016-09-04T14:45:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=0a1e8e11acd3cc36b1d65023ce1cb1a06a887b11'/>
<id>urn:sha1:0a1e8e11acd3cc36b1d65023ce1cb1a06a887b11</id>
<content type='text'>
</content>
</entry>
</feed>
