From: Arnd Bergmann <arnd@arndb.de>
To: musl@lists.openwall.com
Subject: Re: [musl] riscv32 v2
Date: Mon, 7 Sep 2020 23:58:20 +0200 [thread overview]
Message-ID: <CAK8P3a2kTEC3rDVD0VQLXvYAEuD24QtXLMxDQ=h_L45Fb8NdEw@mail.gmail.com> (raw)
In-Reply-To: <20200907214554.GO3265@brightrain.aerifal.cx>
On Mon, Sep 7, 2020 at 11:46 PM Rich Felker <dalias@libc.org> wrote:
> On Mon, Sep 07, 2020 at 11:35:45PM +0200, Arnd Bergmann wrote:
> > On Mon, Sep 7, 2020 at 8:06 PM Rich Felker <dalias@libc.org> wrote:
> > > On Mon, Sep 07, 2020 at 06:47:00AM -0400, Stefan O'Rear wrote:
> >
> > > > * Copy the IPC_TIME64 bits from arch/arm/bits to trigger the musl code
> > > > for fixing time64 IPC_STAT results. I'm not super happy with this,
> > > > maybe there should be a new mechanism in musl for fixing IPC_STAT for
> > > > unconditionally-time64 architectures.
> > >
> > > If the riscv32 IPC syscalls don't actually provide in-place time64 but
> > > require translation, I think it's fairly appropriate as-is.
> > >
> > > From the definitions in your patch, it looks like all the time fields
> > > are fixed-word-order (little endian) and possibly not aligned, so it
> > > seems like they can't be used in-place. Is this correct?
> >
> > Yes, rv32 uses the generic system call arguments, which are
> > unfortunately defined this way. In retrospect I wish I had
> > replaced the ipc syscalls with a sane version for time64, but at
> > the time time it seemed as easy way out to use the fields that
> > had been reserved for this purpose despite the broken
> > byte order and alignment.
>
> Thanks for clarifying. BTW does passing IPC_64 produce an error on
> rv32? If so, this is another advantage of keeping the IPC_TIME64 bit
> -- it would catch programs bypassing libc and making the syscalls
> directly.
Yes, this is now the generic behavior for the split IPC syscalls
(as opposed to sys_ipc on older architectures). The only architectures
that parse the version in the split ipc syscalls are the ones that
already had these and were interpreting IPC_64 before linux-5.1:
alpha, arm32, microblaze, mips-n32, mips-n64, and xtensa.
There are additional architectures that require passing IPC_64
in sys_ipc() but reject it in the split syscalls: m68k, mips-o32,
powerpc, s390, sh, sparc, and x86.
Arnd
next prev parent reply other threads:[~2020-09-07 21:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 5:48 Stefan O'Rear
2020-09-07 10:47 ` Stefan O'Rear
2020-09-07 18:06 ` Rich Felker
2020-09-07 21:35 ` Arnd Bergmann
2020-09-07 21:45 ` Rich Felker
2020-09-07 21:58 ` Arnd Bergmann [this message]
2020-09-07 22:11 ` Rich Felker
2020-09-07 22:30 ` Arnd Bergmann
2020-09-08 1:02 ` Rich Felker
2020-09-08 7:00 ` Arnd Bergmann
2020-09-07 11:27 ` Stefan O'Rear
2020-09-07 18:09 ` Rich Felker
2020-09-08 1:54 ` Rich Felker
2020-09-09 6:07 ` Rich Felker
2020-09-09 20:28 ` Rich Felker
2020-09-09 21:28 ` Palmer Dabbelt
2020-09-09 21:36 ` Rich Felker
2020-09-09 23:08 ` Palmer Dabbelt
2020-09-10 7:36 ` Arnd Bergmann
2020-09-10 10:01 ` Vincenzo Frascino
2020-09-11 0:08 ` Palmer Dabbelt
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='CAK8P3a2kTEC3rDVD0VQLXvYAEuD24QtXLMxDQ=h_L45Fb8NdEw@mail.gmail.com' \
--to=arnd@arndb.de \
--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).