<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/arch/arm/mm/init.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-01-21T15:32:20+00:00</updated>
<entry>
<title>ARM: 8737/1: mm: dump: add checking for writable and executable</title>
<updated>2018-01-21T15:32:20+00:00</updated>
<author>
<name>Jinbum Park</name>
<email>jinb.park7@gmail.com</email>
</author>
<published>2017-12-12T00:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8e53c151fe7ac52a1c13a6ace0c9e8e0f61260c'/>
<id>urn:sha1:a8e53c151fe7ac52a1c13a6ace0c9e8e0f61260c</id>
<content type='text'>
Page mappings with full RWX permissions are a security risk.
x86, arm64 has an option to walk the page tables
and dump any bad pages.

(1404d6f13e47
("arm64: dump: Add checking for writable and exectuable pages"))
Add a similar implementation for arm.

Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Laura Abbott &lt;labbott@redhat.com&gt;
Reviewed-by: Laura Abbott &lt;labbott@redhat.com&gt;
Signed-off-by: Jinbum Park &lt;jinb.park7@gmail.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm</title>
<updated>2017-11-26T23:03:49+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-11-26T23:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbecb1cfcca55f98cfcb62fa36a32d79975d8816'/>
<id>urn:sha1:bbecb1cfcca55f98cfcb62fa36a32d79975d8816</id>
<content type='text'>
Pull ARM fixes from Russell King:

 - LPAE fixes for kernel-readonly regions

 - Fix for get_user_pages_fast on LPAE systems

 - avoid tying decompressor to a particular platform if DEBUG_LL is
   enabled

 - BUG if we attempt to return to userspace but the to-be-restored PSR
   value keeps us in privileged mode (defeating an issue that ftracetest
   found)

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: BUG if jumping to usermode address in kernel mode
  ARM: 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE
  ARM: 8721/1: mm: dump: check hardware RO bit for LPAE
  ARM: make decompressor debug output user selectable
  ARM: fix get_user_pages_fast
</content>
</entry>
<entry>
<title>ARM: 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE</title>
<updated>2017-11-21T15:10:07+00:00</updated>
<author>
<name>Philip Derrin</name>
<email>philip@cog.systems</email>
</author>
<published>2017-11-13T23:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=400eeffaffc7232c0ae1134fe04e14ae4fb48d8c'/>
<id>urn:sha1:400eeffaffc7232c0ae1134fe04e14ae4fb48d8c</id>
<content type='text'>
Currently, for ARM kernels with CONFIG_ARM_LPAE and
CONFIG_STRICT_KERNEL_RWX enabled, the 2MiB pages mapping the
kernel code and rodata are writable. They are marked read-only in
a software bit (L_PMD_SECT_RDONLY) but the hardware read-only bit
is not set (PMD_SECT_AP2).

For user mappings, the logic that propagates the software bit
to the hardware bit is in set_pmd_at(); but for the kernel,
section_update() writes the PMDs directly, skipping this logic.

The fix is to set PMD_SECT_AP2 for read-only sections in
section_update(), at the same time as L_PMD_SECT_RDONLY.

Fixes: 1e3479225acb ("ARM: 8275/1: mm: fix PMD_SECT_RDONLY undeclared compile error")
Signed-off-by: Philip Derrin &lt;philip@cog.systems&gt;
Reported-by: Neil Dick &lt;neil@cog.systems&gt;
Tested-by: Neil Dick &lt;neil@cog.systems&gt;
Tested-by: Laura Abbott &lt;labbott@redhat.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 8696/1: mm: Remove dead code in mem_init()</title>
<updated>2017-09-28T10:13:04+00:00</updated>
<author>
<name>Vladimir Murzin</name>
<email>vladimir.murzin@arm.com</email>
</author>
<published>2017-09-04T08:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d9ac1625ac1041742c72c3b680198f0304539b2'/>
<id>urn:sha1:0d9ac1625ac1041742c72c3b680198f0304539b2</id>
<content type='text'>
The code in question checks memory constrains to set default policy for
overcommit; however we support page size of 4K only thus condition is
always evaluated to false. Remove that dead code.

