<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/parisc, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-09-13T07:48:41Z</updated>
<entry>
<title>parisc: Fix /proc/cpuinfo output for lscpu</title>
<updated>2023-09-13T07:48:41Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2023-08-18T20:48:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d45037fbc203be72331136c4db8a7f3b83d1fb3'/>
<id>urn:sha1:3d45037fbc203be72331136c4db8a7f3b83d1fb3</id>
<content type='text'>
commit 9f5ba4b3e1b3c123eeca5d2d09161e8720048b5c upstream.

The lscpu command is broken since commit cab56b51ec0e ("parisc: Fix
device names in /proc/iomem") added the PA pathname to all PA
devices, includig the CPUs.

lscpu parses /proc/cpuinfo and now believes it found different CPU
types since every CPU is listed with an unique identifier (PA
pathname).

Fix this problem by simply dropping the PA pathname when listing the
CPUs in /proc/cpuinfo. There is no need to show the pathname in this
procfs file.

Fixes: cab56b51ec0e ("parisc: Fix device names in /proc/iomem")
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v4.9+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parisc: sys_parisc: parisc_personality() is called from asm code</title>
<updated>2023-09-02T07:14:38Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2023-06-30T10:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebc51587d0c52bf2bdc2d8a9c0f33c5ba8d637b7'/>
<id>urn:sha1:ebc51587d0c52bf2bdc2d8a9c0f33c5ba8d637b7</id>
<content type='text'>
commit b5d89408b9fb21258f7c371d6d48a674f60f7181 upstream.

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: Fix CONFIG_TLB_PTLOCK to work with lightweight spinlock checks</title>
<updated>2023-08-23T15:32:52Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2023-08-13T20:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8e7ee1d9c6b8dc509de1f35cd9d1d30564e6f7b'/>
<id>urn:sha1:b8e7ee1d9c6b8dc509de1f35cd9d1d30564e6f7b</id>
<content type='text'>
commit 7a894c87374771f3cfb1b8e5453fbe03f1fb8135 upstream.

For the TLB_PTLOCK checks we used an optimization to store the spc
register into the spinlock to unlock it. This optimization works as
long as the lightweight spinlock checks (CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK)
aren't enabled, because they really check if the lock word is zero or
__ARCH_SPIN_LOCK_UNLOCKED_VAL and abort with a kernel crash
("Spinlock was trashed") otherwise.

Drop that optimization to make it possible to activate both checks
at the same time.

Noticed-by: Sam James &lt;sam@gentoo.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Tested-by: Sam James &lt;sam@gentoo.org&gt;
Cc: stable@vger.kernel.org # v6.4+
Fixes: 15e64ef6520e ("parisc: Add lightweight spinlock checks")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parisc: Fix lightweight spinlock checks to not break futexes</title>
<updated>2023-08-16T16:32:18Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2023-08-09T07:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24555c3794bcb8f3b93f88105972848a4f0888aa'/>
<id>urn:sha1:24555c3794bcb8f3b93f88105972848a4f0888aa</id>
<content type='text'>
commit a0f4b7879f2e14986200747d1b545e5daac8c624 upstream.

The lightweight spinlock checks verify that a spinlock has either value
0 (spinlock locked) and that not any other bits than in
__ARCH_SPIN_LOCK_UNLOCKED_VAL is set.

This breaks the current LWS code, which writes the address of the lock
into the lock word to unlock it, which was an optimization to save one
assembler instruction.

Fix it by making spinlock_types.h accessible for asm code, change the
LWS spinlock-unlocking code to write __ARCH_SPIN_LOCK_UNLOCKED_VAL into
the lock word, and add some missing lightweight spinlock checks to the
LWS path. Finally, make the spinlock checks dependend on DEBUG_KERNEL.

Noticed-by: John David Anglin &lt;dave.anglin@bell.net&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Tested-by: John David Anglin &lt;dave.anglin@bell.net&gt;
Cc: stable@vger.kernel.org # v6.4+
Fixes: 15e64ef6520e ("parisc: Add lightweight spinlock checks")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>io_uring/parisc: Adjust pgoff in io_uring mmap() for parisc</title>
<updated>2023-08-16T16:32:17Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2023-08-07T18:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7dc5a1f279899420d2f98867dc397ec465df5acb'/>
<id>urn:sha1:7dc5a1f279899420d2f98867dc397ec465df5acb</id>
<content type='text'>
commit 56675f8b9f9b15b024b8e3145fa289b004916ab7 upstream.

The changes from commit 32832a407a71 ("io_uring: Fix io_uring mmap() by
using architecture-provided get_unmapped_area()") to the parisc
implementation of get_unmapped_area() broke glibc's locale-gen
executable when running on parisc.

This patch reverts those architecture-specific changes, and instead
adjusts in io_uring_mmu_get_unmapped_area() the pgoff offset which is
then given to parisc's get_unmapped_area() function.  This is much
cleaner than the previous approach, and we still will get a coherent
addresss.

This patch has no effect on other architectures (SHM_COLOUR is only
defined on parisc), and the liburing testcase stil passes on parisc.

Cc: stable@vger.kernel.org # 6.4
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Reported-by: Christoph Biedl &lt;linux-kernel.bfrz@manchmal.in-ulm.de&gt;
Fixes: 32832a407a71 ("io_uring: Fix io_uring mmap() by using architecture-provided get_unmapped_area()")
Fixes: d808459b2e31 ("io_uring: Adjust mapping wrt architecture aliasing requirements")
Link: https://lore.kernel.org/r/ZNEyGV0jyI8kOOfz@p100
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parisc/mm: preallocate fixmap page tables at init</title>
<updated>2023-08-11T10:14:22Z</updated>
<author>
<name>Mike Rapoport (IBM)</name>
</author>
<published>2023-08-03T06:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=434ebb3960b7f4a013f02422b2677b042f58ed52'/>
<id>urn:sha1:434ebb3960b7f4a013f02422b2677b042f58ed52</id>
<content type='text'>
commit c2ff2b736c41cc63bb0aaec85cccfead9fbcfe92 upstream.

Christoph Biedl reported early OOM on recent kernels:

    swapper: page allocation failure: order:0, mode:0x100(__GFP_ZERO),
nodemask=(null)
    CPU: 0 PID: 0 Comm: swapper Not tainted 6.3.0-rc4+ #16
    Hardware name: 9000/785/C3600
    Backtrace:
     [&lt;10408594&gt;] show_stack+0x48/0x5c
     [&lt;10e152d8&gt;] dump_stack_lvl+0x48/0x64
     [&lt;10e15318&gt;] dump_stack+0x24/0x34
     [&lt;105cf7f8&gt;] warn_alloc+0x10c/0x1c8
     [&lt;105d068c&gt;] __alloc_pages+0xbbc/0xcf8
     [&lt;105d0e4c&gt;] __get_free_pages+0x28/0x78
     [&lt;105ad10c&gt;] __pte_alloc_kernel+0x30/0x98
     [&lt;10406934&gt;] set_fixmap+0xec/0xf4
     [&lt;10411ad4&gt;] patch_map.constprop.0+0xa8/0xdc
     [&lt;10411bb0&gt;] __patch_text_multiple+0xa8/0x208
     [&lt;10411d78&gt;] patch_text+0x30/0x48
     [&lt;1041246c&gt;] arch_jump_label_transform+0x90/0xcc
     [&lt;1056f734&gt;] jump_label_update+0xd4/0x184
     [&lt;1056fc9c&gt;] static_key_enable_cpuslocked+0xc0/0x110
     [&lt;1056fd08&gt;] static_key_enable+0x1c/0x2c
     [&lt;1011362c&gt;] init_mem_debugging_and_hardening+0xdc/0xf8
     [&lt;1010141c&gt;] start_kernel+0x5f0/0xa98
     [&lt;10105da8&gt;] start_parisc+0xb8/0xe4

    Mem-Info:
    active_anon:0 inactive_anon:0 isolated_anon:0
     active_file:0 inactive_file:0 isolated_file:0
     unevictable:0 dirty:0 writeback:0
     slab_reclaimable:0 slab_unreclaimable:0
     mapped:0 shmem:0 pagetables:0
     sec_pagetables:0 bounce:0
     kernel_misc_reclaimable:0
     free:0 free_pcp:0 free_cma:0
    Node 0 active_anon:0kB inactive_anon:0kB active_file:0kB
inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB
mapped:0kB dirty:0kB writeback:0kB shmem:0kB
+writeback_tmp:0kB kernel_stack:0kB pagetables:0kB sec_pagetables:0kB
all_unreclaimable? no
    Normal free:0kB boost:0kB min:0kB low:0kB high:0kB
reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB
inactive_file:0kB unevictable:0kB writepending:0kB
+present:1048576kB managed:1039360kB mlocked:0kB bounce:0kB free_pcp:0kB
local_pcp:0kB free_cma:0kB
    lowmem_reserve[]: 0 0
    Normal: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB
0*1024kB 0*2048kB 0*4096kB = 0kB
    0 total pagecache pages
    0 pages in swap cache
    Free swap  = 0kB
    Total swap = 0kB
    262144 pages RAM
    0 pages HighMem/MovableOnly
    2304 pages reserved
    Backtrace:
     [&lt;10411d78&gt;] patch_text+0x30/0x48
     [&lt;1041246c&gt;] arch_jump_label_transform+0x90/0xcc
     [&lt;1056f734&gt;] jump_label_update+0xd4/0x184
     [&lt;1056fc9c&gt;] static_key_enable_cpuslocked+0xc0/0x110
     [&lt;1056fd08&gt;] static_key_enable+0x1c/0x2c
     [&lt;1011362c&gt;] init_mem_debugging_and_hardening+0xdc/0xf8
     [&lt;1010141c&gt;] start_kernel+0x5f0/0xa98
     [&lt;10105da8&gt;] start_parisc+0xb8/0xe4

    Kernel Fault: Code=15 (Data TLB miss fault) at addr 0f7fe3c0
    CPU: 0 PID: 0 Comm: swapper Not tainted 6.3.0-rc4+ #16
    Hardware name: 9000/785/C3600

This happens because patching static key code temporarily maps it via
fixmap and if it happens before page allocator is initialized set_fixmap()
cannot allocate memory using pte_alloc_kernel().

Make sure that fixmap page tables are preallocated early so that
pte_offset_kernel() in set_fixmap() never resorts to pte allocation.

Signed-off-by: Mike Rapoport (IBM) &lt;rppt@kernel.org&gt;
Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Tested-by: Christoph Biedl &lt;linux-kernel.bfrz@manchmal.in-ulm.de&gt;
Tested-by: John David Anglin &lt;dave.anglin@bell.net&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.4+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>init: Remove check_bugs() leftovers</title>
<updated>2023-08-08T18:04:49Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2023-08-01T14:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9a4f2ba337c776b93aa8c7f65fc677f4663e327'/>
<id>urn:sha1:f9a4f2ba337c776b93aa8c7f65fc677f4663e327</id>
<content type='text'>
commit 61235b24b9cb37c13fcad5b9596d59a1afdcec30 upstream

Everything is converted over to arch_cpu_finalize_init(). Remove the
check_bugs() leftovers including the empty stubs in asm-generic, alpha,
parisc, powerpc and xtensa.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Link: https://lore.kernel.org/r/20230613224545.553215951@linutronix.de
Signed-off-by: Daniel Sneddon &lt;daniel.sneddon@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>io_uring: Fix io_uring mmap() by using architecture-provided get_unmapped_area()</title>
<updated>2023-07-27T06:56:31Z</updated>
<author>
<name>Helge Deller</name>
</author>
<published>2023-07-21T15:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=450d9315d28085f72dc1b1075fc46ed8a1426e39'/>
<id>urn:sha1:450d9315d28085f72dc1b1075fc46ed8a1426e39</id>
<content type='text'>
commit 32832a407a7178eec3215fad9b1a3298c14b0d69 upstream.

The io_uring testcase is broken on IA-64 since commit d808459b2e31
("io_uring: Adjust mapping wrt architecture aliasing requirements").

The reason is, that this commit introduced an own architecture
independend get_unmapped_area() search algorithm which finds on IA-64 a
memory region which is outside of the regular memory region used for
shared userspace mappings and which can't be used on that platform
due to aliasing.

To avoid similar problems on IA-64 and other platforms in the future,
it's better to switch back to the architecture-provided
get_unmapped_area() function and adjust the needed input parameters
before the call. Beside fixing the issue, the function now becomes
easier to understand and maintain.

This patch has been successfully tested with the io_uring testcase on
physical x86-64, ppc64le, IA-64 and PA-RISC machines. On PA-RISC the LTP
mmmap testcases did not report any regressions.

Cc: stable@vger.kernel.org # 6.4
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Reported-by: matoro &lt;matoro_mailinglist_kernel@matoro.tk&gt;
Fixes: d808459b2e31 ("io_uring: Adjust mapping wrt architecture aliasing requirements")
Link: https://lore.kernel.org/r/20230721152432.196382-2-deller@gmx.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parisc: fix expand_stack() conversion</title>
<updated>2023-07-01T11:12:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2023-06-30T06:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d98e5325f1f423be19c6124905133951cc17198'/>
<id>urn:sha1:0d98e5325f1f423be19c6124905133951cc17198</id>
<content type='text'>
commit ea3f8272876f2958463992f6736ab690fde7fa9c upstream.

In commit 8d7071af8907 ("mm: always expand the stack with the mmap write
lock held") I tried to deal with the remaining odd page fault handling
cases.  The oddest one is ia64, which has stacks that grow both up and
down.  And because ia64 was _so_ odd, I asked people to verify the end
result.

But a close second oddity is parisc, which is the only one that has a
main stack growing up (our "CONFIG_STACK_GROWSUP" config option).  But
it looked obvious enough that I didn't worry about it.

I should have worried a bit more.  Not because it was particularly
complex, but because I just used the wrong variable name.

The previous vma isn't called "prev", it's called "prev_vma".  Blush.

Fixes: 8d7071af8907 ("mm: always expand the stack with the mmap write lock held")
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mm: always expand the stack with the mmap write lock held</title>
<updated>2023-07-01T11:12:40Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2023-06-24T20:45:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb32951c89030c5f9944ca8aa10301d7eb733b49'/>
<id>urn:sha1:fb32951c89030c5f9944ca8aa10301d7eb733b49</id>
<content type='text'>
commit 8d7071af890768438c14db6172cc8f9f4d04e184 upstream.

This finishes the job of always holding the mmap write lock when
extending the user stack vma, and removes the 'write_locked' argument
from the vm helper functions again.

For some cases, we just avoid expanding the stack at all: drivers and
page pinning really shouldn't be extending any stacks.  Let's see if any
strange users really wanted that.

It's worth noting that architectures that weren't converted to the new
lock_mm_and_find_vma() helper function are left using the legacy
"expand_stack()" function, but it has been changed to drop the mmap_lock
and take it for writing while expanding the vma.  This makes it fairly
straightforward to convert the remaining architectures.

As a result of dropping and re-taking the lock, the calling conventions
for this function have also changed, since the old vma may no longer be
valid.  So it will now return the new vma if successful, and NULL - and
the lock dropped - if the area could not be extended.

Tested-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Tested-by: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt; # ia64
Tested-by: Frank Scheiner &lt;frank.scheiner@web.de&gt; # ia64
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
