From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10461 invoked from network); 7 Sep 2020 21:46:11 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 7 Sep 2020 21:46:11 -0000 Received: (qmail 15947 invoked by uid 550); 7 Sep 2020 21:46:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15929 invoked from network); 7 Sep 2020 21:46:07 -0000 Date: Mon, 7 Sep 2020 17:45:54 -0400 From: Rich Felker To: musl@lists.openwall.com Message-ID: <20200907214554.GO3265@brightrain.aerifal.cx> References: <68b5e735-45be-413f-8153-cb97dd5967cd@www.fastmail.com> <20200907180636.GM3265@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] riscv32 v2 On Mon, Sep 07, 2020 at 11:35:45PM +0200, Arnd Bergmann wrote: > On Mon, Sep 7, 2020 at 8:06 PM Rich Felker 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. Rich