Signed-off-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 8672/1: mm: remove tasklist locking from update_sections_early()</title>
<updated>2017-04-26T09:59:36+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@linaro.org</email>
</author>
<published>2017-04-25T20:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11ce4b33aedc65198d7bc9669344ebca5ee36a41'/>
<id>urn:sha1:11ce4b33aedc65198d7bc9669344ebca5ee36a41</id>
<content type='text'>
The below backtrace can be observed on -rt kernel with
CONFIG_DEBUG_MODULE_RONX (4.9 kernel CONFIG_DEBUG_RODATA) option enabled:

 BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:993
 in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0
 1 lock held by migration/0/14:
  #0:  (tasklist_lock){+.+...}, at: [&lt;c01183e8&gt;] update_sections_early+0x24/0xdc
 irq event stamp: 38
 hardirqs last  enabled at (37): [&lt;c08f6f7c&gt;] _raw_spin_unlock_irq+0x24/0x68
 hardirqs last disabled at (38): [&lt;c01fdfe8&gt;] multi_cpu_stop+0xd8/0x138
 softirqs last  enabled at (0): [&lt;c01303ec&gt;] copy_process.part.5+0x238/0x1b64
 softirqs last disabled at (0): [&lt;  (null)&gt;]   (null)
 Preemption disabled at: [&lt;c01fe244&gt;] cpu_stopper_thread+0x80/0x10c
 CPU: 0 PID: 14 Comm: migration/0 Not tainted 4.9.21-rt16-02220-g49e319c #15
 Hardware name: Generic DRA74X (Flattened Device Tree)
 [&lt;c0112014&gt;] (unwind_backtrace) from [&lt;c010d370&gt;] (show_stack+0x10/0x14)
 [&lt;c010d370&gt;] (show_stack) from [&lt;c049beb8&gt;] (dump_stack+0xa8/0xd4)
 [&lt;c049beb8&gt;] (dump_stack) from [&lt;c01631a0&gt;] (___might_sleep+0x1bc/0x2ac)
 [&lt;c01631a0&gt;] (___might_sleep) from [&lt;c08f7244&gt;] (__rt_spin_lock+0x1c/0x30)
 [&lt;c08f7244&gt;] (__rt_spin_lock) from [&lt;c08f77a4&gt;] (rt_read_lock+0x54/0x68)
 [&lt;c08f77a4&gt;] (rt_read_lock) from [&lt;c01183e8&gt;] (update_sections_early+0x24/0xdc)
 [&lt;c01183e8&gt;] (update_sections_early) from [&lt;c01184b0&gt;] (__fix_kernmem_perms+0x10/0x1c)
 [&lt;c01184b0&gt;] (__fix_kernmem_perms) from [&lt;c01fe010&gt;] (multi_cpu_stop+0x100/0x138)
 [&lt;c01fe010&gt;] (multi_cpu_stop) from [&lt;c01fe24c&gt;] (cpu_stopper_thread+0x88/0x10c)
 [&lt;c01fe24c&gt;] (cpu_stopper_thread) from [&lt;c015edc4&gt;] (smpboot_thread_fn+0x174/0x31c)
 [&lt;c015edc4&gt;] (smpboot_thread_fn) from [&lt;c015a988&gt;] (kthread+0xf0/0x108)
 [&lt;c015a988&gt;] (kthread) from [&lt;c0108818&gt;] (ret_from_fork+0x14/0x3c)
 Freeing unused kernel memory: 1024K (c0d00000 - c0e00000)

