mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rob Landley <rob@landley.net>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com, libc-alpha@sourceware.org,
	linux-sh@vger.kernel.org
Subject: Re: [musl] SH sigcontext ABI is broken
Date: Wed, 24 Jun 2015 02:12:58 -0500	[thread overview]
Message-ID: <558A587A.2010400@landley.net> (raw)
In-Reply-To: <20150624045224.GO1173@brightrain.aerifal.cx>



On 06/23/2015 11:52 PM, Rich Felker wrote:
> On Tue, Jun 23, 2015 at 11:25:08PM -0500, Rob Landley wrote:
>> On 06/20/2015 01:06 PM, Rich Felker wrote:
>>> So there's a lot of historical mess and breakage here, but sh3
>>> binaries have been running with a stable (albeit wrong, IMO)
>>> definition of ucontext_t/mcontext_t/sigcontext for around 14 years
>>> now (as long as they only run on sh3 hardware, not sh4). So I'm a bit
>>> hesitant to consider this something that could be changed with no path
>>> for compatibility.
>>
>> I'm told SH3 was only on sale for about a year between its introduction
>> and sh4 coming out, at which point everybody switched. There were
>> significant sh2 deployments and significant sh4 deployments, but sh3 was
>> more or less a rounding error. The Wikipedia[citation needed] article
>> doesn't even break it out separately because there's really nothing to
>> say: https://en.wikipedia.org/?title=SuperH
>>
>> (Again, there's a reason qemu-system-sh4 has a 4 in it. At $DAYJOB their
>> plan is to eventually jump from sh2 straight to sh4 because sh3 doesn't
>> matter.)
>>
>> sh2a was a retcon, started shipping in 2007, a decade after the
>> dreamcast. Hitachi had already unloaded superh onto Renesas, which did a
>> big Not Invented Here on superh and kept trying to come up with their
>> own processor designs. The H in H8300 also stands for Hitachi, so you
>> can imagine how well Renesas supported it:
>>
>> http://permalink.gmane.org/gmane.linux.ports.sh.devel/7237
>>
>> Seriously, It only became interesting again when the patents expired...
> 
> It's easy to declare SH3 irrelevant when we're not using it,

If nobody is using it it's irrelevant, yes.

> but if we
> want SH in general to be a serious platform moving forward, there
> needs to be proper attention to things like not breaking kernel
> API/ABI and a concern for consensus among users of the platform.

You're aware that modern x86 processors dropped support for the
binary-coded-decimal instructions in the original 8086, right? Obviously
x86 is not a serious platform...

You're saying that historically there have been multiple incompatible
ABIs, which nobody noticed the brokenness of for years (clone system
call arguments, etc) because _if_ anybody was still using them
(unlikely) they haven't upgraded their kernel in years. (We found things
that wouldn't build with a 4.x toolchain but the people building a lot
of this were using a 2.x toolchain and pthreads, not nptl...)

As part of your "unified" binary you want to invent a new file format
(ELF/fdpic combo) that uses a new system call trap number, and you're
going to patch the kernel to understand this new stuff due to a concern
about backwards compatibility...?

I've lost the plot here, is what I"m saying.

> Nominally SH3 support remains in both the kernel and glibc. If it can
> be established that multiple parties agree that there's really no one
> left who cares about the old no-FPU sigcontext ABI on SH3, I will be
> all for dropping it and unifying sigcontext.

Multiple parties like who?

If you feel it important to create infrastructure in search of a user
unless I can prove a negative, it's your libc. But I really, really,
really don't see the point. "This is the interesting subset." "But
somebody else might exist!" "Wait to hear from them?"

> Perhaps a good starting point would be making SH2 (and SH1 if it's
> even supported at all) use the SH4(/SH2A)-compatible sigcontext
> layout. For these, I think it's completely implausible that existing
> software depends on the layout.

Your post said the FPU is what changed the layout. I don't think sh2 had
an FPU? (Again, sh2a first shipped in 2007...)

I don't understand why you want a common abi between a nommu system and
an mmu system which did not historically have the same system calls or
even use the same binary format. What's the point?

> Rich

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2015-06-24  7:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  7:09 Rich Felker
2015-06-19  7:41 ` Andreas Schwab
2015-06-19 19:12   ` Rich Felker
2015-06-19 19:57     ` [musl] " Andreas Schwab
2015-06-19 20:32       ` Rich Felker
2015-06-20  8:10         ` [musl] " Geert Uytterhoeven
2015-06-20 19:59           ` Rob Landley
2015-07-02 19:23             ` Maciej W. Rozycki
2015-07-02 22:51               ` Rob Landley
2015-07-03  6:43                 ` Andreas Schwab
2015-06-20 18:06 ` Rich Felker
2015-06-24  4:25   ` [musl] " Rob Landley
2015-06-24  4:52     ` Rich Felker
2015-06-24  7:12       ` Rob Landley [this message]
2015-06-24 18:03         ` Rich Felker
2015-06-24  8:40           ` [musl] " Rob Landley
2015-06-24 21:34             ` Rich Felker
2015-06-24 22:32               ` Rob Landley
2015-06-24 23:26                 ` Bobby Bingham
2015-06-24 23:54                 ` Rich Felker
2015-06-25  6:24               ` [musl] " Geert Uytterhoeven
2015-06-24 14:10       ` Joseph Myers
2015-06-24  8:23         ` Rob Landley
2015-06-24 18:12         ` Rich Felker
2015-06-24  9:14           ` Rob Landley
2015-06-24 22:02             ` Rich Felker
2015-06-24 19:37           ` Joseph Myers
2015-06-24 20:08             ` Rich Felker

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=558A587A.2010400@landley.net \
    --to=rob@landley.net \
    --cc=dalias@libc.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).