<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/arch/microblaze, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-04T18:38:02+00:00</updated>
<entry>
<title>Merge branch 'headers' of git://git.infradead.org/users/willy/pagecache.git</title>
<updated>2026-09-04T18:38:02+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T18:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=54497287dc007fdd0596c9f98d5030172fc03dc4'/>
<id>urn:sha1:54497287dc007fdd0596c9f98d5030172fc03dc4</id>
<content type='text'>
# Conflicts:
#	net/ceph/osd_client.c
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze.git</title>
<updated>2026-09-04T17:15:13+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T17:15:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f7bc420e79387b18d8d1c09b57440ffd4417c551'/>
<id>urn:sha1:f7bc420e79387b18d8d1c09b57440ffd4417c551</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'mm-nonmm-unstable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2026-09-04T17:00:16+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T17:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ea78556f8b3a5794315d559598d2c049f16da57c'/>
<id>urn:sha1:ea78556f8b3a5794315d559598d2c049f16da57c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>init, arch: make CONFIG_COMMAND_LINE_SIZE globally configurable</title>
<updated>2026-09-04T00:39:49+00:00</updated>
<author>
<name>Wilson Felipe Pereira</name>
<email>wfelipe@google.com</email>
</author>
<published>2026-08-18T23:16:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bc6c710eadd83e6153cc1af3f4341773fbc1b174'/>
<id>urn:sha1:bc6c710eadd83e6153cc1af3f4341773fbc1b174</id>
<content type='text'>
Currently, s390 has the ability to configure the maximum kernel command
line size via Kconfig (CONFIG_COMMAND_LINE_SIZE).  Other architectures
define a hardcoded COMMAND_LINE_SIZE macro in their setup.h headers.

In some use cases, such as netboot kernels, rootfs configurations, or
larger initramfs setups, a larger command line size is required.  While
for embedded workloads, it can be reduced to save memory.

Move CONFIG_COMMAND_LINE_SIZE out of arch/s390/Kconfig and into
init/Kconfig under General setup, and update every architecture's setup.h
header to define COMMAND_LINE_SIZE as CONFIG_COMMAND_LINE_SIZE.

For user-space API (uapi) headers, wrap the definition in an `#ifdef
__KERNEL__` guard and retain the historical hardcoded default in the
`#else` block.  When user-space headers are installed via `make
headers_install`, unifdef strips out the kernel section, ensuring the same
value as before for user-space applications including `&lt;asm/setup.h&gt;`.

For S390, the range is kept the same, but other architectures have varying
constraints.  S390 requires a minimum of 896 bytes to protect legacy
bootloaders from overwriting the .text section.  ARM, M68K, and NIOS2
allocate the command line directly on severely constrained decompressor
stacks, so their ranges are strictly capped at 2048 bytes to prevent
deterministic stack exhaustion and boot panics.  PowerPC (PPC) boot
wrappers silently truncate arguments past 2048 bytes, so it is also capped
at 2048 to prevent silent parameter loss.

The SuperH (SUPERH) boot parameter page allocates exactly PAGE_SIZE
(typically 4096 bytes), and placing a 4096-byte command line starting at
offset 256 would cause strscpy() to read out of bounds; it is capped at
3840 bytes.  Alpha physically limits its boot parameter block to 256
bytes, so its limit is strictly locked to 256.  All other architectures
are capped at 4096 bytes to prevent unreasonable allocations.

Link: https://lore.kernel.org/20260818231646.804507-2-wfelipe@google.com
Signed-off-by: Maciej Żenczykowski &lt;maze@google.com&gt;
Signed-off-by: Wilson Felipe Pereira &lt;wfelipe@google.com&gt;
Cc: Albert Ou &lt;aou@eecs.berkeley.edu&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Alexandre Ghiti &lt;alex@ghiti.fr&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: drop pxd_ERROR()</title>
<updated>2026-09-04T00:38:53+00:00</updated>
<author>
<name>Anshuman Khandual</name>
<email>anshuman.khandual@arm.com</email>
</author>
<published>2026-08-31T05:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c14297ae2d88407e990e4097909a6d0a1dfc636f'/>
<id>urn:sha1:c14297ae2d88407e990e4097909a6d0a1dfc636f</id>
<content type='text'>
There are no more users left for any pxd_ERROR() either in generic MM or
in the platform MM.  Hence all these platform macros along with their
generic fallback could be dropped across the tree.