The stop_machine() is called with cpus = NULL from fix_kernmem_perms() and
mark_rodata_ro() which means only one CPU will execute
update_sections_early() while all other CPUs will spin and wait. Hence,
it's safe to remove tasklist locking from update_sections_early(). As part
of this change also mark functions which are local to this module as
static.

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Acked-by: Laura Abbott &lt;labbott@redhat.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/task.h&gt;</title>
<updated>2017-03-02T07:42:35+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-08T17:51:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=299300258d1bc4e997b7db340a2e06636757fe2e'/>
<id>urn:sha1:299300258d1bc4e997b7db340a2e06636757fe2e</id>
<content type='text'>
We are going to split &lt;linux/sched/task.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder &lt;linux/sched/task.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/signal.h&gt;</title>
<updated>2017-03-02T07:42:29+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-08T17:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f07c0144132e4f59d88055ac8ff3e691a5fa2b8'/>
<id>urn:sha1:3f07c0144132e4f59d88055ac8ff3e691a5fa2b8</id>
<content type='text'>
We are going to split &lt;linux/sched/signal.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder &lt;linux/sched/signal.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm</title>
<updated>2017-02-28T19:50:53+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-02-28T19:50:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4f4cf77b37eaea58ef863a4cbc95dad3880b524'/>
<id>urn:sha1:d4f4cf77b37eaea58ef863a4cbc95dad3880b524</id>
<content type='text'>
Pull ARM updates from Russell King:

 - nommu updates from Afzal Mohammed cleaning up the vectors support

 - allow DMA memory "mapping" for nommu Benjamin Gaignard

 - fixing a correctness issue with R_ARM_PREL31 relocations in the
   module linker

 - add strlen() prototype for the decompressor

 - support for DEBUG_VIRTUAL from Florian Fainelli

 - adjusting memory bounds after memory reservations have been
   registered

 - unipher cache handling updates from Masahiro Yamada

 - initrd and Thumb Kconfig cleanups

* 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (23 commits)
  ARM: mm: round the initrd reservation to page boundaries
  ARM: mm: clean up initrd initialisation
  ARM: mm: move initrd init code out of arm_memblock_init()
  ARM: 8655/1: improve NOMMU definition of pgprot_*()
  ARM: 8654/1: decompressor: add strlen prototype
  ARM: 8652/1: cache-uniphier: clean up active way setup code
  ARM: 8651/1: cache-uniphier: include &lt;linux/errno.h&gt; instead of &lt;linux/types.h&gt;
  ARM: 8650/1: module: handle negative R_ARM_PREL31 addends correctly
  ARM: 8649/2: nommu: remove Hivecs configuration is asm
  ARM: 8648/2: nommu: display vectors base
  ARM: 8647/2: nommu: dynamic exception base address setting
  ARM: 8646/1: mmu: decouple VECTORS_BASE from Kconfig
  ARM: 8644/1: Reduce "CPU: shutdown" message to debug level
  ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol
  ARM: 8640/1: Add support for CONFIG_DEBUG_VIRTUAL
  ARM: 8639/1: Define KERNEL_START and KERNEL_END
  ARM: 8638/1: mtd: lart: Rename partition defines to be prefixed with PART_
  ARM: 8637/1: Adjust memory boundaries after reservations
  ARM: 8636/1: Cleanup sanity_check_meminfo
  ARM: add CPU_THUMB_CAPABLE to indicate possible Thumb support
  ...
</content>
</entry>
<entry>
<title>ARM: mm: round the initrd reservation to page boundaries</title>
<updated>2017-02-28T11:06:22+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2017-01-16T15:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdcc5fa0415d943288c6316bd32e76befb1027c5'/>
<id>urn:sha1:cdcc5fa0415d943288c6316bd32e76befb1027c5</id>
<content type='text'>
Round the initrd memblock reservation to page boundaries to prevent
other data sharing the initrd pages.  This prevents an allocation
possibly overlapping with the initrd, which would later get trampled
on in free_initrd_mem().

Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: mm: clean up initrd initialisation</title>
<updated>2017-02-28T11:06:21+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2017-01-16T15:13:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68b32f361f3892fc376051b1702954b2dc692d13'/>
<id>urn:sha1:68b32f361f3892fc376051b1702954b2dc692d13</id>
<content type='text'>
Rather than repeatedly testing phys_initrd_size to see if the initrd
is still enabled, return from the new function to avoid executing the
remaining initialisation.

Signed-off-by: Russell King &lt;rmk+kernel@armlinux.org.uk&gt;
</content>
</entry>
</feed>
