Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k
Hi Jean-Michael,
On Thu, 2025-06-05 at 08:50 +0200, Jean-Michel Hautbois wrote:
>
> I had to change three offsets:
> diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
> index e628b859ef21..5b8ef98565c2 100644
> --- a/arch/m68k/kernel/signal.c
> +++ b/arch/m68k/kernel/signal.c
> @@ -618,11 +618,11 @@ static inline void siginfo_build_tests(void)
> BUILD_BUG_ON(offsetof(siginfo_t, si_addr_lsb) != 0x10);
>
> /* _sigfault._addr_bnd */
> - BUILD_BUG_ON(offsetof(siginfo_t, si_lower) != 0x12);
> - BUILD_BUG_ON(offsetof(siginfo_t, si_upper) != 0x16);
> + BUILD_BUG_ON(offsetof(siginfo_t, si_lower) != 0x14);
> + BUILD_BUG_ON(offsetof(siginfo_t, si_upper) != 0x18);
>
> /* _sigfault._addr_pkey */
> - BUILD_BUG_ON(offsetof(siginfo_t, si_pkey) != 0x12);
> + BUILD_BUG_ON(offsetof(siginfo_t, si_pkey) != 0x14);
>
> /* _sigfault._perf */
> BUILD_BUG_ON(offsetof(siginfo_t, si_perf_data) != 0x10);
OK, great. This is valuable information.
> The kernel is booting, so, I suppose it is working :-).
> Now, I can't send a patch fixing the offsets like that, as it depends on
> the BIGGEST_ALIGNMENT value...
Yes, please send a patch. I don't expect it to be accepted immediately, but
it will help us spur a discussion on the necessary changes in the kernel.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: