<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/parisc/mm, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-11-26T10:48:32Z</updated>
<entry>
<title>parisc: fix warning in flush_tlb_all</title>
<updated>2021-11-26T10:48:32Z</updated>
<author>
<name>Sven Schnelle</name>
</author>
<published>2021-10-09T18:24:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f83d6fe533212754ca70b163d993448f1f0ddc4'/>
<id>urn:sha1:8f83d6fe533212754ca70b163d993448f1f0ddc4</id>
<content type='text'>
[ Upstream commit 1030d681319b43869e0d5b568b9d0226652d1a6f ]

I've got the following splat after enabling preemption:

[    3.724721] BUG: using __this_cpu_add() in preemptible [00000000] code: swapper/0/1
[    3.734630] caller is __this_cpu_preempt_check+0x38/0x50
[    3.740635] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.15.0-rc4-64bit+ #324
[    3.744605] Hardware name: 9000/785/C8000
[    3.744605] Backtrace:
[    3.744605]  [&lt;00000000401d9d58&gt;] show_stack+0x74/0xb0
[    3.744605]  [&lt;0000000040c27bd4&gt;] dump_stack_lvl+0x10c/0x188
[    3.744605]  [&lt;0000000040c27c84&gt;] dump_stack+0x34/0x48
[    3.744605]  [&lt;0000000040c33438&gt;] check_preemption_disabled+0x178/0x1b0
[    3.744605]  [&lt;0000000040c334f8&gt;] __this_cpu_preempt_check+0x38/0x50
[    3.744605]  [&lt;00000000401d632c&gt;] flush_tlb_all+0x58/0x2e0
[    3.744605]  [&lt;00000000401075c0&gt;] 0x401075c0
[    3.744605]  [&lt;000000004010b8fc&gt;] 0x4010b8fc
[    3.744605]  [&lt;00000000401080fc&gt;] 0x401080fc
[    3.744605]  [&lt;00000000401d5224&gt;] do_one_initcall+0x128/0x378
[    3.744605]  [&lt;0000000040102de8&gt;] 0x40102de8
[    3.744605]  [&lt;0000000040c33864&gt;] kernel_init+0x60/0x3a8
[    3.744605]  [&lt;00000000401d1020&gt;] ret_from_kernel_thread+0x20/0x28
[    3.744605]

Fix this by moving the __inc_irq_stat() into the locked section.

Signed-off-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>parisc: Fix kernel panic in mem_init()</title>
<updated>2020-06-03T06:16:43Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2020-05-28T20:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce7b3d0533fb28b0cec4a5fc8a8d559c4baf03d3'/>
<id>urn:sha1:ce7b3d0533fb28b0cec4a5fc8a8d559c4baf03d3</id>
<content type='text'>
commit bf71bc16e02162388808949b179d59d0b571b965 upstream.

The Debian kernel v5.6 triggers this kernel panic:

 Kernel panic - not syncing: Bad Address (null pointer deref?)
 Bad Address (null pointer deref?): Code=26 (Data memory access rights trap) at addr 0000000000000000
 CPU: 0 PID: 0 Comm: swapper Not tainted 5.6.0-2-parisc64 #1 Debian 5.6.14-1
  IAOQ[0]: mem_init+0xb0/0x150
  IAOQ[1]: mem_init+0xb4/0x150
  RP(r2): start_kernel+0x6c8/0x1190
 Backtrace:
  [&lt;0000000040101ab4&gt;] start_kernel+0x6c8/0x1190
  [&lt;0000000040108574&gt;] start_parisc+0x158/0x1b8

on a HP-PARISC rp3440 machine with this memory layout:
 Memory Ranges:
  0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
  1) Start 0x0000004040000000 End 0x00000040ffdfffff Size   3070 MB

Fix the crash by avoiding virt_to_page() and similar functions in
mem_init() until the memory zones have been fully set up.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>parisc: Fix vmap memory leak in ioremap()/iounmap()</title>
<updated>2019-10-29T08:15:24Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2019-10-04T17:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=088f75885bb41dd587af216f0b4b070f239dc0bf'/>
<id>urn:sha1:088f75885bb41dd587af216f0b4b070f239dc0bf</id>
<content type='text'>
commit 513f7f747e1cba81f28a436911fba0b485878ebd upstream.

Sven noticed that calling ioremap() and iounmap() multiple times leads
to a vmap memory leak:
	vmap allocation for size 4198400 failed:
	use vmalloc=&lt;size&gt; to increase size

It seems we missed calling vunmap() in iounmap().

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Noticed-by: Sven Schnelle &lt;svens@stackframe.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.16+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>parisc: Fix map_pages() to not overwrite existing pte entries</title>
<updated>2018-11-13T19:16:46Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2018-10-12T20:37:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d35b161d487edd660dfb9759552b1e758a286de8'/>
<id>urn:sha1:d35b161d487edd660dfb9759552b1e758a286de8</id>
<content type='text'>
commit 3c229b3f2dd8133f61bb81d3cb018be92f4bba39 upstream.

