<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/include, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-05T07:47:32Z</updated>
<entry>
<title>arm64: mm: Use READ_ONCE when dereferencing pointer to pte table</title>
<updated>2017-10-05T07:47:32Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2017-09-29T10:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4bf30dffc293273ce28291d9129825c2bb1b14f3'/>
<id>urn:sha1:4bf30dffc293273ce28291d9129825c2bb1b14f3</id>
<content type='text'>
commit f069faba688701c4d56b6c3452a130f97bf02e95 upstream.

On kernels built with support for transparent huge pages, different CPUs
can access the PMD concurrently due to e.g. fast GUP or page_vma_mapped_walk
and they must take care to use READ_ONCE to avoid value tearing or caching
of stale values by the compiler. Unfortunately, these functions call into
our pgtable macros, which don't use READ_ONCE, and compiler caching has
been observed to cause the following crash during ext4 writeback:

PC is at check_pte+0x20/0x170
LR is at page_vma_mapped_walk+0x2e0/0x540
[...]
Process doio (pid: 2463, stack limit = 0xffff00000f2e8000)
Call trace:
[&lt;ffff000008233328&gt;] check_pte+0x20/0x170
[&lt;ffff000008233758&gt;] page_vma_mapped_walk+0x2e0/0x540
[&lt;ffff000008234adc&gt;] page_mkclean_one+0xac/0x278
[&lt;ffff000008234d98&gt;] rmap_walk_file+0xf0/0x238
[&lt;ffff000008236e74&gt;] rmap_walk+0x64/0xa0
[&lt;ffff0000082370c8&gt;] page_mkclean+0x90/0xa8
[&lt;ffff0000081f3c64&gt;] clear_page_dirty_for_io+0x84/0x2a8
[&lt;ffff00000832f984&gt;] mpage_submit_page+0x34/0x98
[&lt;ffff00000832fb4c&gt;] mpage_process_page_bufs+0x164/0x170
[&lt;ffff00000832fc8c&gt;] mpage_prepare_extent_to_map+0x134/0x2b8
[&lt;ffff00000833530c&gt;] ext4_writepages+0x484/0xe30
[&lt;ffff0000081f6ab4&gt;] do_writepages+0x44/0xe8
[&lt;ffff0000081e5bd4&gt;] __filemap_fdatawrite_range+0xbc/0x110
[&lt;ffff0000081e5e68&gt;] file_write_and_wait_range+0x48/0xd8
[&lt;ffff000008324310&gt;] ext4_sync_file+0x80/0x4b8
[&lt;ffff0000082bd434&gt;] vfs_fsync_range+0x64/0xc0
[&lt;ffff0000082332b4&gt;] SyS_msync+0x194/0x1e8

This is because page_vma_mapped_walk loads the PMD twice before calling
pte_offset_map: the first time without READ_ONCE (where it gets all zeroes
due to a concurrent pmdp_invalidate) and the second time with READ_ONCE
(where it sees a valid table pointer due to a concurrent pmd_populate).
However, the compiler inlines everything and caches the first value in
a register, which is subsequently used in pte_offset_phys which returns
a junk pointer that is later dereferenced when attempting to access the
relevant pte.

This patch fixes the issue by using READ_ONCE in pte_offset_phys to ensure
that a stale value is not used. Whilst this is a point fix for a known
failure (and simple to backport), a full fix moving all of our page table
accessors over to {READ,WRITE}_ONCE and consistently using READ_ONCE in
page_vma_mapped_walk is in the works for a future kernel release.

Cc: Jon Masters &lt;jcm@redhat.com&gt;
Cc: Timur Tabi &lt;timur@codeaurora.org&gt;
Fixes: f27176cfc363 ("mm: convert page_mkclean_one() to use page_vma_mapped_walk()")
Tested-by: Richard Ruigrok &lt;rruigrok@codeaurora.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>KVM: update to new mmu_notifier semantic v2</title>
<updated>2017-08-31T23:13:00Z</updated>
<author>
<name>Jérôme Glisse</name>
</author>
<published>2017-08-31T21:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb1522e099f0c69f36655af233a64e3f55941f5b'/>
<id>urn:sha1:fb1522e099f0c69f36655af233a64e3f55941f5b</id>
<content type='text'>
Calls to mmu_notifier_invalidate_page() were replaced by calls to
mmu_notifier_invalidate_range() and are now bracketed by calls to
mmu_notifier_invalidate_range_start()/end()

Remove now useless invalidate_page callback.

