mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [musl] About "stable ABI" for riscv32 kernel issue and Alpine port
Date: Wed, 1 Apr 2020 09:40:01 -0400	[thread overview]
Message-ID: <20200401134001.GY11469@brightrain.aerifal.cx> (raw)
In-Reply-To: <20200401061825.GA6733@APC301.andestech.com>

On Wed, Apr 01, 2020 at 02:18:27PM +0800, Ruinland ChuanTzu Tsai wrote:
> Hi Rich and All,
> 
> Back in 13th Mar, Rich has stated that "kernel has not declared it 
> (RV32 Linux) a stable ABI yet." I'm wondering whether Rich could kindly
> elaborate a little bit more details about this concern ?

I don't know the official statement of kernel policy, but my
understanding of it is just that the normal kernel stability policy
(that they can't "break userspace", including changing type
definitions that are part of user-kernel ABI, removing syscalls, etc.)
doesn't apply yet for RV32. I'd welcome a clarification from anyone
who can provide one on whether this is still the case, and if so, what
needs to happen to get past that.

> Since my employer, Andes Tech, is one of the founding plantium memeber
> of RISC-V Foundation and we're shipping a considerable amount of
> Linux-running RV32 products at the time we're speaking, we will be
> happy to help on the kernel side and make it more stablized and secured.

It's not a matter of secure or "stable" in the sense of not crashing.
It's a matter of "stable" in the sense of "not changing out from under
you".

> During my pastime, I've ported Alpine Linux with musl 1.2.0 to a 
> publicily available and open-sourced platform, LiteX/VexRiscv[1], which
> could be synthesized and "burnt" to a Lattice ECP5-5G Versa Evaluation
> Board with completely FOSS toolchain without any closed source
> component. [2]
> 
> And here's the footage of booting :
> https://asciinema.org/a/315205
> 
> Unfortunately, since my musl 1.2.0 is an inhouse work and we are still
> polishing and preparing it for upstreaming, please excuse me from not
> releasing the cpio image and stuffs at this time being.
> 
> P.S.
> Regarding the last mail:
> https://www.openwall.com/lists/musl/2020/03/13/4
> I'm not really qualified to answer the reason/profit of lacking LR/SC
> pair. Yet just a rough hunch that LR/SC is much stronger in atomicity
> than other AMOs.

Yes, LR/SC is a slightly stronger primitive in some sense, but at the
same time it's far easier to fake an implementation on single-core
designs.

In any case if there are chips people want to run Linux/musl on that
lack LR/SC then we need to know what the intended way to get atomics
is. Does kernel trap and emulate? Do we have to make a syscall? Is
there a function kernel exports to userspace like kuser_helper on
pre-v6 ARM that establishes a contract of cooperation between kernel
and userspace to restart interrupted atomics? What are you doing with
your WIP port?

Rich

      reply	other threads:[~2020-04-01 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  6:18 Ruinland ChuanTzu Tsai
2020-04-01 13:40 ` Rich Felker [this message]

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=20200401134001.GY11469@brightrain.aerifal.cx \
    --to=dalias@libc.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).