<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64, 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-11-08T09:17:17Z</updated>
<entry>
<title>arm/arm64: kvm: Disable branch profiling in HYP code</title>
<updated>2017-11-08T09:17:17Z</updated>
<author>
<name>Julien Thierry</name>
</author>
<published>2017-10-20T11:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a598f936b4b748ab1287c5d76ae203153ff5bd6'/>
<id>urn:sha1:7a598f936b4b748ab1287c5d76ae203153ff5bd6</id>
<content type='text'>
commit f9b269f3098121b5d54aaf822e0898c8ed1d3fec upstream.

When HYP code runs into branch profiling code, it attempts to jump to
unmapped memory, causing a HYP Panic.

Disable the branch profiling for code designed to run at HYP mode.

Signed-off-by: Julien Thierry &lt;julien.thierry@arm.com&gt;
Acked-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Signed-off-by: Christoffer Dall &lt;christoffer.dall@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort</title>
<updated>2017-11-08T09:17:17Z</updated>
<author>
<name>Dongjiu Geng</name>
</author>
<published>2017-10-17T14:23:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f82ec727d7f29868c69bb382024f6c6bb31dcbbd'/>
<id>urn:sha1:f82ec727d7f29868c69bb382024f6c6bb31dcbbd</id>
<content type='text'>
commit fd6c8c206fc5d0717b0433b191de0715122f33bb upstream.

When a exception is trapped to EL2, hardware uses  ELR_ELx to hold
the current fault instruction address. If KVM wants to inject a
abort to 32 bit guest, it needs to set the LR register for the
guest to emulate this abort happened in the guest. Because ARM32
architecture is pipelined execution, so the LR value has an offset to
the fault instruction address.

The offsets applied to Link value for exceptions as shown below,
which should be added for the ARM32 link register(LR).

Table taken from ARMv8 ARM DDI0487B-B, table G1-10:
Exception			Offset, for PE state of:
				A32 	  T32
Undefined Instruction 		+4 	  +2
Prefetch Abort 			+4 	  +4
Data Abort 			+8 	  +8
IRQ or FIQ 			+4 	  +4

  [ Removed unused variables in inject_abt to avoid compile warnings.
    -- Christoffer ]

Signed-off-by: Dongjiu Geng &lt;gengdongjiu@huawei.com&gt;
Tested-by: Haibin Zhang &lt;zhanghaibin7@huawei.com&gt;
Reviewed-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Christoffer Dall &lt;cdall@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>arm64: ensure __dump_instr() checks addr_limit</title>
<updated>2017-11-08T09:17:17Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2017-11-02T16:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eafa1e5b1dd5f09fd99aba2a5af00282fad6e089'/>
<id>urn:sha1:eafa1e5b1dd5f09fd99aba2a5af00282fad6e089</id>
<content type='text'>
commit 7a7003b1da010d2b0d1dc8bf21c10f5c73b389f1 upstream.

It's possible for a user to deliberately trigger __dump_instr with a
chosen kernel address.

Let's avoid problems resulting from this by using get_user() rather than
__get_user(), ensuring that we don't erroneously access kernel memory.

Where we use __dump_instr() on kernel text, we already switch to
KERNEL_DS, so this shouldn't adversely affect those cases.

Fixes: 60ffc30d5652810d ("arm64: Exception handling")
Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Mark Rutland &lt;mark.rutland@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>arm64: dts: rockchip: correct vqmmc voltage for rk3399 platforms</title>
<updated>2017-10-27T08:39:15Z</updated>
<author>
<name>Shawn Lin</name>
</author>
<published>2017-10-17T03:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1aacf045279a55f7d2b2ab72e19925e8ca4c596b'/>
<id>urn:sha1:1aacf045279a55f7d2b2ab72e19925e8ca4c596b</id>
<content type='text'>
commit b31ce3041787b61f2dad39d2dcda5c4a81d10e2b upstream.

The vcc_sd or vcc_sdio used for IO voltage for sdmmc and sdio
interface on rk3399 platform have a limitation that it can't be
larger than 3.0v, otherwise it has a potential risk for the chip.
Correct all of them.

Fixes: 171582e00db1 ("arm64: dts: rockchip: add support for firefly-rk3399 board")
Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM")
Fixes: 8164a84cca12 ("arm64: dts: rockchip: Add support for rk3399 sapphire SOM")
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Tested-by: Klaus Goger &lt;klaus.goger@theobroma-systems.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>arm64: Ensure the instruction emulation is ready for userspace</title>
<updated>2017-10-12T09:56:16Z</updated>
<author>
<name>Suzuki K Poulose</name>
</author>
<published>2017-10-06T13:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07f9d7905eaab778e17d23ec1ea3c7f39f6bc152'/>
<id>urn:sha1:07f9d7905eaab778e17d23ec1ea3c7f39f6bc152</id>
<content type='text'>
commit c0d8832e78cbfd4a64b7112e34920af4b0b0e60e upstream.

We trap and emulate some instructions (e.g, mrs, deprecated instructions)
for the userspace. However the handlers for these are registered as
late_initcalls and the userspace could be up and running from the initramfs
by that time (with populate_rootfs, which is a rootfs_initcall()). This
could cause problems for the early applications ending up in failure
like :

[   11.152061] modprobe[93]: undefined instruction: pc=0000ffff8ca48ff4

This patch promotes the specific calls to core_initcalls, which are
guaranteed to be completed before we hit userspace.

