[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2504181337350.18253@angie.orcam.me.uk>
Date: Fri, 18 Apr 2025 13:44:32 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Thorsten Blum <thorsten.blum@...ux.dev>
cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Oleg Nesterov <oleg@...hat.com>, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] MIPS: Fix MAX_REG_OFFSET and remove zero-length struct
member
On Fri, 18 Apr 2025, Thorsten Blum wrote:
> > Though the fix is incorrect for CPU_CAVIUM_OCTEON, because it doesn't
> > allow one to access the second half of the last register, and I find it
> > exceedingly complex anyway. Just:
> >
> > #define MAX_REG_OFFSET \
> > (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
> >
> > will do (as `regs_get_register' operates on `unsigned long' quantities).
>
> Does regs_get_register() even work for CPU_CAVIUM_OCTEON when accessing
> the last two registers because they're both ULL, not UL? (independent of
> my patch)
Or rather two arrays of registers. With 32-bit configurations their
contents have to be retrieved by pieces. I don't know if it's handled by
the caller(s) though as I'm not familiar with this interface.
Maciej
Powered by blists - more mailing lists