Random nit...
On Fri, 5 Dec 2025 at 09:15, Jens Remus <[email protected]> wrote:
>
> +static inline int unwind_user_word_size(struct pt_regs *regs)
> +{
> + /* We can't unwind VM86 stacks */
> + if (regs->flags & X86_VM_MASK)
> + return 0;
> +#ifdef CONFIG_X86_64
> + if (!user_64bit_mode(regs))
> + return sizeof(int);
> +#endif
> + return sizeof(long);
> +}
I realize you just moved this around, but since I see it in the patch,
the #ifdef annoys me.
That user_64bit_mode() should work equally well on 32-bit, and this
can be written as
return user_64bit_mode(regs) ? 8 : 4;
which avoids the #ifdef, and makes a lot more sense ("sizeof(long)"
together with "user_64bit_mode()"? It's literally testing 32 vs 64
bitness, not "int vs long").
Linus