linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>,
	port-m68k <port-m68k@netbsd.org>,
	 debian-68k <debian-68k@lists.debian.org>,
	linux-m68k <linux-m68k@vger.kernel.org>
Subject: Re: Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k
Date: Thu, 5 Jun 2025 09:16:32 +0200	[thread overview]
Message-ID: <CAMuHMdXNF5OCjdK7+AHWTCqSEDa-n-dYdESVVSP5Jn9UqA6feA@mail.gmail.com> (raw)
In-Reply-To: <95e56d983ace4976143c7e1180ffe5606c0ee3fe.camel@physik.fu-berlin.de>

Hi Adrian,

On Thu, 5 Jun 2025 at 08:56, John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> 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.

It will be NAKed, because it would break the ABI.

Thank you for providing solid evidence that changing the default
alignment in the compiler will break the ABI, and is thus unacceptable.
(I wanted to test-compile all uapi headers to find differences, but
ran into many headers not being self-contained, or causing conflicts).

Feel free to start arch/m68k32/ to work around this ;-)

BTW, looking into the history of __ADDR_BND_PKEY_PAD() (which is
overkill on m68k, as __alignof__(void *) = 2, but might still be useful
for anyone wanting to revive CRIS support ;-), I ran into Andreas'
explanation why the minimal alignment is still 2 bytes:
https://lore.kernel.org/all/87y3i442w1.fsf@linux-m68k.org/.
(TL;DR: SunOS started on 68000).

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2025-06-05  7:16 UTC|newest]