Cc: Dave Martin &lt;dave.martin@arm.com&gt;
Cc: Matthias Brugger &lt;mbrugger@suse.com&gt;
Cc: James Morse &lt;james.morse@arm.com&gt;
Reported-by: Matwey V. Kornilov &lt;matwey.kornilov@gmail.com&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@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>arm64: dt marvell: Fix AP806 system controller size</title>
<updated>2017-10-12T09:56:16Z</updated>
<author>
<name>Baruch Siach</name>
</author>
<published>2017-09-15T07:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a075264bbafe43bda0f9ffcacf3f1b2fadae2226'/>
<id>urn:sha1:a075264bbafe43bda0f9ffcacf3f1b2fadae2226</id>
<content type='text'>
commit 9e7460fc325dad06d2066abdbc1f4dd49456f9a4 upstream.

Extend the container size to 0x2000 to include the gpio controller at
offset 0x1040.

While at it, add start address notation to the gpio node name to match
its 'offset' property.

Fixes: 63dac0f4924b ("arm64: dts: marvell: add gpio support for Armada
7K/8K")
Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>arm64: fault: Route pte translation faults via do_translation_fault</title>
<updated>2017-10-05T07:47:32Z</updated>
<author>
<name>Will Deacon</name>
</author>
<published>2017-09-29T11:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b50697878f0d882b06fcf2eefad32b3be8f4b1a8'/>
<id>urn:sha1:b50697878f0d882b06fcf2eefad32b3be8f4b1a8</id>
<content type='text'>
commit 760bfb47c36a07741a089bf6a28e854ffbee7dc9 upstream.

We currently route pte translation faults via do_page_fault, which elides
the address check against TASK_SIZE before invoking the mm fault handling
code. However, this can cause issues with the path walking code in
conjunction with our word-at-a-time implementation because
load_unaligned_zeropad can end up faulting in kernel space if it reads
across a page boundary and runs into a page fault (e.g. by attempting to
read from a guard region).

In the case of such a fault, load_unaligned_zeropad has registered a
fixup to shift the valid data and pad with zeroes, however the abort is
reported as a level 3 translation fault and we dispatch it straight to
do_page_fault, despite it being a kernel address. This results in calling
a sleeping function from atomic context:

  BUG: sleeping function called from invalid context at arch/arm64/mm/fault.c:313
  in_atomic(): 0, irqs_disabled(): 0, pid: 10290
  Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
  [...]
  [&lt;ffffff8e016cd0cc&gt;] ___might_sleep+0x134/0x144
  [&lt;ffffff8e016cd158&gt;] __might_sleep+0x7c/0x8c
  [&lt;ffffff8e016977f0&gt;] do_page_fault+0x140/0x330
  [&lt;ffffff8e01681328&gt;] do_mem_abort+0x54/0xb0
  Exception stack(0xfffffffb20247a70 to 0xfffffffb20247ba0)
  [...]
  [&lt;ffffff8e016844fc&gt;] el1_da+0x18/0x78
  [&lt;ffffff8e017f399c&gt;] path_parentat+0x44/0x88
  [&lt;ffffff8e017f4c9c&gt;] filename_parentat+0x5c/0xd8
  [&lt;ffffff8e017f5044&gt;] filename_create+0x4c/0x128
  [&lt;ffffff8e017f59e4&gt;] SyS_mkdirat+0x50/0xc8
  [&lt;ffffff8e01684e30&gt;] el0_svc_naked+0x24/0x28
  Code: 36380080 d5384100 f9400800 9402566d (d4210000)
  ---[ end trace 2d01889f2bca9b9f ]---

Fix this by dispatching all translation faults to do_translation_faults,
which avoids invoking the page fault logic for faults on kernel addresses.

Reported-by: Ankit Jain &lt;ankijain@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>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>arm64: Make sure SPsel is always set</title>
<updated>2017-10-05T07:47:32Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2017-09-26T14:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adf56f6f9ebb364e13bfbdb365dd3cba0b254fae'/>
<id>urn:sha1:adf56f6f9ebb364e13bfbdb365dd3cba0b254fae</id>
<content type='text'>
commit 5371513fb338fb9989c569dc071326d369d6ade8 upstream.

When the kernel is entered at EL2 on an ARMv8.0 system, we construct
the EL1 pstate and make sure this uses the the EL1 stack pointer
(we perform an exception return to EL1h).

But if the kernel is either entered at EL1 or stays at EL2 (because
we're on a VHE-capable system), we fail to set SPsel, and use whatever
stack selection the higher exception level has choosen for us.

Let's not take any chance, and make sure that SPsel is set to one
before we decide the mode we're going to run in.

Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&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>ARM64: dts: marvell: armada-37xx: Fix GIC maintenance interrupt</title>
<updated>2017-09-13T21:20:54Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2017-07-01T14:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f6eba3f72f008766a42a5fe0719f0c8385e337c'/>
<id>urn:sha1:2f6eba3f72f008766a42a5fe0719f0c8385e337c</id>
<content type='text'>
commit 95696d292e204073433ed2ef3ff4d3d8f42a8248 upstream.

The GIC-500 integrated in the Armada-37xx SoCs is compliant with
the GICv3 architecture, and thus provides a maintenance interrupt
that is required for hypervisors to function correctly.

With the interrupt provided in the DT, KVM now works as it should.
Tested on an Espressobin system.

Fixes: adbc3695d9e4 ("arm64: dts: add the Marvell Armada 3700 family and a development board")
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