Fix a long-existing small nasty bug in the map_pages() implementation which
leads to overwriting already written pte entries with zero, *if* map_pages() is
called a second time with an end address which isn't aligned on a pmd boundry.
This happens for example if we want to remap only the text segment read/write
in order to run alternative patching on the code. Exiting the loop when we
reach the end address fixes this.

Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>parisc: Report SIGSEGV instead of SIGBUS when running out of stack</title>
<updated>2017-07-21T05:42:20Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2017-07-02T20:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=008a1f2707488cf900bb20e29a8676cabeb6d405'/>
<id>urn:sha1:008a1f2707488cf900bb20e29a8676cabeb6d405</id>
<content type='text'>
commit 247462316f85a9e0479445c1a4223950b68ffac1 upstream.

When a process runs out of stack the parisc kernel wrongly faults with SIGBUS
instead of the expected SIGSEGV signal.

This example shows how the kernel faults:
do_page_fault() command='a.out' type=15 address=0xfaac2000 in libc-2.24.so[f8308000+16c000]
trap #15: Data TLB miss fault, vm_start = 0xfa2c2000, vm_end = 0xfaac2000

The vma-&gt;vm_end value is the first address which does not belong to the vma, so
adjust the check to include vma-&gt;vm_end to the range for which to send the
SIGSEGV signal.

This patch unbreaks building the debian libsigsegv package.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>parisc: Clean up fixup routines for get_user()/put_user()</title>
<updated>2017-04-08T07:30:34Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2017-03-25T10:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09b931fcb87c8aad178475a7db1d4bfc939f7faa'/>
<id>urn:sha1:09b931fcb87c8aad178475a7db1d4bfc939f7faa</id>
<content type='text'>
commit d19f5e41b344a057bb2450024a807476f30978d2 upstream.

Al Viro noticed that userspace accesses via get_user()/put_user() can be
simplified a lot with regard to usage of the exception handling.

This patch implements a fixup routine for get_user() and put_user() in such
that the exception handler will automatically load -EFAULT into the register
%r8 (the error value) in case on a fault on userspace.  Additionally the fixup
routine will zero the target register on fault in case of a get_user() call.
The target register is extracted out of the faulting assembly instruction.

This patch brings a few benefits over the old implementation:
1. Exception handling gets much cleaner, easier and smaller in size.
2. Helper functions like fixup_get_user_skip_1 (all of fixup.S) can be dropped.
3. No need to hardcode %r9 as target register for get_user() any longer. This
   helps the compiler register allocator and thus creates less assembler
   statements.
4. No dependency on the exception_data contents any longer.
5. Nested faults will be handled cleanly.

Reported-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>parisc: Add line-break when printing segfault info</title>
<updated>2017-01-12T10:39:06Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2017-01-02T16:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e569eef6298adbcc98ca029cc6763b1d854b1bed'/>
<id>urn:sha1:e569eef6298adbcc98ca029cc6763b1d854b1bed</id>
<content type='text'>
commit b4a9eb4cd5966c8aad3d007d206a2cbda97d6928 upstream.

Add a leading line break else printed line gets too long.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>parisc: Show trap name in kernel crash</title>
<updated>2016-10-11T18:52:47Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2016-10-11T18:49:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a862485f42af7df530b0b5f0e5ba8ffbb3a4a12'/>
<id>urn:sha1:0a862485f42af7df530b0b5f0e5ba8ffbb3a4a12</id>
<content type='text'>
Show the real trap name when the kernel crashes.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: Zero-initialize newly alloced memblock</title>
<updated>2016-10-11T18:52:12Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2016-10-11T18:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3b6a02816ebbda3acfde2f079446ba92c97e70b'/>
<id>urn:sha1:e3b6a02816ebbda3acfde2f079446ba92c97e70b</id>
<content type='text'>
Commit 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock")
switched to the memblock allocator, but missed to zero-initialize the
newly allocated memblocks. This lead to crashes on some machines like
the rp3410.

Fixes: 4fe9e1d957e4 ("parisc: Drop bootmem and switch to memblock")
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>parisc: Migrate exception table users off module.h and onto extable.h</title>
<updated>2016-10-08T14:28:47Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2016-09-19T22:04:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a38671d65dce25d2390338fe9d272de6302334db'/>
<id>urn:sha1:a38671d65dce25d2390338fe9d272de6302334db</id>
<content type='text'>
This file was only including module.h for exception table related
functions.  We've now separated that content out into its own file
"extable.h" so now move over to that and avoid all the extra header
content in module.h that we don't really need to compile this file.

Cc: "James E.J. Bottomley" &lt;jejb@parisc-linux.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
</feed>
