Re: [PATCH 12/24] alpha: add HAVE_ARCH_THREAD_STRUCT_WHITELIST support

From: Magnus Lindholm

Date: Wed Sep 02 2026 - 05:42:37 EST


Hi Matt,

On Tue, Sep 1, 2026 at 5:51 PM Matt Turner <mattst88@xxxxxxxxx> wrote:
>
> Alpha's thread_struct is empty (all per-thread state lives in
> thread_info), so the whitelist is trivially empty. This is more
> explicit than the generic fallback, which computes the full
> thread_struct size as copyable.
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>


I tested this on an AlphaServer ES40 with
CONFIG_HARDENED_USERCOPY=y.

The task_struct slab reports a zero-sized usercopy region, as expected
for Alpha's empty thread_struct:

$ cat /sys/kernel/slab/task_struct/usersize
0

The usercopy KUnit suite also passed all tests:

# usercopy: pass:4 fail:0 skip:0 total:4
ok 1 usercopy

Tested-by: Magnus Lindholm <linmag7@xxxxxxxxx>
Reviewed-by: Magnus Lindholm <linmag7@xxxxxxxxx>