Link: https://lore.kernel.org/20260831054331.625505-9-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual &lt;anshuman.khandual@arm.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt; # m68k
Acked-by: David Hildenbrand (Arm) &lt;david@kernel.org&gt;
Acked-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: Huacai Chen &lt;chenhuacai@kernel.org&gt;
Cc: James Bottomley &lt;james.bottomley@HansenPartnership.com&gt;
Cc: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Cc: Lorenzo Stoakes &lt;ljs@kernel.org&gt;
Cc: Rich Felker &lt;dalias@libc.org&gt;
Cc: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Cc: WANG Xuerui &lt;kernel@xen0n.name&gt;
Cc: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>microblaze: prevent ptrace writes to MSR and pt_mode</title>
<updated>2026-09-01T13:11:09+00:00</updated>
<author>
<name>Jérémy Jean</name>
<email>Jeremy.Jean@oss.cyber.gouv.fr</email>
</author>
<published>2026-08-21T10:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8518fd17ccef4a7d77877ccb0403b722106ad1a4'/>
<id>urn:sha1:8518fd17ccef4a7d77877ccb0403b722106ad1a4</id>
<content type='text'>
arch_ptrace() accepts PTRACE_POKEUSR for every aligned offset below
PT_SIZE. This includes the saved machine status register and pt_mode,
which are kernel-owned execution state rather than general registers.

On return from an exception, rtbd copies MSR_UMS to the live MSR_UM bit.
An unprivileged same-UID tracer can therefore clear MSR_UMS in its
tracee's saved register frame and make the tracee resume in supervisor
mode. pt_mode also controls whether later entry paths classify the frame
as kernel or user state.

Reject PTRACE_POKEUSR writes to both fields while retaining read access.

Fixes: 2b4384542691 ("microblaze_v8: ptrace support")
Assisted-by: Codex:gpt-5
Signed-off-by: Jérémy Jean &lt;Jeremy.Jean@oss.cyber.gouv.fr&gt;
Link: https://patch.msgid.link/20260821103026.3627292-2-Jeremy.Jean@oss.cyber.gouv.fr
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>microblaze: CCF: fix refcount leak</title>
<updated>2026-09-01T12:19:52+00:00</updated>
<author>
<name>Alexander A. Klimov</name>
<email>grandmaster@al2klimov.de</email>
</author>
<published>2026-05-26T18:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=aeedf85beac51c7cd8f7bf4c918a0104dfdb8b78'/>
<id>urn:sha1:aeedf85beac51c7cd8f7bf4c918a0104dfdb8b78</id>
<content type='text'>
Every value returned from of_clk_get() is supposed to be cleaned up
via clk_put() once not needed anymore.

Fixes: c1120542b99a ("microblaze: Add support for CCF")
Signed-off-by: Alexander A. Klimov &lt;grandmaster@al2klimov.de&gt;
Link: https://patch.msgid.link/20260526184105.18962-4-grandmaster@al2klimov.de
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>microblaze: preserve the MSR carry flags across signals</title>
<updated>2026-09-01T11:50:37+00:00</updated>
<author>
<name>Sam Price</name>
<email>thesamprice@gmail.com</email>
</author>
<published>2026-08-21T15:18:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae'/>
<id>urn:sha1:ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae</id>
<content type='text'>
setup_sigcontext() and restore_sigcontext() copy r0-r31, pc, ear, esr and
fsr to and from the signal frame but never touch MSR.  The interrupted
MSR is therefore dropped from the signal context entirely: the handler's
ucontext does not expose it, a handler cannot adjust the resumed
arithmetic flags through uc_mcontext.regs.msr, and -- because
restore_sigcontext() leaves regs-&gt;msr as whatever the rt_sigreturn trap
left in it -- the interrupted context resumes with the carry produced by
the syscall entry path (_user_exception does "addi r14, r14, 4", which
writes carry), not with its own.