Changed since v1 (Linus Torvalds)
    - remove now useless kvm_arch_mmu_notifier_invalidate_page()

Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Tested-by: Mike Galbraith &lt;efault@gmx.de&gt;
Tested-by: Adam Borowski &lt;kilobyte@angband.pl&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Cc: kvm@vger.kernel.org
Cc: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2017-08-20T16:34:24Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-08-20T16:34:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2615a38f142ffda863dece40120d7fe69af46490'/>
<id>urn:sha1:2615a38f142ffda863dece40120d7fe69af46490</id>
<content type='text'>
Pull timer fixes from Thomas Gleixner:
 "A few small fixes for timer drivers:

   - Prevent infinite recursion in the arm architected timer driver with
     ftrace

   - Propagate error codes to the caller in case of failure in EM STI
     driver

   - Adjust a bogus loop iteration in the arm architected timer driver

   - Add a missing Kconfig dependency to the pistachio clocksource to
     prevent build failures

   - Correctly check for IS_ERR() instead of NULL in the shared timer-of
     code"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled
  clocksource/drivers/Kconfig: Fix CLKSRC_PISTACHIO dependencies
  clocksource/drivers/timer-of: Checking for IS_ERR() instead of NULL
  clocksource/drivers/em_sti: Fix error return codes in em_sti_probe()
  clocksource/drivers/arm_arch_timer: Fix mem frame loop initialization
</content>
</entry>
<entry>
<title>mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes</title>
<updated>2017-08-18T22:32:02Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2017-08-18T22:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c715b72c1ba406f133217b509044c38d8e714a37'/>
<id>urn:sha1:c715b72c1ba406f133217b509044c38d8e714a37</id>
<content type='text'>
Moving the x86_64 and arm64 PIE base from 0x555555554000 to 0x000100000000
broke AddressSanitizer.  This is a partial revert of:

  eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE")
  02445990a96e ("arm64: move ELF_ET_DYN_BASE to 4GB / 4MB")

The AddressSanitizer tool has hard-coded expectations about where
executable mappings are loaded.

The motivation for changing the PIE base in the above commits was to
avoid the Stack-Clash CVEs that allowed executable mappings to get too
close to heap and stack.  This was mainly a problem on 32-bit, but the
64-bit bases were moved too, in an effort to proactively protect those
systems (proofs of concept do exist that show 64-bit collisions, but
other recent changes to fix stack accounting and setuid behaviors will
minimize the impact).

The new 32-bit PIE base is fine for ASan (since it matches the ET_EXEC
base), so only the 64-bit PIE base needs to be reverted to let x86 and
arm64 ASan binaries run again.  Future changes to the 64-bit PIE base on
these architectures can be made optional once a more dynamic method for
dealing with AddressSanitizer is found.  (e.g.  always loading PIE into
the mmap region for marked binaries.)

Link: http://lkml.kernel.org/r/20170807201542.GA21271@beast
Fixes: eab09532d400 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE")
Fixes: 02445990a96e ("arm64: move ELF_ET_DYN_BASE to 4GB / 4MB")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Kostya Serebryany &lt;kcc@google.com&gt;
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&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;
</content>
</entry>
<entry>
<title>Merge branch 'clockevents/4.13-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent</title>
<updated>2017-08-13T09:39:45Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-08-13T09:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b60bf53abc0323f91ac59b08a7642216281e662e'/>
<id>urn:sha1:b60bf53abc0323f91ac59b08a7642216281e662e</id>
<content type='text'>
Pull clockevents fixes from Daniel Lezcano:

" - Fix error check against IS_ERR() instead of NULL for the timer-of code (Dan Carpenter)
  - Fix infinite recusion with ftrace for the ARM architected timer (Ding Tianhong)
  - Fix the error code return in the em_sti's probe function (Gustavo A. R.  Silva)
  - Fix Kconfig dependency for the pistachio driver (Matt Redfearn)
  - Fix mem frame loop initialization for the ARM architected timer (Matthias Kaehlcke)"

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/arm_arch_timer: Avoid infinite recursion when ftrace is enabled</title>
<updated>2017-08-11T14:01:43Z</updated>
<author>
<name>Ding Tianhong</name>
</author>
<published>2017-08-10T02:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adb4f11e0a8f4e29900adb2b7af28b6bbd5c1fa4'/>
<id>urn:sha1:adb4f11e0a8f4e29900adb2b7af28b6bbd5c1fa4</id>
<content type='text'>
On platforms with an arch timer erratum workaround, it's possible for
arch_timer_reg_read_stable() to recurse into itself when certain
tracing options are enabled, leading to stack overflows and related
problems.

For example, when PREEMPT_TRACER and FUNCTION_GRAPH_TRACER are
selected, it's possible to trigger this with:

$ mount -t debugfs nodev /sys/kernel/debug/
$ echo function_graph &gt; /sys/kernel/debug/tracing/current_tracer