Thread overview: 151+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26 15:05 Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k John Paul Adrian Glaubitz
2025-05-26 18:16 ` Jeffrey Walton
2025-05-26 18:23   ` John Paul Adrian Glaubitz
2025-05-26 18:48     ` Jeffrey Walton
2025-05-26 18:25 ` Jason Thorpe
2025-05-26 18:50   ` John Paul Adrian Glaubitz
2025-06-05  6:24 ` Jean-Michel Hautbois
2025-06-05  6:39   ` John Paul Adrian Glaubitz
2025-06-05  6:50     ` Jean-Michel Hautbois
2025-06-05  6:56       ` John Paul Adrian Glaubitz
2025-06-05  7:16         ` Geert Uytterhoeven [this message]
2025-06-05  7:36           ` John Paul Adrian Glaubitz
2025-06-05  8:49             ` Anders Magnusson
2025-06-05 10:33               ` Martin Husemann
2025-06-06  7:01                 ` Geert Uytterhoeven
2025-06-07  9:44                   ` John Paul Adrian Glaubitz
2025-06-06 10:20             ` Finn Thain
2025-06-07  9:44               ` John Paul Adrian Glaubitz
2025-06-07  9:58                 ` Andreas Schwab
2025-06-07 10:02                   ` Anders Magnusson
2025-06-07 11:11                     ` Andreas Schwab
2025-06-07 12:55                       ` Anders Magnusson
2025-06-07 13:57                         ` John Paul Adrian Glaubitz
2025-06-07 13:53                       ` John Paul Adrian Glaubitz
2025-06-07 13:50                   ` John Paul Adrian Glaubitz
2025-06-07 14:38                     ` Andreas Schwab
2025-06-07 14:54                       ` John Paul Adrian Glaubitz
2025-06-07 15:03                         ` Andreas Schwab
2025-06-07 15:19                           ` John Paul Adrian Glaubitz
2025-06-07 15:20                             ` Andreas Schwab
2025-06-07 15:23                               ` John Paul Adrian Glaubitz
2025-06-07 15:37                                 ` Andreas Schwab
2025-06-07 15:51                                   ` John Klos
2025-06-07 16:55                                     ` Andreas Schwab
2025-06-07 18:43                   ` Jason Thorpe
2025-06-07 21:43                     ` Andreas Schwab
2025-06-07 23:06                       ` Jason Thorpe
2025-06-10 11:16                       ` John Paul Adrian Glaubitz
2025-06-11  1:31                         ` Finn Thain
2025-06-08  1:10                 ` Finn Thain
2025-06-08 11:47                   ` Martin Husemann
2025-06-10 11:20                     ` John Paul Adrian Glaubitz
2025-06-10 11:18                   ` John Paul Adrian Glaubitz
2025-06-11  1:32                     ` Finn Thain
2025-06-10 11:26                   ` John Paul Adrian Glaubitz
2025-06-11  1:46                     ` Finn Thain
2025-06-11  3:04                     ` Stan Johnson
2025-06-11  7:44                       ` John Paul Adrian Glaubitz
2025-06-11 15:32                         ` Eero Tamminen
2025-06-11 15:49                           ` John Paul Adrian Glaubitz
2025-06-12 14:54                             ` Eero Tamminen
2025-06-13  1:36                               ` Finn Thain
2025-06-13 10:56                                 ` Eero Tamminen
2025-06-13 11:12                                   ` John Paul Adrian Glaubitz
2025-06-14  0:58                                     ` Finn Thain
2025-06-13 11:22                               ` John Paul Adrian Glaubitz
2025-06-13 13:21                                 ` John Klos
2025-06-13 13:33                                   ` John Paul Adrian Glaubitz
2025-06-13 20:10                                 ` Debian boot/login time Eero Tamminen
2025-06-14  1:13                                 ` Question on BIGGEST_ALIGNMENT in GCC on NetBSD/m68k Finn Thain
2025-06-12  1:54                         ` Finn Thain
2025-06-12  7:18                           ` John Paul Adrian Glaubitz
2025-06-12 10:00                             ` Jason Thorpe
     [not found]                           ` <CABq5eXH8S9MVoRi5znU+u7EJPmaRA+8yOyd-QKBJMQa10UoAmw@mail.gmail.com>
2025-06-12  7:27                             ` John Paul Adrian Glaubitz
2025-06-12  8:19                               ` Finn Thain
2025-06-13 11:15                                 ` John Paul Adrian Glaubitz
2025-06-14  1:06                                   ` Finn Thain
2025-06-12  8:25                               ` Administrator @ R·V·E
2025-06-12 13:06                                 ` Christian Groessler
2025-06-13 11:16                                 ` John Paul Adrian Glaubitz
2025-06-16 11:54                                   ` Geert Uytterhoeven
2025-06-16 12:21                                     ` John Paul Adrian Glaubitz
2025-06-16 12:29                                       ` Geert Uytterhoeven
2025-06-16 15:39                                         ` Preliminary results - was: " John Paul Adrian Glaubitz
2025-06-22 22:13                                           ` Eero Tamminen
2025-06-23  6:34                                             ` John Paul Adrian Glaubitz
2025-06-23  7:13                                             ` Geert Uytterhoeven
2025-06-13 11:55                 ` Geert Uytterhoeven
2025-06-13 12:00                   ` John Paul Adrian Glaubitz
2025-06-13 12:09                     ` Geert Uytterhoeven
2025-06-13 12:23                       ` John Paul Adrian Glaubitz
2025-06-13 12:30                         ` Geert Uytterhoeven
2025-06-13 12:51                           ` John Paul Adrian Glaubitz
2025-06-13 13:00                             ` John Paul Adrian Glaubitz
2025-06-14  1:34                               ` Finn Thain
2025-06-15  9:26                               ` Geert Uytterhoeven
2025-06-16  6:48                                 ` John Paul Adrian Glaubitz
2025-06-13 13:01                             ` ALeX Kazik
2025-06-14  1:46                               ` Finn Thain
2025-06-13 14:15                             ` Eero Tamminen
2025-06-13 14:53                               ` John Paul Adrian Glaubitz
2025-06-13 15:24                                 ` Laurent Vivier
2025-06-14  7:21                                   ` John Paul Adrian Glaubitz
2025-06-15  1:42                                     ` Finn Thain
2025-06-15  8:13                                       ` John Paul Adrian Glaubitz
2025-06-15  9:30                                         ` Finn Thain
2025-06-16  7:31                                           ` John Paul Adrian Glaubitz
2025-06-18  3:50                                             ` Finn Thain
2025-06-18  9:16                                               ` John Paul Adrian Glaubitz
2025-06-18  9:36                                                 ` Geert Uytterhoeven
2025-06-18  9:49                                                   ` John Paul Adrian Glaubitz
2025-06-18  9:56                                                     ` Geert Uytterhoeven
2025-06-18 10:04                                                       ` John Paul Adrian Glaubitz
2025-06-18 10:51                                                         ` Finn Thain
2025-06-18 12:21                                                         ` Greg Ungerer
2025-06-18 12:27                                                           ` John Paul Adrian Glaubitz
2025-06-18 12:54                                                             ` Geert Uytterhoeven
2025-06-18 12:57                                                               ` John Paul Adrian Glaubitz
2025-06-18 12:59                                                               ` Greg Ungerer
2025-06-18 22:29                                                           ` Finn Thain
2025-06-19  0:18                                                             ` Greg Ungerer
2025-06-19  5:31                                                               ` Finn Thain
2025-06-19  5:56                                                                 ` Greg Ungerer
2025-06-19 15:57                                                                   ` Jason Thorpe
2025-06-18 22:17                                                 ` Finn Thain
2025-06-16  6:33                                     ` Laurent Vivier
2025-06-16  7:39                                       ` John Paul Adrian Glaubitz
2025-06-16  8:00                                         ` Laurent Vivier
2025-06-16  8:14                                           ` John Paul Adrian Glaubitz
2025-06-16  8:32                                             ` Laurent Vivier
2025-06-16  8:45                                               ` Geert Uytterhoeven
2025-06-16  9:07                                                 ` John Paul Adrian Glaubitz
2025-06-16  9:00                                               ` John Paul Adrian Glaubitz
2025-06-16  9:10                                                 ` Laurent Vivier
2025-06-16  9:15                                                   ` John Paul Adrian Glaubitz
2025-06-16  9:26                                                     ` Laurent Vivier
2025-06-16  9:32                                                       ` John Paul Adrian Glaubitz
2025-06-16  9:45                                                         ` Laurent Vivier
2025-06-16 10:07                                                   ` Geert Uytterhoeven
2025-06-16 10:51                                                     ` Laurent Vivier
2025-06-16 11:01                                                     ` John Paul Adrian Glaubitz
2025-06-16 11:05                                                       ` Laurent Vivier
2025-06-16 11:10                                                         ` John Paul Adrian Glaubitz
2025-06-16 11:16                                                           ` John Paul Adrian Glaubitz
2025-06-16 11:16                                                           ` Laurent Vivier
2025-06-16 14:44                                                       ` Jason Thorpe
2025-06-16 14:43                                                   ` Jason Thorpe
2025-06-16 15:17                                                     ` John Paul Adrian Glaubitz
2025-06-18  3:19                                                     ` Finn Thain
2025-06-18  9:15                                                       ` John Paul Adrian Glaubitz
2025-06-18 22:16                                                         ` Finn Thain
2025-06-13 19:29                                 ` Eero Tamminen
2025-06-14  7:51                                   ` John Paul Adrian Glaubitz
2025-06-14 10:39                                     ` Eero Tamminen
2025-06-14 11:20                                       ` John Klos
2025-06-15  8:05                                         ` John Paul Adrian Glaubitz
2025-06-15  9:32                                   ` Geert Uytterhoeven
2025-06-16  6:42                                     ` John Paul Adrian Glaubitz
2025-06-14  1:29                     ` Finn Thain
2025-06-13 16:26                   ` David Brownlee
2025-06-16  6:39                     ` John Paul Adrian Glaubitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdXNF5OCjdK7+AHWTCqSEDa-n-dYdESVVSP5Jn9UqA6feA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=debian-68k@lists.debian.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=jeanmichel.hautbois@yoseli.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=port-m68k@netbsd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).