<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/arch/alpha/kernel, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/arch/alpha/kernel?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/arch/alpha/kernel?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-10-26T03:52:28Z</updated>
<entry>
<title>Merge tag 'perf-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-10-26T03:52:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-26T03:52:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=dc7be96c1cac85cc172b90a47f80e23d847c9203'/>
<id>urn:sha1:dc7be96c1cac85cc172b90a47f80e23d847c9203</id>
<content type='text'>
Pull perf events fixes from Ingo Molnar:

 - Fix Alpha build failure caused by a semantic conflict
   between perf and arch-alpha changes (Thomas Weißschuh)

 - Fix UAF in attach_task_ctx_data() (Lee Jia Jie)

 - Fix perf_remove_from_context() event scheduling (Peter Zijlstra)

* tag 'perf-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix perf_remove_from_context() event scheduling
  perf: Fix UAF in attach_task_ctx_data()
  alpha: add simd_enabled argument to perf_reg_validate()
</content>
</entry>
<entry>
<title>Merge __{get,put}_user() removal branch</title>
<updated>2026-10-21T17:19:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-21T17:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=22a78a25438d246e4e951960523bee6a5155897d'/>
<id>urn:sha1:22a78a25438d246e4e951960523bee6a5155897d</id>
<content type='text'>
This is long over-due: the __get_user() and __put_user() functions are
entirely historical, and are never the rigth thing to use any more.  And
when mis-used (read: every case) they are not only slower than the right
thing, but also insecure because they don't check the user address
range.

Most of the usage sites have been converted long ago, but various
left-overs remained.  So this started out as a single patch that I wrote
as a "show people how to convert __{get,put}_user() to modern code".

In particular, Thomas last year implemented the very nice new scoped
user access region helpers (see commit e497310b4ffb: "uaccess: Provide
scoped user access regions") that makes the modern interfaces
particularly easy to use and really removes any excuse for the old
horrors.

That small example patch then grew to this, partly using Claude as a
glorified coccinelle script to apply the pattern to other places.

There were a few different reasons for using __put_user() and
__get_user() rather than the alternatives, but the original historical
one was performance: when doing multiple accesses off the same base
pointer, doing a single range check followed by multiple non-checked
accesses used to create smaller and faster code.

The keyword here is "used to".  It hasn't been true for years, because
the range check isn't actually the real cost these days.  The real cost
of user accesses on modern hardware is turning the user accesses on and
off in the first place (on x86, using the STAC/CLAC instructions).

Those sequences get turned into 'scoped_user_read_access() { }' blocks,
see for example that first patch in the series: "signal: use scoped user
access for old-style sigaction".

Another, historical reason for using __get_user() and friends is that
you actually want to do a kernel pointer access, but the pointer might
not be entirely reliable (typically during fault handling), so you want
to have exception handling for the kernel access.

The modern way to do that kind of non-faulting kernel access is using
"get_kernel_nofault()", but some code predates that helper existing at
all, and used __get_user() as a way to just get a memory access with
exception handling.  For that pattern, see for example "alpha: use
get_kernel_nofault() in dik_show_code()"

A third bad reason for using __get_user() and friends was that the
proper get_user() had a "might_fault()" in it, and code that ran in
atomic regions but hadn't disabled page faults would result in a
warning.  That kind of code needs to explicitly disable page faults,
because "atomic region" is not well defined at run-time and can be
invisible (eg a preempt-off region in a non-preemptible kernel).

See "vdpa_sim: disable page faults around vringh_need_notify_iotlb()"
for an example of that pattern, where the local_bh_disable() now also
grows a pagefault_disable(), which makes the normal get_user() no longer
warn about the user access in non-process context, because it can see
that the potential page fault will not cause problems.

And finally, the really nasty reason to use __get_user() and friends:
pointers that can be either kernel pointers or user pointers.  We've
gotten rid of almost all such cases, but a couple remained.  See for
example "x86/sev: Use explicit user-or-kernel accessors for #VC memory
operands".

NOTE! This series removes all __get/put_user() calls from generic code
but only does the final removal of the whole interface on x86.  Other
architectures have not been entirely converted, for a variety of reasons:

 - arm64 makes __{get,put}_user() be exactly the same as
   {get,put}_user() so it's harmless and didn't have the dangers of the
   legacy use cases.

 - any architecture that uses &lt;asm-generic/uaccess.h&gt; will still use
   __{get,put}_user as the underlying helper function name

 - several architectures had some legacy uses that weren't entirely
   trivial and I didn't want to extend this patch series to things that
   I don't know and that don't really matter.

but I did do a couple of the obvious "follows the exact same pattern"
just because it could be done mindlessly and automatically.

Let's see if I broke anything, but we should have done this years ago.

* uaccess-cleanups: (48 commits)
  drm/i915/gem: ignore errors on presumed_offset write-back
  powerpc/align: use get_user_instr() for a user-mode instruction
  powerpc/signal64: use scoped user access in setup_trampoline()
  powerpc/signal64: use get_user() for the single context reads
  powerpc/signal32: use get_user() for the single context reads
  KVM: PPC: Book3S HV: use get_user()/put_user() for the HPT fd
  powerpc/powernv: use get_user()/put_user() in the LPC debugfs files
  s390: use get_user()/put_user() instead of the unchecked variants
  ARM: OABI: use scoped user access in epoll_put_uevent()
  ARM: signal: stop using __put_user() for the signal frame
  ARM: signal: check the FDPIC function descriptor address
  alpha: split the prefetch check in do_page_fault() by mode
  openrisc: use get_kernel_nofault() in show_registers()
  alpha: use get_kernel_nofault() in dik_show_code()
  nios2: use scoped user access for the signal frame
  nios2: check the signal frame address before writing to it
  hexagon: use scoped user access for the signal frame
  alpha: use scoped user access when setting up signal frames
  alpha: use scoped user access in the sigreturn path
  alpha: use scoped user access in osf_sigaction()
  ...
</content>
</entry>
<entry>
<title>alpha: add simd_enabled argument to perf_reg_validate()</title>
<updated>2026-10-21T15:42:37Z</updated>
<author>
<name>Thomas Weißschuh</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-10-21T08:18:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=2b774b5bbffabae7ac6be98a98e9641fb3c0bbb4'/>
<id>urn:sha1:2b774b5bbffabae7ac6be98a98e9641fb3c0bbb4</id>
<content type='text'>
Align the alpha function with the generic function signature.
The alpha function was added in commit 9280e99d87dd ("alpha: add
HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support") while the
generic function signature was changed in commit a2c64c74c029 ("perf:
Enhance perf_reg_validate() with simd_enabled argument").

After both commits landed in Linus' tree the signatures now differ,
resulting in a build error:

arch/alpha/kernel/perf_regs.c:46:5: error: conflicting types for 'perf_reg_validate'; have 'int(u64)' {aka 'int(long long unsigned int)'}
   46 | int perf_reg_validate(u64 mask)
      |     ^~~~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:50,
                 from arch/alpha/kernel/perf_regs.c:4:
include/linux/perf_regs.h:13:5: note: previous declaration of 'perf_reg_validate' with type 'int(u64,  bool)' {aka 'int(long long unsigned int,  _Bool)'}
   13 | int perf_reg_validate(u64 mask, bool simd_enabled);
      |     ^~~~~~~~~~~~~~~~~

Add the missing argument.

Fixes: 742f62b63904 ("Merge tag 'alpha-for-v7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/lindholm/alpha")
Signed-off-by: Thomas Weißschuh &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
Tested-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
Link: https://patch.msgid.link/20261021-alpha-perf_reg_validate-v1-1-a8e8cc23ea7a@linutronix.de
</content>
</entry>
<entry>
<title>alpha: use get_kernel_nofault() in dik_show_code()</title>
<updated>2026-10-20T19:26:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-20T19:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=8eb93b8a67181827611d2a242de5983a04f2bc8c'/>
<id>urn:sha1:8eb93b8a67181827611d2a242de5983a04f2bc8c</id>
<content type='text'>
dik_show_code() dumps the instructions around the PC when the kernel
dies.  Both callers, die_if_kernel() and the kernel unaligned-access
handler, only get there for a kernel-mode PC: die_if_kernel() returns
early for user mode, and user-mode unaligned traps go to
do_entUnaUser() instead.

It reads that kernel text with __get_user() through a cast to a user
pointer.  That works only because alpha's __get_user() does no address
check, and it predates get_kernel_nofault(), which is the interface for
exactly this: a kernel address that may not be mapped, read with page
faults disabled.

This is part of getting rid of __get_user() and __put_user() entirely.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alpha: use scoped user access when setting up signal frames</title>
<updated>2026-10-20T18:34:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-20T18:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=872df694064f45c90cb3903034b78a4c9957ca7c'/>
<id>urn:sha1:872df694064f45c90cb3903034b78a4c9957ca7c</id>
<content type='text'>
setup_sigcontext() writes the whole register set with __put_user() and
__copy_to_user(), OR-ing the errors together, relying on its callers'
access_ok() on the frame.  setup_frame() and setup_rt_frame() write the
sigreturn trampoline, and setup_rt_frame() the ucontext header, the
same way.

Do those writes inside scoped_user_write_access() with
unsafe_put_user() and unsafe_copy_to_user().  on_sig_stack() is
evaluated before the scope, and the instruction cache flush stays
outside it.  The up-front access_ok()
calls stay: setup_rt_frame() still needs its own for the
__copy_to_user() of the signal mask.

A fault part way through now stops at the first failing write instead of
carrying on.  Either way the frame setup fails and the task gets
SIGSEGV.  alpha has no user_access_begin(), so the accesses themselves
are the same as before.

This is part of getting rid of __get_user() and __put_user() entirely.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alpha: use scoped user access in the sigreturn path</title>
<updated>2026-10-20T18:27:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-20T18:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=9622c1bc291f3119f52d6781e4c8509e74ed3098'/>
<id>urn:sha1:9622c1bc291f3119f52d6781e4c8509e74ed3098</id>
<content type='text'>
restore_sigcontext() reads the whole saved register set with
__get_user() and __copy_from_user(), OR-ing the errors together.  It
relies on its callers having done access_ok(): do_sigreturn() on the
sigcontext, do_rt_sigreturn() on the enclosing ucontext.

Make it do its own check, with a scoped_user_read_access() around
unsafe_get_user() and unsafe_copy_from_user().  do_sigreturn() then only
needs the same for the signal mask.  do_rt_sigreturn() keeps its
access_ok(), which its own __copy_from_user() of the mask still needs.

A fault part way through the frame now stops the restore there, instead
of carrying on with zeroes and still writing the user stack pointer.
Either way the sigreturn fails and the task gets SIGSEGV.  alpha has no
user_access_begin(), so the accesses themselves are the same as before.

This is part of getting rid of __get_user() and __put_user() entirely.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alpha: use scoped user access in osf_sigaction()</title>
<updated>2026-10-20T18:26:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-20T18:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ef9a9b616a6f2145fa85d5cb4e58441091391b26'/>
<id>urn:sha1:ef9a9b616a6f2145fa85d5cb4e58441091391b26</id>
<content type='text'>
osf_sigaction() does one access_ok() on each user structure and then
reads or writes its fields with __get_user() or __put_user(), the same
pattern as the generic old-style sigaction().

Convert it the same way, to scoped_user_{read,write}_access() with
unsafe_{get,put}_user().  alpha has no user_access_begin(), so the
scope is the same access_ok() followed by the same plain accesses, and
the generated code does not change.

This is part of getting rid of __get_user() and __put_user() entirely.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>alpha: add bounded Clipper console-log scanning</title>
<updated>2026-10-18T18:43:29Z</updated>
<author>
<name>Magnus Lindholm</name>
<email>linmag7@gmail.com</email>
</author>
<published>2026-10-14T05:45:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=71cf9644bcb35e686c3e12a703325335a0925946'/>
<id>urn:sha1:71cf9644bcb35e686c3e12a703325335a0925946</id>
<content type='text'>
Clipper console logs have an HWRPB byte count. Bound wrapper and child
traversal by that count before decoding embedded processor and system
logout frames. Print the wrapper name and event/halt timestamp, halt
code, and recorded CPU ID for processor packets.

Acknowledge the log only after a complete termination packet. Retain the
firmware pointer on unknown or incomplete wrappers and print at most
1 KiB of raw bytes using print_hex_dump(). This avoids the generic
scanner's unconditional acknowledgment after a parsing failure.

The ES40 record observed during testing is class 5, type 4. Its wrapper
layout is unknown and remains raw and unacknowledged; it may therefore
be printed again at each boot. Successful decoding of a nonempty hardware
log remains unverified. Keep console scanning independent of the live
machine-check and environmental handlers and restrict it to Clipper.

Console environmental payloads also remain raw: ES40 Service Guide
Table D-18's sys_offset conflicts with its field offsets. No register
layout is assumed for unverified extended subpacket types 6 and 7.

The scanner invokes the payload decoder directly during PCI init; no
generic subpacket-handler registration is needed. Mark its helpers
__init and retain the PCI init hook in sys_dp264.c.

Signed-off-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
Reviewed-by: Matt Turner &lt;mattst88@gmail.com&gt;
Signed-off-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
</content>
</entry>
<entry>
<title>alpha: decode Clipper environmental events</title>
<updated>2026-10-18T18:43:28Z</updated>
<author>
<name>Magnus Lindholm</name>
<email>linmag7@gmail.com</email>
</author>
<published>2026-10-14T05:45:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=73b8c00851e27ac3497d50d4ecc59892b0cc5577'/>
<id>urn:sha1:73b8c00851e27ac3497d50d4ecc59892b0cc5577</id>
<content type='text'>
Restrict ES40 live environmental decoding to Clipper. Validate frame bounds
and string-table masks, and separate fault bits from status context.
Report valid notifications even when no recognized fault bits are set,
so door-closed and supply-return notifications remain visible. A single
status snapshot does not establish a recovery transition.

Keep SMIR bit 0 and inverted halt/reset bits as raw context. During the
ES40 PSU cable test, bit 0 remained set after the individual PSU failure
indication cleared. Its polarity/latching is unverified, so do not call
it a current PSU failure. Use mask 0x14 for the remaining SMIR faults.
Decode only QW1 through QW7 as live environmental status, as documented
in the ES40 Service Guide, Tables D-20 and D-21.

Use plain door-status messages. Preserve unknown or truncated frames
in bounded raw dumps. Firmware console-log scanning is independent of
the live environmental handler.

Signed-off-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
Reviewed-by: Matt Turner &lt;mattst88@gmail.com&gt;
Signed-off-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
</content>
</entry>
<entry>
<title>alpha: decode and acknowledge Tsunami system machine checks</title>
<updated>2026-10-18T18:43:28Z</updated>
<author>
<name>Magnus Lindholm</name>
<email>linmag7@gmail.com</email>
</author>
<published>2026-10-08T23:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ea2b073b4f31f334354479b993160788610c779d'/>
<id>urn:sha1:ea2b073b4f31f334354479b993160788610c779d</id>
<content type='text'>
Decode PCI and ECC transactions separately, honor invalid transaction
information, and select Pchip errors using the logout summary. Report
master aborts without importing Titan-specific dismissal policy.
Delegate processor vectors to the bounded EV6 decoder.

On system vectors 660/620, capture live PERROR and MISC before
acknowledging their defined W1C bits and report live status absent from
the saved frame. Leave live chipset registers alone on CPU and
environmental vectors: HRM 10.2.5.6 warns that PERROR can have INV set
before the error reaches DRIR. Consuming that state from a CPU vector
could lose the transaction and its pending system-error notification.

Leave PERRMASK as configured by firmware. HRM 10.2.5.7 says a cleared
mask bit prevents the corresponding PERROR bit from being set, including
by PERRSET. Table 10-43 gives a reset value of zero, so this reporting
depends on firmware enabling the errors; changing masks does not
establish that previously latched state is cleared. Table 10-42 marks
PERROR bit 9 reserved (MBZ/RAZ); remove the obsolete RTO definition and
reserve its bitfield.

Use the system vector and frame bounds without restricting the reason
code to the ES40 values. Preserve invalid frames and unknown environmental
layouts in bounded raw dumps. Print CPU registers for uncorrectable system
errors, including the PC needed to diagnose NXM. Gate correctable system
register dumps on CONFIG_VERBOSE_MCHECK and alpha_verbose_mcheck while
retaining their error decode.

Keep transaction information unavailable whenever SERR is set, as
required by HRM 8.8.2.6. Table 10-42 selects ECC fields for CRE/UECC.
The first error freezes PERROR and only LOST can be set afterwards, so
mixed error bits were detected together.

The expected-probe path has no active Tsunami writer. Reporting and
acknowledgment do not establish recovery; panic policy remains separate.

Signed-off-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
Reviewed-by: Matt Turner &lt;mattst88@gmail.com&gt;
Signed-off-by: Magnus Lindholm &lt;linmag7@gmail.com&gt;
</content>
</entry>
</feed>