Other architectures round-trip the user-visible flags through the signal
frame (arm's cpsr, csky's carry, x86's eflags), so a handler can both read
and adjust the resumed flags; purely privileged status registers such as
riscv's sstatus are left out.  MicroBlaze should do the same for the
user-writable bits.

Concretely, MSR[C] (carry) is lost across signal delivery.  Code that
keeps a live carry across a point where a signal can be delivered -- for
example an lwx/swx compare-and-swap retry loop, between the swx and the
carry test -- resumes with the handler's carry and mis-evaluates the
result; the same failure class as the rt_sigreturn r3/r4 clobber, reached
through a different register.  Demonstrated under qemu-system-microblazeel
(machine petalogix-s3adsp1800): a handler that sets MSR_C in
uc_mcontext.regs.msr has no effect before this change (0 of 132 in-window
signals propagated) and takes effect after (130 of 132).

Save MSR in setup_sigcontext() so the handler's ucontext exposes it.  The
signal frame is user-writable, so restore_sigcontext() must not restore it
verbatim: MicroBlaze packs the user-writable carry (MSR_C, MSR_CC) and the
privileged control bits (MSR_UM, MSR_VM, MSR_IE, MSR_EE, ...) into the one
register, and a verbatim restore would let userspace alter privileged
return state -- rtbd derives the resumed mode from MSR_UMS/MSR_VMS.
Restore only MSR_C | MSR_CC from the frame and keep the rest from the
current regs-&gt;msr.  This mirrors x86's
restore_sigcontext(), which masks the restored EFLAGS to FIX_EFLAGS for
the same reason; arches whose status register is purely privileged (e.g.
riscv sstatus) simply do not restore it at all.

Comment on the exposed MSR reworded: it is not read-only,
restore_sigcontext() applies MSR_C|MSR_CC from the frame.  Author's
Signed-off-by kept; he agreed to comment and changelog cleanups.

Fixes: 2148daa9c45f ("microblaze_v8: Signal support")
Cc: stable@vger.kernel.org
Signed-off-by: Sam Price &lt;thesamprice@gmail.com&gt;
Signed-off-by: Ramin Moussavi &lt;ramin.moussavi@yacoub.de&gt;
Tested-by: Waldemar Brodkorb &lt;wbx@openadk.org&gt;
Link: https://patch.msgid.link/20260821151809.1233057-6-ramin.moussavi@yacoub.de
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>microblaze: restore the ABI argument home area below pt_regs (PTO)</title>
<updated>2026-09-01T11:50:37+00:00</updated>
<author>
<name>Ramin Moussavi</name>
<email>ramin.moussavi@yacoub.de</email>
</author>
<published>2026-08-21T15:18:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c35d40a3efd2e575ef51a761e983f2bf7113be6c'/>
<id>urn:sha1:c35d40a3efd2e575ef51a761e983f2bf7113be6c</id>
<content type='text'>
The MicroBlaze ABI has the caller reserve stack space for the arguments
it passes in registers: REG_PARM_STACK_SPACE is 24 and
OUTGOING_REG_PARM_STACK_SPACE is 1 in the gcc backend, so a callee may
write to [caller_sp + 4, caller_sp + 28).  The kernel calls C functions
from entry.S with r1 pointing at pt_regs, handing the callee license to
spill its incoming arguments over the saved registers -- the syscall
dispatch is the worst case, where the first argument slot is PT_R1, the
saved user stack pointer.

This was latent until GCC 15: since 3b9b8d6cfdf5 ("ira: Scale
save/restore costs of callee save registers with block frequency") the
allocator prefers spilling incoming arguments over copying them into
callee-saved registers, and a kernel built with gcc &gt;= 15 (without the
TARGET_CALLEE_SAVE_COST workaround some distributions carry) corrupts
PT_R1 on the first syscall: init takes SIGSEGV and the kernel panics.

The kernel had exactly this reservation until 2011:
commit 6e83557c38b4 ("microblaze: Remove r0_ram pointer and PTO alignment")
removed STATE_SAVE_ARG_SPACE and with it the PTO offset, as part of
cleaning up what was thought to be copied-from-v850 leftovers.  Restore
it: the frame is STATE_SAVE_SIZE = PT_SIZE + PTO, r1 stays at the frame
base through every asm-to-C call, and the saved registers are reached
at r1 + PTO + PT_*.  PTO is 28 rather than the historic 24, which was
one word short: FIRST_PARM_OFFSET is 4 and REG_PARM_STACK_SPACE is 24,
so the area spans [sp+4, sp+28) and needs 28 bytes.  With 24 the last
argument slot overlapped pt_regs' r0 -- harmless only because r0 is the
constant-zero register.  STACK_BOUNDARY is 32 bits, so 28 needs no
further rounding.

Two places deliberately keep their mainline addressing.
hw_exception_handler.S needs no offset change: its real-mode handler
saves into the standalone pt_pool_space buffer rather than a stack
frame, and _unaligned_data_exception works through a pointer to pt_regs
in r7, where plain PT_* offsets are already right.  And the user-SP
reload after popping the frame keeps PT_R1 - PT_SIZE because PTO
cancels there: (PTO + PT_R1) - (PT_SIZE + PTO) = PT_R1 - PT_SIZE.  Both
are exactly as the pre-2011 code had them.

The instruction count is unchanged -- the same instructions with
different immediates, no per-call reservation and no trampolines.  The
cost is 28 bytes more kernel stack per saved frame.

Fixes: 6e83557c38b4 ("microblaze: Remove r0_ram pointer and PTO alignment")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5
Signed-off-by: Ramin Moussavi &lt;ramin.moussavi@yacoub.de&gt;
Tested-by: Waldemar Brodkorb &lt;wbx@openadk.org&gt;
Link: https://patch.msgid.link/20260821151809.1233057-5-ramin.moussavi@yacoub.de
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>microblaze: don't clobber r3/r4 restored by rt_sigreturn</title>
<updated>2026-09-01T11:50:37+00:00</updated>
<author>
<name>Ramin Moussavi</name>
<email>ramin.moussavi@yacoub.de</email>
</author>
<published>2026-08-21T15:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=da6829138a39fa3b9ec318ca54ff89af9d94d350'/>
<id>urn:sha1:da6829138a39fa3b9ec318ca54ff89af9d94d350</id>
<content type='text'>
ret_from_trap begins by storing the system call return values r3 and r4
back into the saved user pt_regs.  That is right for an ordinary system
call, but sys_rt_sigreturn() returns through the same path and has to be
transparent: restore_sigcontext() has just filled pt_regs from the signal
frame, and every register must reach userspace exactly as saved.  The two
stores overwrite the restored r3/r4 with whatever the C function left in
those registers.

Only r4 is actually lost, and that follows from how sigreturn is written
everywhere rather than from chance.  Architectures have sys_rt_sigreturn()
return the restored return-value register precisely so that this writeback
stores the restored value -- arm returns regs-&gt;ARM_r0, riscv and csky
regs-&gt;a0, arc regs-&gt;r0 -- and microblaze does the same through
*rval_p = regs-&gt;r3 in restore_sigcontext().  But the entry macros treat r3
and r4 as a pair, so ret_from_trap writes back two registers while a C
function has only one return value; nothing carries the restored r4.

Commit 791d0a169b91 ("microblaze: Fix sys_rt_sigreturn_wrapper") introduced
this in v2.6.37.  The old wrapper saved r3/r4 before the call and reloaded
them from pt_regs afterwards; switching brlid to brid removed the only
point where they were reloaded, and the stores have been overwriting them
ever since.

Fix it the way the sibling paths already behave: ret_from_irq and
ret_from_exc restore the full register set and do not perform these stores
at all.  Label the instruction after the stores ret_from_trap_no_rval and
enter there, biasing r15 by -8 so that the ABI return "rtsd r15, 8" lands
on it; naming the entry rather than computing ret_from_trap + 8 keeps it
correct if the number of stores ever changes.  Restoring the old
save/reload would work too, but costs four memory accesses and a branch to
undo damage that is better not done.

Any value the compiler keeps in r4 across a signal is lost.  The tightest
windows are the lwx/swx compare-and-swap retry loops gcc emits for atomics:
in uClibc-ng's libc.so alone, 50 of 364 such loops hold the address in r4.
This is not specific to one libc -- musl passes the address as "r"(p), and
glibc has no microblaze atomic-machine.h and so uses gcc's __atomic
builtins, which expand the same way.  Triggering it needs threads plus a
signal storm, which is why it survived 15 years.

Reproduced on qemu-system-microblazeel (petalogix-s3adsp1800) by running
the uClibc-ng NPTL test tst-eintr1 40 times against an unchanged userspace:
on v7.2 built with gcc 16.2.0, 23 of 40 iterations died with SIGSEGV
without this patch and 0 of 40 with it; on v7.0 built with gcc 12.5.0 the
same comparison gave 6 of 40 against 0 of 40.  The register dump of a
failing iteration shows the signature: a zero r4 and a fault at address 0,
while r3 came back intact.

Fixes: 791d0a169b91 ("microblaze: Fix sys_rt_sigreturn_wrapper")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5
Signed-off-by: Ramin Moussavi &lt;ramin.moussavi@yacoub.de&gt;
Tested-by: Waldemar Brodkorb &lt;wbx@openadk.org&gt;
Link: https://patch.msgid.link/20260821151809.1233057-4-ramin.moussavi@yacoub.de
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
</feed>