The problem is that in such cases, preempt_disable() instrumentation
attempts to acquire a timestamp via trace_clock(), resulting in a call
back to arch_timer_reg_read_stable(), and hence recursion.

This patch changes arch_timer_reg_read_stable() to use
preempt_{disable,enable}_notrace(), which avoids this.

This problem is similar to the fixed by upstream commit 96b3d28bf4
("sched/clock: Prevent tracing recursion in sched_clock_cpu()").

Fixes: 6acc71ccac71 ("arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs")
Signed-off-by: Ding Tianhong &lt;dingtianhong@huawei.com&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>arm64: avoid overflow in VA_START and PAGE_OFFSET</title>
<updated>2017-08-04T14:06:35Z</updated>
<author>
<name>Nick Desaulniers</name>
</author>
<published>2017-08-03T18:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82cd588052815eb4146f9f7c5347ca5e32c56360'/>
<id>urn:sha1:82cd588052815eb4146f9f7c5347ca5e32c56360</id>
<content type='text'>
The bitmask used to define these values produces overflow, as seen by
this compiler warning:

arch/arm64/kernel/head.S:47:8: warning:
      integer overflow in preprocessor expression
  #elif (PAGE_OFFSET &amp; 0x1fffff) != 0
         ^~~~~~~~~~~
arch/arm64/include/asm/memory.h:52:46: note:
      expanded from macro 'PAGE_OFFSET'
  #define PAGE_OFFSET             (UL(0xffffffffffffffff) &lt;&lt; (VA_BITS -
1))
                                      ~~~~~~~~~~~~~~~~~~  ^

It would be preferrable to use GENMASK_ULL() instead, but it's not set
up to be used from assembly (the UL() macro token pastes UL suffixes
when not included in assembly sources).

Suggested-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Suggested-by: Yury Norov &lt;ynorov@caviumnetworks.com&gt;
Suggested-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux</title>
<updated>2017-07-28T20:29:36Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-07-28T20:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d9d7405c0699ade882fec0c1cc6685cd5742ab3'/>
<id>urn:sha1:3d9d7405c0699ade882fec0c1cc6685cd5742ab3</id>
<content type='text'>
Pull arm64 fixes from Will Deacon:
 "I'd been collecting these whilst we debugged a CPU hotplug failure,
  but we ended up diagnosing that one to tglx, who has taken a fix via
  the -tip tree separately.

  We're seeing some NFS issues that we haven't gotten to the bottom of
  yet, and we've uncovered some issues with our backtracing too so there
  might be another fixes pull before we're done.

  Summary:

   - Ensure we have a guard page after the kernel image in vmalloc

   - Fix incorrect prefetch stride in copy_page

   - Ensure irqs are disabled in die()

   - Fix for event group validation in QCOM L2 PMU driver

   - Fix requesting of PMU IRQs on AMD Seattle

   - Minor cleanups and fixes"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: mmu: Place guard page after mapping of kernel image
  drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU
  arm64: sysreg: Fix unprotected macro argmuent in write_sysreg
  perf: qcom_l2: fix column exclusion check
  arm64/lib: copy_page: use consistent prefetch stride
  arm64/numa: Drop duplicate message
  perf: Convert to using %pOF instead of full_name
  arm64: Convert to using %pOF instead of full_name
  arm64: traps: disable irq in die()
  arm64: atomics: Remove '&amp;' from '+&amp;' asm constraint in lse atomics
  arm64: uaccess: Remove redundant __force from addr cast in __range_ok
</content>
</entry>
<entry>
<title>arm64: sysreg: Fix unprotected macro argmuent in write_sysreg</title>
<updated>2017-07-26T08:28:18Z</updated>
<author>
<name>Dave Martin</name>
</author>
<published>2017-07-25T11:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0153c7ff9226535a51e6a81f61656c9500957f4'/>
<id>urn:sha1:d0153c7ff9226535a51e6a81f61656c9500957f4</id>
<content type='text'>
write_sysreg() may misparse the value argument because it is used
without parentheses to protect it.

This patch adds the ( ) in order to avoid any surprises.

Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Dave Martin &lt;Dave.Martin@arm.com&gt;
[will: same change to write_sysreg_s]
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2017-07-21T17:41:19Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-07-21T17:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a6109fd1b605cbfa58ae9ae9d571d0f4140b727'/>
<id>urn:sha1:0a6109fd1b605cbfa58ae9ae9d571d0f4140b727</id>
<content type='text'>
Pull core fixes from Ingo Molnar:
 "A fix to WARN_ON_ONCE() done by modules, plus a MAINTAINERS update"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  debug: Fix WARN_ON_ONCE() for modules
  MAINTAINERS: Update the PTRACE entry
</content>
</entry>
</feed>
